/* Compact desktop categories. Existing mobile navigation and other menu styles stay scoped out. */
.site-header .rb-expand__close { display:none; }
@media (min-width:768px) {
  /* Shared open highlight for every expandable menu, in either header row. */
  .site-header .col-nav .nav-item.is-active:has([data-menu-expandable]) > .nav-btn {
    background:#e8f5ee!important; color:#086443!important; border-radius:6px;
  }
  /* Closing returns focus to the trigger. Use the existing underline, not a box,
     so keyboard users retain a visible focus cue after Escape and while tabbing. */
  .site-header .col-nav .nav-item:has([data-menu-expandable]) > .nav-btn:focus-visible {
    outline:none!important; box-shadow:none!important;
  }
  .site-header .col-nav .nav-item:has([data-menu-expandable]) > .nav-btn:focus-visible::after {
    transform:scaleX(1); background:#087c56;
  }
  /* Compact top spacing; reserve a right-hand gutter for the close control. */
  .site-header .col-nav .mm-inner-container.rb-expandable-shell {
    position:relative; box-sizing:border-box; padding-top:12px; padding-right:60px;
  }
  .site-header .col-nav .rb-expandable-shell > .rb-expand__close {
    position:absolute; top:6px; right:12px; z-index:2;
    display:grid; place-items:center; box-sizing:border-box;
    width:36px; height:36px; margin:0; padding:0;
    border:1px solid #dbe8e1; border-radius:50%;
    background:#f5faf7; color:#315b45; font-family:inherit;
    font-size:26px; font-weight:400; line-height:1; cursor:pointer;
  }
  .site-header .col-nav .rb-expandable-shell > .rb-expand__close:hover { background:#e8f5ee; color:#086443; }
  .site-header .col-nav .rb-expandable-shell > .rb-expand__close:focus-visible { outline:2px solid #087c56; outline-offset:2px; }
  /* A five-group menu uses the full host when expanded, even with the legacy header styles loaded later. */
  .site-header .col-nav .mm-grid.mm-grid--five.rb-expandable-host,
  .site-header .col-nav .mm-grid.rb-expandable-host { display:block; min-width:0; }
  .site-header .mm-inner-container:has(> .rb-expandable-host) { max-width:1280px; }
  .site-header .col-nav .rb-menu-promo-layout:has(> .rb-expandable-host) {
    grid-template-columns:minmax(0,1fr) minmax(210px,260px); gap:24px;
  }
  .site-header .rb-expand { display:grid; grid-template-columns:228px minmax(0,1fr); gap:24px; align-items:start; }
  .site-header .rb-expand__rail { display:flex; flex-direction:column; gap:3px; min-width:0; border-right:1px solid #e2ebe7; padding-right:16px; }
  .site-header .rb-expand__eyebrow { display:block; color:#71837b; font-size:10px; line-height:1.5; font-weight:700; letter-spacing:.09em; text-transform:uppercase; margin:0 10px 10px; }
  .site-header .rb-expand__direct,.site-header .rb-expand__tab {
    display:flex; width:100%; align-items:center; gap:9px; box-sizing:border-box;
    min-height:38px; margin:0; padding:9px 10px; border:0; border-radius:6px;
    background:transparent; color:#30483e; font-family:inherit;
    font-size:13px; font-weight:600; line-height:1.4; text-align:left; text-decoration:none; cursor:pointer;
  }
  .site-header .rb-expand__direct { font-weight:500; }
  .site-header .rb-expand__direct.is-emphasized { color:#11694c; font-weight:600; }
  .site-header .rb-expand__label { flex:1; min-width:0; overflow-wrap:anywhere; }
  .site-header .rb-expand__tab { display:none; }
  .site-header .rb-expand[data-enhanced] .rb-expand__tab { display:flex; }
  .site-header .rb-expand[data-enhanced] .rb-expand__tab[aria-expanded="true"] { background:#e8f5ee; color:#086443; box-shadow:inset 3px 0 #20865f; }
  .site-header .rb-expand__direct:hover,.site-header .rb-expand__tab:hover { background:#f0f6f3; color:#076a49; }
  .site-header .rb-expand__direct:focus-visible,.site-header .rb-expand__tab:focus-visible,.site-header .rb-expand__links a:focus-visible { outline:2px solid #087c56; outline-offset:2px; }
  .site-header .rb-expand__content { min-width:0; padding-top:1px; container-type:inline-size; container-name:rb-menu-links; }
  .site-header .rb-expand.rb-expand--links-only { grid-template-columns:minmax(0,1fr); }
  .site-header .rb-expand--links-only .rb-expand__rail { border-right:0; max-width:320px; padding-right:0; }
  .site-header .rb-expand__panel { margin:0 0 18px; }
  .site-header .rb-expand[data-enhanced] .rb-expand__panel { margin-bottom:0; }
  .site-header .rb-expand__panel[hidden] { display:none!important; }
  .site-header .rb-expand__heading { margin:0 0 9px 8px; color:#203f32; font-weight:700; font-size:15px; line-height:1.4; font-family:inherit; letter-spacing:-.01em; }
  .site-header .rb-expand__columns { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; align-items:start; }
  .site-header .rb-expand__columns--2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .site-header .rb-expand__columns--3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .site-header .rb-expand__column { min-width:0; }
  .site-header .rb-expand__links { display:flex; flex-direction:column; gap:2px; list-style:none; padding:0; margin:0; }
  .site-header .rb-expand__links > li { min-width:0; padding:0; margin:0; }
  .site-header .rb-expand__links a {
    display:flex; align-items:center; justify-content:flex-start; gap:9px;
    min-height:36px; box-sizing:border-box; padding:7px 8px; border:0; border-radius:5px;
    color:#344b41; text-decoration:none; font-size:13px; font-weight:400; line-height:1.45;
    overflow-wrap:anywhere;
  }
  .site-header .rb-expand__links a:hover { color:#066c49; background:#f1f7f3; }
  .site-header .rb-expand__links a.is-emphasized { color:#116a4d; font-weight:600; }
  /* A colour follows the icon's subject, including in the selected category. */
  .site-header .rb-expand__icon { display:block; width:18px; height:18px; flex:0 0 18px; color:#16716c; }
  .site-header .rb-expand__icon[data-icon-tone="blue"]   { color:#2166a3; }
  .site-header .rb-expand__icon[data-icon-tone="green"]  { color:#27723f; }
  .site-header .rb-expand__icon[data-icon-tone="violet"] { color:#7942a1; }
  .site-header .rb-expand__icon[data-icon-tone="rose"]   { color:#ae405c; }
  .site-header .rb-expand__icon[data-icon-tone="amber"]  { color:#94600b; }
  .site-header .rb-expand__icon[data-icon-tone="indigo"] { color:#504ea0; }
  .site-header .rb-expand__chevron,.site-header .rb-expand__external { flex-shrink:0; color:#738b7f; }
  .site-header .rb-expand__external { margin-left:1px; }
  .site-header .rb-expand__separator { grid-column:1/-1; color:#6b8074; padding:10px 8px 3px!important; font-size:10px; font-weight:700; letter-spacing:.07em; text-transform:uppercase; }
  .site-header .rb-expand__sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
}
/* Stack whole columns in 1, 2, 3 order as the available link area narrows.
   The far-right promotion remains a separate component, not a navigation column. */
@container rb-menu-links (max-width:640px) {
  .site-header .rb-expand__columns--3 { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@container rb-menu-links (max-width:430px) {
  .site-header .rb-expand__columns { grid-template-columns:minmax(0,1fr); gap:8px; }
  .site-header .rb-expand__column--empty { display:none; }
}
@media (min-width:768px) and (max-width:1100px) {
  .site-header .rb-expand { grid-template-columns:190px minmax(0,1fr); gap:16px; }
  .site-header .rb-expand__rail { padding-right:10px; }
  .site-header .col-nav .rb-menu-promo-layout:has(> .rb-expandable-host) { grid-template-columns:minmax(0,1fr) 210px; gap:16px; }
}
@media (min-width:768px) and (max-width:850px) {
  .site-header .rb-expand { grid-template-columns:174px minmax(0,1fr); gap:12px; }
  .site-header .rb-expand__rail { padding-right:8px; }
  .site-header .rb-expand__direct,.site-header .rb-expand__tab { font-size:12px; padding:8px; }
  .site-header .rb-expand__links a { font-size:12px; }
  .site-header .col-nav .rb-menu-promo-layout:has(> .rb-expandable-host) { grid-template-columns:minmax(0,1fr) 195px; gap:12px; }
}
@supports not (container-type:inline-size) {
  @media (min-width:768px) and (max-width:1100px) {
    .site-header .rb-expand__columns { grid-template-columns:minmax(0,1fr); gap:8px; }
    .site-header .rb-expand__column--empty { display:none; }
  }
}

/* Enhanced categories only. Links keep their existing layout if there is no room
   for a promotion. Visual and keyboard order follow column number. */
.site-header .rb-slot-ad { display:none; }
@media(min-width:768px) {
  .site-header .rb-slot-grid > [data-col="1"] { order:1; }
  .site-header .rb-slot-grid > [data-col="2"] { order:2; }
  .site-header .rb-slot-grid > [data-col="3"] { order:3; }
  .site-header .rb-slot-grid > [data-col="4"] { order:4; }
}
@container rb-menu-links (min-width:190px) {
  .site-header .rb-slot-grid:has(:is([data-cost="1"] > .rb-menu-promo)) { display:grid; grid-template-columns:repeat(1,minmax(0,1fr)); gap:16px; }
  .site-header .rb-slot-grid:has(:is([data-cost="1"] > .rb-menu-promo)) > .rb-expand__column--empty { display:none; }
  .site-header .rb-slot-grid:has(:is([data-cost="1"] > .rb-menu-promo)) > .rb-slot-ad[data-col="4"] { grid-column:-2/-1; grid-row:var(--rb-slot-pinned-row, 1); }
  .site-header .rb-slot-ad[data-cost="1"]:has(> .rb-menu-promo) { display:block; min-width:0; }
}
@container rb-menu-links (min-width:396px) {
  .site-header .rb-slot-grid:has(:is([data-cost="1"] > .rb-menu-promo,[data-cost="2"] > .rb-menu-promo)) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
  .site-header .rb-slot-grid:has(:is([data-cost="1"] > .rb-menu-promo,[data-cost="2"] > .rb-menu-promo)) > .rb-expand__column--empty { display:none; }
  .site-header .rb-slot-grid:has(:is([data-cost="1"] > .rb-menu-promo,[data-cost="2"] > .rb-menu-promo)) > .rb-slot-ad[data-col="4"] { grid-column:-2/-1; grid-row:var(--rb-slot-pinned-row, 1); }
  .site-header .rb-slot-ad[data-cost="2"]:has(> .rb-menu-promo) { display:block; min-width:0; }
}
@container rb-menu-links (min-width:602px) {
  .site-header .rb-slot-grid:has(:is([data-cost="1"] > .rb-menu-promo,[data-cost="2"] > .rb-menu-promo,[data-cost="3"] > .rb-menu-promo)) { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
  .site-header .rb-slot-grid:has(:is([data-cost="1"] > .rb-menu-promo,[data-cost="2"] > .rb-menu-promo,[data-cost="3"] > .rb-menu-promo)) > .rb-expand__column--empty { display:none; }
  .site-header .rb-slot-grid:has(:is([data-cost="1"] > .rb-menu-promo,[data-cost="2"] > .rb-menu-promo,[data-cost="3"] > .rb-menu-promo)) > .rb-slot-ad[data-col="4"] { grid-column:-2/-1; grid-row:var(--rb-slot-pinned-row, 1); }
  .site-header .rb-slot-ad[data-cost="3"]:has(> .rb-menu-promo) { display:block; min-width:0; }
}
@container rb-menu-links (min-width:808px) {
  .site-header .rb-slot-grid:has(:is([data-cost="1"] > .rb-menu-promo,[data-cost="2"] > .rb-menu-promo,[data-cost="3"] > .rb-menu-promo,[data-cost="4"] > .rb-menu-promo)) { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
  .site-header .rb-slot-grid:has(:is([data-cost="1"] > .rb-menu-promo,[data-cost="2"] > .rb-menu-promo,[data-cost="3"] > .rb-menu-promo,[data-cost="4"] > .rb-menu-promo)) > .rb-expand__column--empty { display:none; }
  .site-header .rb-slot-ad[data-cost="4"]:has(> .rb-menu-promo) { display:block; min-width:0; }
  .site-header .rb-slot-grid:has(:is([data-cost="1"] > .rb-menu-promo,[data-cost="2"] > .rb-menu-promo,[data-cost="3"] > .rb-menu-promo,[data-cost="4"] > .rb-menu-promo)) > [data-col="1"] { grid-column:1; grid-row:var(--rb-slot-pinned-row, 1); }
  .site-header .rb-slot-grid:has(:is([data-cost="1"] > .rb-menu-promo,[data-cost="2"] > .rb-menu-promo,[data-cost="3"] > .rb-menu-promo,[data-cost="4"] > .rb-menu-promo)) > [data-col="2"] { grid-column:2; grid-row:var(--rb-slot-pinned-row, 1); }
  .site-header .rb-slot-grid:has(:is([data-cost="1"] > .rb-menu-promo,[data-cost="2"] > .rb-menu-promo,[data-cost="3"] > .rb-menu-promo,[data-cost="4"] > .rb-menu-promo)) > [data-col="3"] { grid-column:3; grid-row:var(--rb-slot-pinned-row, 1); }
  .site-header .rb-slot-grid:has(:is([data-cost="1"] > .rb-menu-promo,[data-cost="2"] > .rb-menu-promo,[data-cost="3"] > .rb-menu-promo,[data-cost="4"] > .rb-menu-promo)) > [data-col="4"] { grid-column:4; grid-row:var(--rb-slot-pinned-row, 1); }
}

/* A category heading belongs with its links. Let ads start on the heading's
   row. Shared tracks keep all first links aligned, even if the heading wraps. */
@media (min-width:768px) {
  .site-header .rb-slot-grid--titled {
    --rb-slot-pinned-row:1 / span 2;
    grid-template-rows:max-content minmax(min-content,1fr);
  }
  .site-header .rb-expand__columns.rb-slot-grid--titled { row-gap:0; }
  .site-header .rb-slot-grid--titled > .rb-slot-ad,
  .site-header .rb-slot-grid--titled > .rb-expand__column {
    grid-row:auto / span 2;
  }
  .site-header .rb-slot-grid--titled > .rb-expand__column:not(.rb-expand__column--empty) {
    display:grid; grid-template-rows:subgrid; align-self:stretch; row-gap:0;
  }
  .site-header .rb-slot-grid--titled > .rb-expand__column > .rb-expand__heading { grid-row:1; }
  .site-header .rb-slot-grid--titled > .rb-expand__column > .rb-expand__links { grid-row:2; align-self:start; }
}

/* Link-first desktop bands. Before measurement or without scripting all links
   remain visible; optional creatives never squeeze a label on first paint. */
@media (min-width:768px) {
  .site-header .rb-pr-grid.rb-expand__columns {
    display:grid; grid-template-columns:var(--rb-pr-tracks,repeat(auto-fit,minmax(min(100%,230px),1fr)));
    column-gap:12px; row-gap:0; align-items:start;
  }
  .site-header .rb-pr-grid + .rb-pr-grid { margin-top:12px; }
  .site-header .rb-pr-grid > .rb-expand__column { min-width:0; }
  .site-header .rb-pr-grid .rb-expand__links a > span:not(.rb-expand__sr-only) {
    min-width:0; white-space:normal; word-break:normal; overflow-wrap:anywhere;
  }
  .site-header .rb-pr-grid.rb-expand__columns > .rb-slot-ad { display:none; }
  .site-header .rb-pr-grid.rb-expand__columns[data-fitted] > .rb-slot-ad[data-ad-fit] {
    display:block; min-width:0; width:100%; justify-self:end;
  }
  .site-header .rb-pr-grid > .rb-slot-ad[data-col="4"] > .rb-menu-promo { margin-inline-start:auto; }
  .site-header .rb-pr-grid .rb-expand__heading { margin-bottom:4px; }
  .site-header .rb-pr-grid .rb-expand__links > .rb-expand__separator:first-child { padding-top:2px!important; }
  @supports (grid-template-rows:subgrid) {
    /* When a promotion spans both rows, give its extra height to the link row.
       A wrapped panel heading still gets its full natural height. */
    .site-header .rb-pr-grid[data-fitted]:has(> .rb-slot-ad[data-ad-fit]) {
      grid-template-rows:max-content minmax(min-content,1fr);
    }
    .site-header .rb-pr-grid[data-fitted] > .rb-expand__column { display:grid; grid-template-rows:subgrid; align-self:stretch; }
    .site-header .rb-pr-grid[data-fitted] .rb-expand__heading { grid-row:1; }
    .site-header .rb-pr-grid[data-fitted] .rb-expand__column > .rb-expand__links { grid-row:2; align-self:start; }
  }
  .site-header .rb-pr-grid[data-measuring] :is(.rb-expand__heading,.rb-expand__links a,.rb-expand__separator) {
    box-sizing:border-box; width:max-content!important; max-width:none!important;
  }
  .site-header .rb-pr-grid[data-measuring] .rb-expand__links a > span:not(.rb-expand__sr-only) { white-space:nowrap; }
}

/* Top desktop row only. The anchors already contain the same chat and sign-in
   glyphs, accessible names and hover titles as the mobile header. */
@media (min-width:768px) {
  .site-header .row-top .header-col-actions > a.rb-header-action[href="/contact"] {
    --rb-quick-ink:#15589a; --rb-quick-bg:#edf6ff; --rb-quick-line:#b8d5ef; --rb-quick-hover:#dcebfc;
  }
  .site-header .row-top .header-col-actions > a.rb-header-action[href="/customer/login"] {
    --rb-quick-ink:#087451; --rb-quick-bg:#eaf8f0; --rb-quick-line:#a8d7bd; --rb-quick-hover:#d5f0e1;
  }
  .site-header .row-top .header-col-actions > a.rb-header-action:is([href="/contact"],[href="/customer/login"]) {
    box-sizing:border-box; flex:0 0 34px; width:34px; min-width:34px; height:34px; min-height:34px;
    padding:0!important; gap:0; border-radius:10px;
    color:var(--rb-quick-ink)!important; background:var(--rb-quick-bg); border-color:var(--rb-quick-line);
  }
  .site-header .row-top .header-col-actions > a.rb-header-action:is([href="/contact"],[href="/customer/login"]) > .bi {
    font-size:17px; line-height:1;
  }
  .site-header .row-top .header-col-actions > a.rb-header-action:is([href="/contact"],[href="/customer/login"]) > .rb-header-action-label {
    display:none;
  }
  .site-header .row-top .header-col-actions > a.rb-header-action:is([href="/contact"],[href="/customer/login"]):is(:hover,:focus-visible) {
    background:var(--rb-quick-hover); border-color:var(--rb-quick-ink);
  }
  .site-header .row-top .header-col-actions > a.rb-header-action:is([href="/contact"],[href="/customer/login"]):focus-visible {
    outline:2px solid currentColor; outline-offset:2px;
  }
}

/* Mark existing isEmphasized links inside the desktop menu's leading padding.
   The marker is decorative and never participates in sizing or hit testing. */
@media (min-width:768px) {
  .site-header .rb-expand a.rb-expand__direct.is-emphasized,
  .site-header .rb-expand .rb-expand__links a.is-emphasized {
    position:relative;
  }
  .site-header .rb-expand a.rb-expand__direct.is-emphasized::before,
  .site-header .rb-expand .rb-expand__links a.is-emphasized::before {
    content:"";
    position:absolute;
    inset-inline-start:1px;
    top:50%;
    transform:translateY(-50%);
    width:0;
    height:14px;
    border-inline-start:3px solid #087c56;
    border-radius:2px;
    pointer-events:none;
  }
}
