/**
 * Sible site chrome (plg_system_siblefoundation)
 *
 * Header and footer styling grafted onto the Gantry 5 Helium particles
 * (#g-navigation, #g-footer, #g-offcanvas). Source of truth: Figma file
 * Nr0pEQGnm23qF9cTKRPFQQ, Header 42:75, Mobile top bar 198:158, Footer 393:867.
 *
 * Loaded only when the plugin param "Enable site chrome" is on. Every rule is
 * scoped to body.sf-chrome, which the plugin adds in the same case, so turning
 * the param off returns the stock Gantry chrome.
 *
 * Load order: web asset styles land before Gantry's compiled CSS, so these
 * rules win on specificity (one id plus classes), never on order.
 */

/* ------------------------------------------------------------------------
 * Header: ground and logo (Figma Header 42:75, 1378 x 143, placed 30px from
 * the top and 31px from each side of a 1440 frame).
 *
 * Desktop and tablet only (48rem and up). Below 48rem the mobile top bar
 * (Figma 198:158) takes over in a later step.
 *
 * The page behind the header is color/ground/inverse on every Figma final
 * frame, so the navigation section paints it itself instead of depending on
 * each page's own background.
 *
 * The brush shape (header-brush.svg, Figma 39:155) sits on a ::before behind
 * the content. It is a background, not a mask, so nothing inside the header
 * (links, the open search field, focus rings) is ever clipped. Its fill is
 * color/ground/nav, baked into the SVG; the flat colour underneath is only a
 * fallback if the image fails.
 *
 * The brush is drawn about 15% larger than the Figma 1378 x 135 box and
 * reaches further right, so its solid body runs under the account control at
 * the right end (approved on review, 2026-10-05). Whatever passes the
 * viewport edge is clipped by Gantry's #g-page-surround (overflow: hidden),
 * so it never causes horizontal scrolling.
 * --------------------------------------------------------------------- */

@media (min-width: 48rem) {
    /* 8px of ground below the brush strip (added on review 2026-10-06; the strip and its contents do not move). */
    body.sf-chrome #g-navigation {
        padding: 30px var(--sf-space-md) 8px;
        background: var(--sf-color-ground-inverse);
    }

    body.sf-chrome #g-navigation > .g-container {
        position: relative;
        isolation: isolate;
        width: auto;
        max-width: 1378px;
        margin: 0 auto;
        padding: 0;
    }

    body.sf-chrome #g-navigation > .g-container::before {
        content: "";
        position: absolute;
        z-index: -1;
        top: -8px;
        left: -1%;
        right: -7%;
        height: 155px;
        background: url("../images/header-brush.svg") center / 100% 100% no-repeat;
        pointer-events: none;
    }

    /* The second grid holds logo, menu and account; the first only system messages. */
    body.sf-chrome #g-navigation > .g-container > .g-grid:last-child {
        flex-wrap: nowrap;
        align-items: flex-start;
        min-height: 143px;
    }

    body.sf-chrome #g-navigation > .g-container > .g-grid:last-child > .g-block:first-child {
        flex: 0 0 170px;
        width: 170px;
        max-width: none;
    }

    body.sf-chrome #g-navigation > .g-container > .g-grid:last-child > .g-block:nth-child(2) {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        max-width: none;
    }

    body.sf-chrome #g-navigation > .g-container > .g-grid:last-child > .g-block:last-child {
        flex: 0 0 auto;
        width: auto;
        max-width: none;
    }

    body.sf-chrome #g-navigation > .g-container > .g-grid:last-child > .g-block:first-child > .g-content {
        margin: 0;
        padding: 0;
    }

    /*
     * Logo (Figma "image 15": 130 x 122, rotation -7, centred at x98 y74.5
     * of the header). Figma rotation is counter-clockwise positive, so Figma
     * -7 is a 7deg clockwise tilt. On review (2026-10-05) it was eased back
     * by 1deg, so the CSS uses rotate(6deg). Gantry prints max-height: 100px
     * inline on the <img>, so the extra size comes from scale() rather than
     * fighting the inline style. On review (2026-10-06) the logo was made 2%
     * smaller than the Figma size (scale 1.22 to 1.196, tablet 0.81 to 0.794).
     * The 100px layout box is placed so its centre lands on the Figma centre.
     */
    body.sf-chrome #g-navigation .g-logo {
        display: block;
        width: max-content;
        margin: 24px 0 0 46px;
        line-height: 0;
    }

    body.sf-chrome #g-navigation .g-logo img {
        display: block;
        width: auto;
        height: 100px;
        transform: rotate(6deg) scale(1.196);
        transform-origin: 50% 50%;
    }
}

/* 48rem to 60rem: smaller logo (about 96px visual height). */
@media (min-width: 48rem) and (max-width: 59.99rem) {
    body.sf-chrome #g-navigation > .g-container > .g-grid:last-child > .g-block:first-child {
        flex-basis: 128px;
        width: 128px;
    }

    body.sf-chrome #g-navigation .g-logo {
        margin: 18px 0 0 28px;
    }

    body.sf-chrome #g-navigation .g-logo img {
        transform: rotate(6deg) scale(0.794);
    }
}

/* 75rem and up: the Figma side inset. */
@media (min-width: 75rem) {
    body.sf-chrome #g-navigation {
        padding-left: 31px;
        padding-right: 31px;
    }
}

/* ------------------------------------------------------------------------
 * Header: nav links (Figma Header 42:75: Shop, Services, Vendors in
 * Desktop/Nav Link, white, text boxes starting at x170, 277 and 418).
 * States follow the Figma "Nav Link" component set (466:1150):
 *   Default  plain text.
 *   Hover    1.5px ink/inverse underline, 4px below the baseline.
 *   Current  same underline as Hover, on the active section.
 *   Focus    keyboard focus only: 2px ink/inverse outline, 4px radius,
 *            4px from the text vertically and 6px horizontally. The link
 *            box carries that 4px / 6px padding, so the outline sits on its
 *            edge. The 4px radius and 6px padding are component values in
 *            Figma, not variables.
 *
 * The menu itself is the Gantry menu particle reading the Joomla main menu.
 * Shop and Services are Menu Item Alias items to the browse pages; Gantry
 * does not mark an alias as active, so "current" for them is keyed on the
 * page's body itemid class (the existing menu items, whose IDs come from the
 * production backup) plus the alias link's href, never on the alias item's
 * own ID, which differs on live:
 *   Shop:     Products by Category (158), Products (160, also every product
 *             page), Browse Products (105).
 *   Services: Services by Category (163), Services (161), Browse Services (162).
 * Other items (Vendors) use Gantry's own li.active.
 *
 * Dropdowns stay functional: the only parent left in the menu is the
 * vendor-only My Shop item.
 * --------------------------------------------------------------------- */

@media (min-width: 48rem) {
    body.sf-chrome #g-navigation > .g-container > .g-grid:last-child > .g-block:nth-child(2) > .g-content {
        margin: 0;
        padding: 0;
    }

    /* Puts the text centre at the Figma y (about 73px into the header). */
    body.sf-chrome #g-navigation .g-main-nav {
        margin-top: 50px;
    }

    body.sf-chrome #g-navigation .g-main-nav .g-toplevel {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: var(--sf-space-xl);
        margin: 0;
        padding: 0;
    }

    body.sf-chrome #g-navigation .g-main-nav .g-toplevel > li {
        margin: 0;
    }

    body.sf-chrome #g-navigation .g-main-nav .g-toplevel > li > .g-menu-item-container {
        display: flex;
        align-items: center;
        padding: var(--sf-space-2xs) 6px;
        color: var(--sf-color-ink-inverse);
        font: var(--sf-type-desktop-nav-link);
        letter-spacing: 0;
        text-transform: none;
        white-space: nowrap;
        border-radius: 4px;
    }

    body.sf-chrome #g-navigation .g-main-nav .g-toplevel > li > .g-menu-item-container > .g-menu-item-content {
        padding: 0;
        line-height: inherit;
        box-shadow: none;
        border: 0;
    }

    body.sf-chrome #g-navigation .g-main-nav .g-toplevel > li > .g-menu-item-container .g-menu-item-title {
        text-decoration-line: underline;
        text-decoration-color: transparent;
        text-decoration-thickness: 1.5px;
        text-underline-offset: 4px;
        text-decoration-skip-ink: auto;
        transition: text-decoration-color 0.15s ease;
    }

    /* Hover */
    body.sf-chrome #g-navigation .g-main-nav .g-toplevel > li:hover > .g-menu-item-container .g-menu-item-title,
    /* Current: Gantry's own active item */
    body.sf-chrome #g-navigation .g-main-nav .g-toplevel > li.active > .g-menu-item-container .g-menu-item-title,
    /* Current: Shop alias */
    body.sf-chrome.itemid-158 #g-navigation .g-main-nav .g-toplevel > li > a[href$="/shop-by-category"] .g-menu-item-title,
    body.sf-chrome.itemid-160 #g-navigation .g-main-nav .g-toplevel > li > a[href$="/shop-by-category"] .g-menu-item-title,
    body.sf-chrome.itemid-105 #g-navigation .g-main-nav .g-toplevel > li > a[href$="/shop-by-category"] .g-menu-item-title,
    /* Current: Services alias */
    body.sf-chrome.itemid-163 #g-navigation .g-main-nav .g-toplevel > li > a[href$="/services-by-category"] .g-menu-item-title,
    body.sf-chrome.itemid-161 #g-navigation .g-main-nav .g-toplevel > li > a[href$="/services-by-category"] .g-menu-item-title,
    body.sf-chrome.itemid-162 #g-navigation .g-main-nav .g-toplevel > li > a[href$="/services-by-category"] .g-menu-item-title {
        text-decoration-color: currentColor;
    }

    /* Focus (keyboard only) */
    body.sf-chrome #g-navigation .g-main-nav .g-toplevel > li > .g-menu-item-container:focus {
        outline: none;
    }

    body.sf-chrome #g-navigation .g-main-nav .g-toplevel > li > .g-menu-item-container:focus-visible {
        outline: 2px solid var(--sf-color-ink-inverse);
        outline-offset: 0;
    }

    body.sf-chrome #g-navigation .g-main-nav .g-toplevel > li.active > .g-menu-item-container,
    body.sf-chrome #g-navigation .g-main-nav .g-toplevel > li:hover > .g-menu-item-container {
        color: var(--sf-color-ink-inverse);
    }
}

/* 60rem to 75rem: tighter gap. */
@media (min-width: 60rem) and (max-width: 74.99rem) {
    body.sf-chrome #g-navigation .g-main-nav .g-toplevel {
        gap: var(--sf-space-md);
    }
}

/*
 * 48rem to 60rem: Nav Login size (24) and a smaller gap. 28px (Nav Search)
 * was tried first; a signed-in vendor's extra "My Shop" item then ran into
 * the Account pill at 768px, so the fallback size from the plan applies.
 */
@media (min-width: 48rem) and (max-width: 59.99rem) {
    body.sf-chrome #g-navigation .g-main-nav {
        margin-top: 44px;
    }

    body.sf-chrome #g-navigation .g-main-nav .g-toplevel {
        gap: var(--sf-space-sm);
    }

    body.sf-chrome #g-navigation .g-main-nav .g-toplevel > li > .g-menu-item-container {
        font: var(--sf-type-desktop-nav-login);
    }
}

/* ------------------------------------------------------------------------
 * Header: actions (Figma Header 42:75). Injected by the plugin into the last
 * block of the navigation grid; body.sf-hdr is present only when that worked.
 *   Login/account (42:32): 120 x 47 brush pill, label in a 69px centred box
 *     20px from the left. "Login" uses Desktop/Nav Login; the Account
 *     variant (set by chrome.js for a signed-in visitor) uses Desktop/Field
 *     Value. The brush shape (login-brush.svg, Figma 42:34) is a mask on a
 *     ::before filled with color/accent/green, so the Hover state can switch
 *     the fill to color/accent/green-hover. The mask is on the decorative
 *     layer only; the label and focus ring are never clipped.
 *   Cart: 24px outline icon in color/accent/green, count badge 16px in
 *     color/accent/badge, offset 12px right and 6px up from the icon,
 *     Desktop/Badge Count. Hidden while the count is unknown or 0.
 *   Gaps (search to login, login to cart) are 16px. The cart's right edge is
 *   156px in from the header's right edge, and the pill top 44px down.
 * The Gantry Account particle is hidden only when the actions are present.
 * Below 48rem the actions stay hidden until the mobile top bar step.
 * --------------------------------------------------------------------- */

body.sf-chrome .sf-hdr-actions {
    display: none;
}

@media (min-width: 48rem) {
    body.sf-hdr #g-navigation > .g-container > .g-grid:last-child > .g-block:last-child {
        display: flex;
        align-items: flex-start;
        margin-left: auto;
        margin-right: 156px;
    }

    body.sf-hdr #g-navigation > .g-container > .g-grid:last-child > .g-block:last-child > .g-content {
        display: none;
    }

    body.sf-hdr .sf-hdr-actions {
        display: flex;
        align-items: center;
        gap: var(--sf-space-md);
        height: 47px;
        margin-top: 44px;
    }

    body.sf-hdr .sf-hdr-login {
        position: relative;
        isolation: isolate;
        display: inline-flex;
        align-items: center;
        min-width: 120px;
        height: 47px;
        padding: 0 0 0 20px;
        color: var(--sf-color-ink-inverse);
        font: var(--sf-type-desktop-nav-login);
        text-decoration: none;
        white-space: nowrap;
        border-radius: 4px;
    }

    body.sf-hdr .sf-hdr-login::before {
        content: "";
        position: absolute;
        z-index: -1;
        inset: 0;
        background-color: var(--sf-color-accent-green);
        -webkit-mask: url("../images/login-brush.svg") center / 100% 100% no-repeat;
        mask: url("../images/login-brush.svg") center / 100% 100% no-repeat;
        transition: background-color 0.15s ease;
        pointer-events: none;
    }

    body.sf-hdr .sf-hdr-login:hover::before {
        background-color: var(--sf-color-accent-green-hover);
    }

    body.sf-hdr .sf-hdr-login--account {
        font: var(--sf-type-desktop-field-value);
    }

    body.sf-hdr .sf-hdr-login__label {
        display: inline-block;
        min-width: 69px;
        text-align: center;
    }

    body.sf-hdr .sf-hdr-login:hover,
    body.sf-hdr .sf-hdr-login:focus {
        color: var(--sf-color-ink-inverse);
    }

    body.sf-hdr .sf-hdr-cart {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        color: var(--sf-color-accent-green);
        border-radius: 4px;
    }

    body.sf-hdr .sf-hdr-cart:hover,
    body.sf-hdr .sf-hdr-cart:focus {
        color: var(--sf-color-accent-green);
    }

    body.sf-hdr .sf-hdr-cart__icon {
        display: block;
        width: 24px;
        height: 24px;
    }

    body.sf-hdr .sf-hdr-cart__count {
        position: absolute;
        top: -6px;
        left: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 16px;
        height: 16px;
        padding: 0 3px;
        color: var(--sf-color-ink-inverse);
        font: var(--sf-type-desktop-badge-count);
        background: var(--sf-color-accent-badge);
        border-radius: var(--sf-radius-pill);
    }

    body.sf-hdr .sf-hdr-cart__count[hidden] {
        display: none;
    }

    /* Keyboard focus: the same ring as the nav links. */
    body.sf-hdr .sf-hdr-login:focus,
    body.sf-hdr .sf-hdr-cart:focus {
        outline: none;
    }

    body.sf-hdr .sf-hdr-login:focus-visible,
    body.sf-hdr .sf-hdr-cart:focus-visible {
        outline: 2px solid var(--sf-color-ink-inverse);
        outline-offset: 4px;
    }
}

/* 60rem to 75rem and 48rem to 60rem: less inset on the right. */
@media (min-width: 60rem) and (max-width: 74.99rem) {
    body.sf-hdr #g-navigation > .g-container > .g-grid:last-child > .g-block:last-child {
        margin-right: var(--sf-space-3xl);
    }
}

@media (min-width: 48rem) and (max-width: 59.99rem) {
    body.sf-hdr #g-navigation > .g-container > .g-grid:last-child > .g-block:last-child {
        margin-right: var(--sf-space-lg);
    }

    body.sf-hdr .sf-hdr-actions {
        margin-top: 36px;
    }
}

/* ------------------------------------------------------------------------
 * Header: search (Figma Search Button 42:57).
 *   Closed: 127 x 37 pill, color/ink/secondary, "Search" in Desktop/Nav
 *     Search, white.
 *   Open: 286 x 37 field sharing the closed pill's right edge (it grows to
 *     the left), same fill and type; placeholder white at 65%, typed text
 *     color/ground/cream.
 *   Compact (below 60rem): 44 x 44 circle, 20px search icon in
 *     color/ink/inverse.
 * The form keeps the closed pill's footprint; the open field is absolutely
 * positioned over whatever sits to its left, so opening never shifts the
 * layout. Without JavaScript the toggle submits to the search page.
 * --------------------------------------------------------------------- */

@media (min-width: 48rem) {
    body.sf-hdr .sf-hdr-search {
        position: relative;
        display: flex;
        align-items: center;
        margin: 0;
    }

    body.sf-hdr .sf-hdr-search__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    body.sf-hdr .sf-hdr-search__toggle,
    body.sf-hdr .sf-hdr-search__field {
        height: 37px;
        margin: 0;
        color: var(--sf-color-ink-inverse);
        font: var(--sf-type-desktop-nav-search);
        background: var(--sf-color-ink-secondary);
        border: 0;
        border-radius: var(--sf-radius-pill);
        box-shadow: none;
    }

    body.sf-hdr .sf-hdr-search__toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 127px;
        padding: 0 10px;
        cursor: pointer;
        line-height: 1;
    }

    body.sf-hdr .sf-hdr-search__icon {
        display: none;
        width: 20px;
        height: 20px;
    }

    body.sf-hdr .sf-hdr-search__field {
        position: absolute;
        z-index: 2;
        top: 50%;
        right: 0;
        display: none;
        width: 286px;
        max-width: none;
        padding: 0 10px;
        color: var(--sf-color-ground-cream);
        transform: translateY(-50%);
        -webkit-appearance: none;
        appearance: none;
    }

    body.sf-hdr .sf-hdr-search__field::placeholder {
        color: var(--sf-color-ink-inverse);
        opacity: 0.65;
    }

    body.sf-hdr .sf-hdr-search__field::-webkit-search-cancel-button {
        -webkit-appearance: none;
        appearance: none;
    }

    body.sf-hdr .sf-hdr-search.is-open .sf-hdr-search__field {
        display: block;
    }

    /* While open, the field stands in for the pill. */
    body.sf-hdr .sf-hdr-search.is-open .sf-hdr-search__toggle {
        visibility: hidden;
    }

    body.sf-hdr .sf-hdr-search__toggle:focus,
    body.sf-hdr .sf-hdr-search__field:focus {
        outline: none;
    }

    body.sf-hdr .sf-hdr-search__toggle:focus-visible,
    body.sf-hdr .sf-hdr-search__field:focus-visible {
        outline: 2px solid var(--sf-color-ink-inverse);
        outline-offset: 2px;
    }
}

/* Below 60rem: Compact variant. */
@media (min-width: 48rem) and (max-width: 59.99rem) {
    body.sf-hdr .sf-hdr-search__toggle {
        width: 44px;
        min-width: 0;
        height: 44px;
        padding: 0;
    }

    body.sf-hdr .sf-hdr-search__text {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    body.sf-hdr .sf-hdr-search__icon {
        display: block;
    }
}

/*
 * 48rem to 75rem: the open field covers part of the nav, so the nav links are
 * hidden while it is open instead of showing cut-off words. They return as
 * soon as the search closes.
 */
@media (min-width: 48rem) and (max-width: 74.99rem) {
    body.sf-hdr #g-navigation:has(.sf-hdr-search.is-open) .g-main-nav {
        visibility: hidden;
    }
}

/* ------------------------------------------------------------------------
 * Mobile header, below 48rem (Figma Mobile B top bar 198:158, the same bar
 * in Mobile / My Account 474:1332, Cart Button / Mobile 474:1399).
 *   Top bar: 64px, color/ground/inverse, space/md side padding. Brand on the
 *     left: logo mark (36px, tilted like the desktop logo) and "Sible" in
 *     Mobile/Wordmark Nav, space/xs apart. Actions on the right, space/md
 *     apart: the cart (44px tap target, icon 10px in, badge at 25 / 3) and
 *     the menu button (three 26 x 2 bars, 8px apart, color/ground/page).
 *   The bar and the search row are both sticky (Figma "Nav / Top Bar +
 *     Sticky Search" 198:158 and its two parts named "(sticky)"): together
 *     124px, the bar 64 then the row. The search row (.sf-msearch, injected
 *     after the navigation section) is a 46px field, 23px radius, 1px
 *     color/line-default border, 18px inner left padding, Mobile/Body,
 *     placeholder in color/line-default, 14px below it. It sticks at 64px,
 *     under the bar (z-index 100). The open menu panel starts below the row
 *     (z-index 99, top 124px), so the row stays usable while the menu is
 *     open. Not sticky when the viewport is under 30rem high (see below).
 * Sticky needs #g-page-surround to stop being a scroll container: Gantry
 * gives it overflow: hidden (for the offcanvas slide), and overflow: clip
 * clips the same way without creating one.
 * Login/Account is not in the mobile bar; it moves into the menu panel in
 * the offcanvas step.
 * --------------------------------------------------------------------- */

body.sf-chrome .sf-msearch,
body.sf-chrome .sf-hdr-menu,
body.sf-chrome .sf-mpanel {
    display: none;
}

@media (max-width: 47.99rem) {
    body.sf-hdr #g-page-surround {
        overflow: clip;
    }

    /* The injected menu button replaces Gantry's floating toggle. */
    body.sf-hdr #g-page-surround > .g-offcanvas-toggle {
        display: none;
    }

    body.sf-hdr #g-navigation {
        position: sticky;
        z-index: 100;
        top: 0;
        padding: 0 var(--sf-space-md);
        background: var(--sf-color-ground-inverse);
    }

    body.sf-hdr #g-navigation > .g-container {
        width: auto;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    body.sf-hdr #g-navigation > .g-container > .g-grid:last-child {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        height: 64px;
        margin: 0;
    }

    body.sf-hdr #g-navigation > .g-container > .g-grid:last-child > .g-block {
        flex: 0 0 auto;
        width: auto;
        max-width: none;
    }

    body.sf-hdr #g-navigation > .g-container > .g-grid:last-child > .g-block:nth-child(2),
    body.sf-hdr #g-navigation > .g-container > .g-grid:last-child > .g-block:last-child > .g-content {
        display: none;
    }

    body.sf-hdr #g-navigation > .g-container > .g-grid:last-child > .g-block:first-child > .g-content {
        margin: 0;
        padding: 0;
    }

    /* Gantry's mobile logo rules add padding, a negative margin and capitals. */
    body.sf-hdr #g-navigation .g-logo {
        display: flex;
        align-items: center;
        gap: var(--sf-space-xs);
        margin: 0;
        padding: 0;
        color: var(--sf-color-ink-inverse);
        text-decoration: none;
        text-transform: none;
    }

    /*
     * Figma "Logo Mark" in the mobile top bar: rotation -7, i.e. 7deg
     * clockwise. (The desktop header logo uses 6deg by the reviewer's call.)
     */
    body.sf-hdr #g-navigation .g-logo img {
        display: block;
        width: auto;
        height: 36px;
        transform: rotate(7deg);
    }

    /* The wordmark. The link's accessible name comes from its aria-label. */
    body.sf-hdr #g-navigation .g-logo::after {
        content: "Sible";
        color: var(--sf-color-ink-inverse);
        font: var(--sf-type-mobile-wordmark-nav);
    }

    body.sf-hdr .sf-hdr-actions {
        display: flex;
        align-items: center;
        gap: var(--sf-space-md);
        height: 44px;
    }

    body.sf-hdr .sf-hdr-actions .sf-hdr-search,
    body.sf-hdr .sf-hdr-actions .sf-hdr-login {
        display: none;
    }

    /*
     * The home page hero has its own search box (mod_sible_search, "Search
     * Sible"). On phones the mobile search row replaces it, so two boxes are
     * not shown. Keyed on body.sf-hdr (only present when the header search
     * was injected) rather than body.sf-chrome, so if the injection fails the
     * hero search stays as the page's only search. From 48rem the hero box
     * stays until the homepage is redesigned.
     */
    body.sf-hdr .sib-srch-wrap {
        display: none;
    }

    body.sf-hdr .sf-hdr-cart {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        color: var(--sf-color-accent-green);
        border-radius: 4px;
    }

    body.sf-hdr .sf-hdr-cart__icon {
        display: block;
        width: 24px;
        height: 24px;
    }

    body.sf-hdr .sf-hdr-cart__count {
        position: absolute;
        top: 3px;
        left: 25px;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 16px;
        height: 16px;
        padding: 0 3px;
        color: var(--sf-color-ink-inverse);
        font: var(--sf-type-desktop-badge-count);
        background: var(--sf-color-accent-badge);
        border-radius: var(--sf-radius-pill);
    }

    body.sf-hdr .sf-hdr-cart__count[hidden] {
        display: none;
    }

    /*
     * Menu button: a 44px tap target around 26px bars. The negative side
     * margins put the bars where Figma has them: their right edge on the
     * bar's padding edge, 16px (the actions gap) after the cart.
     */
    body.sf-hdr .sf-hdr-menu {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        margin: 0 -9px;
        padding: 0;
        color: var(--sf-color-ground-page);
        background: none;
        border: 0;
        border-radius: 4px;
        cursor: pointer;
    }

    body.sf-hdr .sf-hdr-menu__bars,
    body.sf-hdr .sf-hdr-menu__bars::before,
    body.sf-hdr .sf-hdr-menu__bars::after {
        display: block;
        width: 26px;
        height: 2px;
        background: currentColor;
        border-radius: 1px;
    }

    body.sf-hdr .sf-hdr-menu__bars {
        position: relative;
    }

    body.sf-hdr .sf-hdr-menu__bars::before,
    body.sf-hdr .sf-hdr-menu__bars::after {
        content: "";
        position: absolute;
        left: 0;
    }

    body.sf-hdr .sf-hdr-menu__bars::before {
        top: -8px;
    }

    body.sf-hdr .sf-hdr-menu__bars::after {
        top: 8px;
    }

    body.sf-hdr .sf-hdr-cart:focus,
    body.sf-hdr .sf-hdr-menu:focus {
        outline: none;
    }

    body.sf-hdr .sf-hdr-cart:focus-visible,
    body.sf-hdr .sf-hdr-menu:focus-visible,
    body.sf-hdr #g-navigation .g-logo:focus-visible {
        outline: 2px solid var(--sf-color-ink-inverse);
        outline-offset: 2px;
    }

    /*
     * Search row under the bar, sticky with it. Opaque ground so the page
     * never shows through, 98 (under the bar at 100 and the panel at 99).
     * The bar and the row take 124px from the top of the screen, so
     * scroll-padding keeps anchor jumps and keyboard focus from landing
     * underneath them.
     */
    body.sf-hdr .sf-msearch {
        position: sticky;
        z-index: 98;
        top: 64px;
        display: block;
        padding: 0 var(--sf-space-md) 14px;
        background: var(--sf-color-ground-inverse);
    }

    html:has(body.sf-hdr) {
        scroll-padding-top: 124px;
    }

    body.sf-hdr .sf-msearch__form {
        position: relative;
        margin: 0;
    }

    body.sf-hdr .sf-msearch__label,
    body.sf-hdr .sf-msearch__submit {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    body.sf-hdr .sf-msearch__field {
        box-sizing: border-box;
        width: 100%;
        max-width: none;
        height: 46px;
        margin: 0;
        padding: 0 18px;
        color: var(--sf-color-ink-inverse);
        font: var(--sf-type-mobile-body);
        background: transparent;
        border: 1px solid var(--sf-color-line-default);
        border-radius: 23px;
        box-shadow: none;
        -webkit-appearance: none;
        appearance: none;
    }

    body.sf-hdr .sf-msearch__field::placeholder {
        color: var(--sf-color-line-default);
        opacity: 1;
    }

    body.sf-hdr .sf-msearch__field:focus {
        outline: none;
        border-color: var(--sf-color-ink-inverse);
    }

    body.sf-hdr .sf-msearch__field:focus-visible {
        outline: 2px solid var(--sf-color-ink-inverse);
        outline-offset: 2px;
    }
}

/* ------------------------------------------------------------------------
 * Mobile menu panel, below 48rem (Figma "Mobile / Menu Open" 475:1200, DEV
 * NOTE 475:1234). Replaces Gantry's offcanvas while the chrome is on the
 * page (body.sf-hdr): a full-width panel over the page, under the sticky top
 * bar (which stays, with the cart), entering from the right.
 *   Links: Nav Link (466:1150), Desktop/Nav Link in color/ink/inverse,
 *     padding 4 / 6, space/xs apart; the current section has the Current
 *     underline. List padding 40 top, 8 left (inside the bar's space/md).
 *   Then space/lg, a 1px color/line-default rule across the width, and the
 *     Login/Account pill 28 below it, 8 in.
 *   The menu button turns into the close button (Figma "Icon / Close": two
 *     2px lines in color/ink/inverse).
 * chrome.js opens and closes it (scroll lock, Escape, focus kept in the bar
 * and panel, focus back on the menu button, swipe right to close). Without
 * JavaScript the menu button's link opens it through :target, and a
 * "Close menu" link (shown only then) closes it.
 * --------------------------------------------------------------------- */

@media (max-width: 47.99rem) {
    body.sf-hdr #g-offcanvas {
        display: none;
    }

    body.sf-hdr .sf-mpanel {
        position: fixed;
        z-index: 99;
        /* Under the bar and the search row (64 + 60); chrome.js sets the exact value when it opens. */
        top: 124px;
        right: 0;
        bottom: 0;
        left: 0;
        display: block;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 40px var(--sf-space-md) var(--sf-space-2xl);
        background: var(--sf-color-ground-inverse);
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.25s ease, visibility 0s linear 0.25s;
        /* Vertical scrolling stays with the browser; horizontal drags go to
           chrome.js for swipe-to-close. */
        touch-action: pan-y;
    }

    body.sf-hdr .sf-mpanel.is-dragging {
        transition: none;
    }

    body.sf-hdr .sf-mpanel.is-open,
    body.sf-hdr .sf-mpanel:target {
        transform: none;
        visibility: visible;
        transition: transform 0.25s ease;
    }

    /*
     * Scroll lock while the panel is open: on html only. Locking body as well
     * turned body into its own scroll container, which detached the sticky
     * bar and search row: with the page scrolled, opening the menu sent them
     * off the top of the screen, and with them the close button.
     */
    html.sf-mpanel-lock {
        overflow: hidden;
        overscroll-behavior: none;
    }

    /*
     * Gantry's links use "transition: all", which would also animate the
     * visibility they inherit from the panel, leaving them hidden (and not
     * focusable) for a moment after it opens. Colours only.
     */
    body.sf-hdr .sf-mpanel a {
        transition-property: color, background-color, text-decoration-color;
    }

    body.sf-hdr .sf-mpanel__list {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: var(--sf-space-xs);
        margin: 0;
        padding: 0 0 0 var(--sf-space-xs);
        list-style: none;
    }

    body.sf-hdr .sf-mpanel__item {
        margin: 0;
        padding: 0;
    }

    body.sf-hdr .sf-mpanel__link {
        display: inline-block;
        padding: var(--sf-space-2xs) 6px;
        color: var(--sf-color-ink-inverse);
        font: var(--sf-type-desktop-nav-link);
        text-decoration-line: underline;
        text-decoration-color: transparent;
        text-decoration-thickness: 1.5px;
        text-underline-offset: 4px;
        border-radius: 4px;
    }

    body.sf-hdr .sf-mpanel__link:hover,
    body.sf-hdr .sf-mpanel__link.is-current {
        color: var(--sf-color-ink-inverse);
        text-decoration-color: currentColor;
    }

    /*
     * Sub-items (1.2.1): a top-level item's children (for example My Shop's
     * vendor pages), always shown, indented under it with a thin rule on the
     * left. Desktop/Nav Login type (24), one step down from the Nav Link.
     * Each link is at least 44px tall, so it is an easy tap target.
     */
    body.sf-hdr .sf-mpanel__sublist {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        margin: var(--sf-space-2xs) 0 var(--sf-space-xs) 6px;
        padding: 0 0 0 var(--sf-space-sm);
        border-left: 1px solid var(--sf-color-line-strong);
        list-style: none;
    }

    body.sf-hdr .sf-mpanel__subitem {
        margin: 0;
        padding: 0;
    }

    body.sf-hdr .sf-mpanel__sublink {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: 0 6px;
        color: var(--sf-color-ink-inverse);
        font: var(--sf-type-desktop-nav-login);
        text-decoration-line: underline;
        text-decoration-color: transparent;
        text-decoration-thickness: 1.5px;
        text-underline-offset: 4px;
        border-radius: 4px;
    }

    body.sf-hdr .sf-mpanel__sublink:hover {
        color: var(--sf-color-ink-inverse);
        text-decoration-color: currentColor;
    }

    body.sf-hdr .sf-mpanel__account {
        margin-top: var(--sf-space-lg);
        padding: 28px 0 0 var(--sf-space-xs);
        border-top: 1px solid var(--sf-color-line-default);
    }

    /* Login/Account pill: the same Figma component as the header (42:32). */
    body.sf-hdr .sf-mpanel .sf-hdr-login {
        position: relative;
        isolation: isolate;
        display: inline-flex;
        align-items: center;
        min-width: 120px;
        height: 47px;
        padding: 0 0 0 20px;
        color: var(--sf-color-ink-inverse);
        font: var(--sf-type-desktop-nav-login);
        text-decoration: none;
        white-space: nowrap;
        border-radius: 4px;
    }

    body.sf-hdr .sf-mpanel .sf-hdr-login::before {
        content: "";
        position: absolute;
        z-index: -1;
        inset: 0;
        background-color: var(--sf-color-accent-green);
        -webkit-mask: url("../images/login-brush.svg") center / 100% 100% no-repeat;
        mask: url("../images/login-brush.svg") center / 100% 100% no-repeat;
        pointer-events: none;
    }

    body.sf-hdr .sf-mpanel .sf-hdr-login:hover::before {
        background-color: var(--sf-color-accent-green-hover);
    }

    body.sf-hdr .sf-mpanel .sf-hdr-login--account {
        font: var(--sf-type-desktop-field-value);
    }

    body.sf-hdr .sf-mpanel .sf-hdr-login__label {
        display: inline-block;
        min-width: 69px;
        text-align: center;
    }

    /*
     * "Close menu" link inside the panel, shown only without JavaScript: the
     * :target panel has no other way out there. With JavaScript the top
     * bar's X (and swipe right) close the panel, so this is hidden.
     */
    body.sf-hdr .sf-mpanel__close {
        position: absolute;
        top: var(--sf-space-md);
        right: var(--sf-space-md);
        display: inline-flex;
        align-items: center;
        gap: var(--sf-space-xs);
        min-height: 44px;
        padding: 0 var(--sf-space-xs);
        color: var(--sf-color-ink-inverse);
        font: var(--sf-type-desktop-link-mono);
        text-decoration: none;
        border-radius: 4px;
    }

    body.sf-hdr .sf-mpanel__close:hover {
        color: var(--sf-color-ink-inverse);
        text-decoration: underline;
        text-underline-offset: 4px;
    }

    body.sf-hdr .sf-mpanel__close-icon {
        display: block;
        flex: none;
    }

    html.sf-js body.sf-hdr .sf-mpanel__close {
        display: none;
    }

    body.sf-hdr .sf-mpanel__link:focus,
    body.sf-hdr .sf-mpanel__sublink:focus,
    body.sf-hdr .sf-mpanel .sf-hdr-login:focus,
    body.sf-hdr .sf-mpanel__close:focus {
        outline: none;
    }

    body.sf-hdr .sf-mpanel__link:focus-visible,
    body.sf-hdr .sf-mpanel__sublink:focus-visible,
    body.sf-hdr .sf-mpanel .sf-hdr-login:focus-visible,
    body.sf-hdr .sf-mpanel__close:focus-visible {
        outline: 2px solid var(--sf-color-ink-inverse);
        outline-offset: 0;
    }

    /* Menu button as close button: the bars become an X (two 22px lines). */
    body.sf-hdr .sf-hdr-menu[aria-expanded="true"] .sf-hdr-menu__bars {
        background: transparent;
    }

    body.sf-hdr .sf-hdr-menu[aria-expanded="true"] .sf-hdr-menu__bars::before,
    body.sf-hdr .sf-hdr-menu[aria-expanded="true"] .sf-hdr-menu__bars::after {
        top: 0;
        left: 2px;
        width: 22px;
        background: var(--sf-color-ink-inverse);
    }

    body.sf-hdr .sf-hdr-menu[aria-expanded="true"] .sf-hdr-menu__bars::before {
        transform: rotate(45deg);
    }

    body.sf-hdr .sf-hdr-menu[aria-expanded="true"] .sf-hdr-menu__bars::after {
        transform: rotate(-45deg);
    }
}

/*
 * A phone turned sideways (viewport height below 30rem, still under 48rem
 * wide): 124px of fixed header would take a third of the screen, so only the
 * 64px bar stays; the search row scrolls away with the page. The menu panel
 * then starts under the bar (chrome.js uses the row's position while it is
 * still on screen).
 */
@media (max-width: 47.99rem) and (max-height: 29.99rem) {
    body.sf-hdr .sf-msearch {
        position: static;
    }

    html:has(body.sf-hdr) {
        scroll-padding-top: 64px;
    }

    body.sf-hdr .sf-mpanel {
        top: 64px;
    }
}

@media (max-width: 47.99rem) and (prefers-reduced-motion: reduce) {
    body.sf-hdr .sf-mpanel,
    body.sf-hdr .sf-mpanel.is-open,
    body.sf-hdr .sf-mpanel:target {
        transition: none;
    }
}

/* ------------------------------------------------------------------------
 * Below the footer (all widths). On pages shorter than the window, Gantry's
 * page wrapper (#g-page-surround, min-height 100%, its own grey on most
 * pages) leaves a band under the footer. The footer paints color/ground/
 * inverse down over that band with a pseudo-element, 100vh tall and clipped
 * by the wrapper's overflow, so on pages that fill the window it is not
 * visible and the page height does not change. Nothing above the footer is
 * touched, so no page that relies on its grey background changes.
 * --------------------------------------------------------------------- */

body.sf-chrome #g-footer {
    position: relative;
}

body.sf-chrome #g-footer::after {
    content: "";
    position: absolute;
    /* Starts 1px inside the footer so no sub-pixel seam shows between them. */
    top: calc(100% - 1px);
    right: 0;
    left: 0;
    height: 100vh;
    background: var(--sf-color-ground-inverse);
    pointer-events: none;
}

/* ------------------------------------------------------------------------
 * Footer, 48rem and up (Figma Footer, Platform=Desktop 393:852). The mobile
 * footer (Platform=Mobile 393:866) is the last section of this file.
 *
 * The footer is the four Gantry particles in one grid: logo, copyright,
 * links (a list) and Back to top. Figma (1440 wide, transparent on the page
 * ground color/ground/inverse): padding 141 top / 80 sides / 40 bottom, 28
 * between items. Logo bounding box 144 wide, rotation -7 (7deg clockwise),
 * three drop shadows. "(c) Sible 2025 - 2026" in Desktop/Body. Link rows in
 * Desktop/Body Emphasis, 48 apart in a row, 24 between rows, four on the
 * first row and two on the second, then 127 to "Back to top" (with an arrow,
 * where Gantry draws a chevron icon).
 *
 * The footer paints color/ground/inverse itself so it looks the same on every
 * page, whatever ground the page has. Link states are not in Figma: hover
 * and keyboard focus reuse the header Nav Link treatment (1.5px underline,
 * 2px focus outline).
 *
 * Gantry's footer links are absolute production URLs set in its particle
 * config; see the deploy notes.
 * --------------------------------------------------------------------- */

@media (min-width: 48rem) {
    body.sf-chrome #g-footer {
        padding: 0;
        color: var(--sf-color-ink-inverse);
        background: var(--sf-color-ground-inverse);
    }

    body.sf-chrome #g-footer > .g-container {
        width: auto;
        max-width: 1440px;
        margin: 0 auto;
        /* Content vertically centred (review 2026-10-06; Figma has 141 / 40), then 15px less below it (designer, 2026-10-09). Tablet: 9px more on top, since the rotated logo extends that far above its box. */
        padding: 66px var(--sf-space-lg) 42px;
    }

    /* Tablet (48rem to 75rem): logo, copyright and Back to top on the first row, links below. */
    body.sf-chrome #g-footer .g-grid {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: var(--sf-space-lg) 28px;
        margin: 0;
    }

    body.sf-chrome #g-footer .g-block {
        flex: 0 0 auto;
        width: auto;
        max-width: none;
        min-width: 0;
        margin: 0;
        padding: 0;
    }

    body.sf-chrome #g-footer .g-content {
        margin: 0;
        padding: 0;
    }

    /* Logo: Gantry prints max-height: 80px inline, so the Figma size comes from scale(). */
    body.sf-chrome #g-footer .g-block:nth-child(1) {
        order: 1;
    }

    body.sf-chrome #g-footer .g-logo {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 144px;
        height: 119px;
        margin: 0;
        padding: 0;
        line-height: 0;
    }

    body.sf-chrome #g-footer .g-logo img {
        display: block;
        flex: none;
        width: auto;
        height: 80px;
        transform: rotate(7deg) scale(1.525);
        filter:
            drop-shadow(0 2px 6px rgba(0, 0, 0, 0.1))
            drop-shadow(0 0 2px rgba(0, 0, 0, 0.08))
            drop-shadow(0 0 0 rgba(0, 0, 0, 0.2));
    }

    body.sf-chrome #g-footer .g-block:nth-child(2) {
        order: 2;
        flex: 1 1 0;
    }

    body.sf-chrome #g-footer .g-copyright {
        margin: 0;
        padding: 0;
        color: var(--sf-color-ink-inverse);
        font: var(--sf-type-desktop-body);
        text-transform: none;
        white-space: nowrap;
    }

    body.sf-chrome #g-footer .g-block:nth-child(4) {
        order: 3;
    }

    body.sf-chrome #g-footer .g-block:nth-child(3) {
        order: 4;
        flex: 1 1 100%;
    }

    /*
     * 580px wide (Figma's 571 plus slack for font metrics) so the links always
     * wrap the same way, four then two, instead of five then one or four then
     * two depending on the window width and scrollbar.
     */
    body.sf-chrome #g-footer .g-horizontalmenu {
        display: flex;
        flex-wrap: wrap;
        gap: var(--sf-space-lg) var(--sf-space-2xl);
        max-width: 580px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    /* flex: the item is exactly as tall as its link, not Gantry's inherited line box. */
    body.sf-chrome #g-footer .g-horizontalmenu li {
        display: flex;
        margin: 0;
        padding: 0;
    }

    body.sf-chrome #g-footer .g-horizontalmenu a,
    body.sf-chrome #g-footer .g-totop a {
        display: inline-block;
        margin: 0;
        padding: 0;
        color: var(--sf-color-ink-inverse);
        font: var(--sf-type-desktop-body-emphasis);
        letter-spacing: 0;
        text-transform: none;
        text-decoration-line: underline;
        text-decoration-color: transparent;
        text-decoration-thickness: 1.5px;
        text-underline-offset: 4px;
        white-space: nowrap;
        border-radius: 4px;
        transition-property: color, text-decoration-color;
    }

    body.sf-chrome #g-footer .g-horizontalmenu a:hover,
    body.sf-chrome #g-footer .g-totop a:hover {
        color: var(--sf-color-ink-inverse);
        text-decoration-color: currentColor;
    }

    body.sf-chrome #g-footer .g-horizontalmenu a:focus,
    body.sf-chrome #g-footer .g-totop a:focus {
        outline: none;
    }

    body.sf-chrome #g-footer .g-horizontalmenu a:focus-visible,
    body.sf-chrome #g-footer .g-totop a:focus-visible {
        outline: 2px solid var(--sf-color-ink-inverse);
        outline-offset: 4px;
    }

    /* Back to top: the arrow replaces Gantry's chevron icon. */
    body.sf-chrome #g-footer .g-totop {
        margin: 0;
        padding: 0;
        text-align: left;
    }

    body.sf-chrome #g-footer .g-totop i {
        display: none;
    }

    body.sf-chrome #g-footer .g-totop a::after {
        content: " \2191";
    }
}

/* 75rem and up: the Figma single row. */
@media (min-width: 75rem) {
    body.sf-chrome #g-footer > .g-container {
        /* Content centred in 310px: (310 - 119) / 2 above and below; then 15px less below it (designer, 2026-10-09): 95.5 above, 80.5 below. */
        padding: 95.5px 80px 80.5px;
    }

    body.sf-chrome #g-footer .g-grid {
        flex-wrap: nowrap;
        min-height: 119px;
    }

    body.sf-chrome #g-footer .g-block:nth-child(2) {
        flex: 0 0 231px;
    }

    /* Two rows of links: four, then two (571 wide in Figma; a little slack for font metrics). */
    body.sf-chrome #g-footer .g-block:nth-child(3) {
        order: 3;
        flex: 0 1 580px;
    }

    /* 127 from the link rows, and 46 in from the content edge (Figma's frame overflows 54px). */
    body.sf-chrome #g-footer .g-block:nth-child(4) {
        order: 4;
        margin-left: auto;
    }
}

@media (min-width: 87.5rem) {
    body.sf-chrome #g-footer .g-block:nth-child(4) {
        margin-right: 46px;
    }
}

/* ------------------------------------------------------------------------
 * Footer, below 48rem (Figma Footer, Platform=Mobile 393:866, 402 wide, on
 * color/ground/inverse): padding 40 top / 20 sides / 36 bottom, 20 between
 * blocks. Logo mark (bounding box 58 x 55, rotation -7, so 7deg clockwise,
 * with the desktop logo's drop shadows). Then the six links stacked, 13
 * apart, in Mobile/Body. Then a 1px rule in color/ink/inverse. Then one row:
 * "(c) Sible 2025 - 2026" left and "Back to top" with an arrow right, both
 * Mobile/Caption.
 *
 * The same four Gantry particles as the desktop footer, placed with a grid:
 * logo, links, the rule (a pseudo-element, since Gantry has no element for
 * it), then copyright and Back to top side by side. Link hit areas are
 * taller than the text (padding offset by negative margins) without moving
 * anything, for touch.
 * --------------------------------------------------------------------- */

@media (max-width: 47.99rem) {
    body.sf-chrome #g-footer {
        padding: 0;
        color: var(--sf-color-ink-inverse);
        background: var(--sf-color-ground-inverse);
    }

    body.sf-chrome #g-footer > .g-container {
        width: auto;
        max-width: none;
        margin: 0;
        padding: 40px 20px 21px; /* 15px less below the content than before (designer, 2026-10-09) */
    }

    body.sf-chrome #g-footer .g-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "logo logo"
            "links links"
            "rule rule"
            "copy top";
        gap: 20px 10px;
        align-items: center;
        margin: 0;
    }

    body.sf-chrome #g-footer .g-grid::before {
        content: "";
        grid-area: rule;
        height: 1px;
        background: var(--sf-color-ink-inverse);
    }

    body.sf-chrome #g-footer .g-block {
        width: auto;
        max-width: none;
        min-width: 0;
        margin: 0;
        padding: 0;
    }

    body.sf-chrome #g-footer .g-block:nth-child(1) {
        grid-area: logo;
    }

    body.sf-chrome #g-footer .g-block:nth-child(2) {
        grid-area: copy;
    }

    body.sf-chrome #g-footer .g-block:nth-child(3) {
        grid-area: links;
    }

    body.sf-chrome #g-footer .g-block:nth-child(4) {
        grid-area: top;
    }

    body.sf-chrome #g-footer .g-content {
        margin: 0;
        padding: 0;
    }

    /*
     * Logo: 49px tall is under Gantry's inline max-height: 80px, so no scaling
     * is needed. Made 5% larger than Figma on review (2026-10-06); the box
     * stays 58 x 55 so the layout below it does not move.
     */
    body.sf-chrome #g-footer .g-logo {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 58px;
        height: 55px;
        margin: 0;
        padding: 0;
        line-height: 0;
    }

    body.sf-chrome #g-footer .g-logo img {
        display: block;
        flex: none;
        width: auto;
        height: calc(49px * 1.05);
        transform: rotate(7deg);
        filter:
            drop-shadow(0 2px 6px rgba(0, 0, 0, 0.1))
            drop-shadow(0 0 2px rgba(0, 0, 0, 0.08))
            drop-shadow(0 0 0 rgba(0, 0, 0, 0.2));
    }

    body.sf-chrome #g-footer .g-horizontalmenu {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 13px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    body.sf-chrome #g-footer .g-horizontalmenu li {
        display: flex;
        margin: 0;
        padding: 0;
    }

    body.sf-chrome #g-footer .g-copyright {
        margin: 0;
        padding: 0;
        color: var(--sf-color-ink-inverse);
        font: var(--sf-type-mobile-caption);
        text-align: left;
        text-transform: none;
        white-space: nowrap;
    }

    body.sf-chrome #g-footer .g-horizontalmenu a,
    body.sf-chrome #g-footer .g-totop a {
        display: inline-block;
        margin: 0;
        padding: 0;
        color: var(--sf-color-ink-inverse);
        letter-spacing: 0;
        text-transform: none;
        text-decoration-line: underline;
        text-decoration-color: transparent;
        text-decoration-thickness: 1.5px;
        text-underline-offset: 4px;
        border-radius: 4px;
        transition-property: color, text-decoration-color;
    }

    body.sf-chrome #g-footer .g-horizontalmenu a {
        padding-block: 6px;
        margin-block: -6px;
        font: var(--sf-type-mobile-body);
    }

    body.sf-chrome #g-footer .g-totop a {
        padding-block: 10px;
        margin-block: -10px;
        font: var(--sf-type-mobile-caption);
        white-space: nowrap;
    }

    body.sf-chrome #g-footer .g-horizontalmenu a:hover,
    body.sf-chrome #g-footer .g-totop a:hover {
        color: var(--sf-color-ink-inverse);
        text-decoration-color: currentColor;
    }

    body.sf-chrome #g-footer .g-horizontalmenu a:focus,
    body.sf-chrome #g-footer .g-totop a:focus {
        outline: none;
    }

    body.sf-chrome #g-footer .g-horizontalmenu a:focus-visible,
    body.sf-chrome #g-footer .g-totop a:focus-visible {
        outline: 2px solid var(--sf-color-ink-inverse);
        outline-offset: 2px;
    }

    /* Flex: no inherited 32px line box around the link, so the row is the Figma 21px. */
    body.sf-chrome #g-footer .g-totop {
        display: flex;
        justify-content: flex-end;
        margin: 0;
        padding: 0;
    }

    body.sf-chrome #g-footer .g-totop i {
        display: none;
    }

    body.sf-chrome #g-footer .g-totop a::after {
        content: " \2191";
    }
}

/* ------------------------------------------------------------------------
 * Search suggestions (1.3.0, chrome.js): the dropdown under the header
 * search field (48rem and up) and under the phone search row. Not in Figma;
 * built from the sort menus' tokens: color/ground/inverse panel, 1px
 * color/line-default border, radius/md, each row color/ground/nav when
 * chosen. Group headings and the vendor and price line in Label Mono,
 * names in Mobile/Body. Thumbnails 44 (vendors round, as on their cards).
 * --------------------------------------------------------------------- */

body.sf-hdr .sf-suggest {
    position: absolute;
    z-index: 5;
    top: calc(100% + 10px);
    right: 0;
    box-sizing: border-box;
    width: min(380px, calc(100vw - 32px));
    max-height: min(70vh, 560px);
    margin: 0;
    padding: var(--sf-space-xs) 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    color: var(--sf-color-ink-inverse);
    font: var(--sf-type-mobile-body);
    text-align: left;
    background: var(--sf-color-ground-inverse);
    border: 1px solid var(--sf-color-line-default);
    border-radius: var(--sf-radius-md);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

body.sf-hdr .sf-suggest[hidden] {
    display: none;
}

body.sf-hdr .sf-suggest__hd {
    padding: var(--sf-space-xs) var(--sf-space-md) var(--sf-space-2xs);
    color: var(--sf-color-line-default);
    font: var(--sf-type-mobile-label-mono);
    letter-spacing: var(--sf-tracking-label-mono);
    text-transform: uppercase;
}

body.sf-hdr .sf-suggest .sf-suggest__opt {
    display: flex;
    align-items: center;
    gap: var(--sf-space-sm);
    min-height: 44px;
    padding: var(--sf-space-xs) var(--sf-space-md);
    color: var(--sf-color-ink-inverse);
    text-decoration: none;
}

body.sf-hdr .sf-suggest .sf-suggest__opt:hover,
body.sf-hdr .sf-suggest .sf-suggest__opt.is-active {
    color: var(--sf-color-ink-inverse);
    background: var(--sf-color-ground-nav);
}

/* The option chosen with the arrow keys: the fill alone is too close to the panel to see, so it is outlined too. */
body.sf-hdr .sf-suggest .sf-suggest__opt.is-active {
    outline: 2px solid var(--sf-color-ink-inverse);
    outline-offset: -2px;
}

body.sf-hdr .sf-suggest__thumb {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    overflow: hidden;
    color: var(--sf-color-ground-cream);
    font: var(--sf-type-mobile-body-emphasis);
    background: var(--sf-color-ground-nav);
    border-radius: var(--sf-radius-sm);
}

body.sf-hdr .sf-suggest__opt--vendor .sf-suggest__thumb {
    border-radius: 50%;
}

body.sf-hdr .sf-suggest__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.sf-hdr .sf-suggest__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

body.sf-hdr .sf-suggest__name,
body.sf-hdr .sf-suggest__meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.sf-hdr .sf-suggest__name {
    font: var(--sf-type-mobile-body);
    line-height: 1.25;
}

body.sf-hdr .sf-suggest__meta {
    color: var(--sf-color-line-default);
    font: var(--sf-type-mobile-label-mono);
}

body.sf-hdr .sf-suggest .sf-suggest__opt--all {
    margin-top: var(--sf-space-xs);
    padding-top: var(--sf-space-sm);
    font: var(--sf-type-desktop-link-mono);
    border-top: 1px solid var(--sf-color-line-strong);
}

body.sf-hdr .sf-suggest__none {
    margin: 0;
    padding: var(--sf-space-sm) var(--sf-space-md);
    color: var(--sf-color-line-default);
    font: var(--sf-type-mobile-body-italic);
}

body.sf-hdr .sf-suggest__status {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

/*
 * 48rem and up: the header paints before the page below it, so while the
 * dropdown is open the navigation section is lifted above the page content.
 */
@media (min-width: 48rem) {
    body.sf-hdr #g-navigation:has(.sf-suggest:not([hidden])) {
        position: relative;
        z-index: 120;
    }
}

/* Phones: the dropdown spans the search row and scrolls inside itself, never past the bottom of the screen. */
@media (max-width: 47.99rem) {
    body.sf-hdr .sf-msearch .sf-suggest {
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        width: auto;
        max-height: calc(100vh - 124px - 24px);
        max-height: calc(100dvh - 124px - 24px);
    }
}
