/* Shared navigation geometry for all MangoConnect pages. */
body .site-chrome { position:sticky; top:0; z-index:100; background:var(--cream,#fdf8f2); }
body .site-header { gap:12px; }
body .site-header .brand-cluster { align-items:center; flex-shrink:0; }
body .site-header .brand { align-self:center; }
body .site-header .lang-switcher { gap:0; }
body .site-header .lang-switcher .lang { box-sizing:border-box; display:grid; place-items:center; width:40px; height:44px; padding:0; border:0; outline:0; box-shadow:none; position:relative; }
body .site-header .lang-switcher .lang img { display:block; width:30px; height:30px; object-fit:contain; }
body .site-header .lang-switcher .lang-active::after { content:""; position:absolute; inset:6px 4px; border:1px solid var(--mango-deep,#a44718); border-radius:50%; pointer-events:none; }
body .top-bar-inner { gap:0; }
body .top-bar-inner { flex-wrap:nowrap; white-space:nowrap; }
body .top-bar-inner a { position:relative; flex:none; padding-inline:8px; }
body .top-bar-inner a + a::before { content:""; position:absolute; inset-inline-start:0; top:50%; transform:translateY(-50%); height:14px; border-inline-start:1px solid #cdb8a6; }
body .site-header .site-nav { gap:14px; }
body .site-header .site-search-trigger { margin-left:0; }
body .site-header .header-home { padding:8px 12px; border:1px solid var(--line,#ecdcca); border-radius:10px; background:#fff; min-height:44px; box-sizing:border-box; display:inline-flex; align-items:center; }
body .mobile-menu-backdrop { z-index:110; }
body .mobile-menu-panel { z-index:120; }
.mobile-menu-primary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; border-bottom:1px solid #ecdcca; padding-bottom:12px; margin-bottom:12px; }
@media (min-width:641px) {
 body .site-header .site-nav { display:flex; flex-wrap:wrap; align-items:center; margin-left:auto; }
}
@media (max-width:640px) {
 body .site-chrome .top-bar { display:none; }
 body .site-header { padding:12px 16px; }
 body .site-header .site-nav, body .site-header .header-cta { display:none; }
 body .site-header .site-search-trigger { flex-basis:100%; }
}

/* Keep utility actions together while the primary navigation wraps independently. */
body .site-header { display:grid; grid-template-columns:auto minmax(0,1fr) auto; padding:8px 20px; align-items:center; }
body .site-header .brand-cluster { gap:0; }
body .site-header .site-nav { justify-content:flex-end; margin-left:0; gap:4px 12px; }
body .site-header .header-actions { display:flex; gap:4px; align-items:center; }
body .site-header .header-actions > * { display:inline-grid; place-items:center; width:44px; height:44px; min-height:44px; padding:0; margin:0; flex:none; border:1px solid var(--line,#ecdcca); border-radius:10px; background:#fff; color:var(--ink,#241a12); }
.header-actions svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
body .top-bar-inner { padding-block:2px; align-items:center; }
/* Links are 28px tall; without flex centring the 12px text sat at the top. */
body .top-bar-inner a { min-height:28px; line-height:1.3; display:inline-flex; align-items:center; }
html { scroll-padding-top:calc(var(--site-chrome-height, 160px) + 16px); }
body main [id] { scroll-margin-top:16px !important; }
@media (max-width:900px) {
 body .site-chrome .top-bar, body .site-header .site-nav { display:none; }
 body .site-header { grid-template-columns:minmax(0,1fr) 44px 92px; gap:4px 6px; padding:8px 12px; }
 body .site-header .brand-cluster { display:contents; }
 body .site-header .brand { grid-column:1; grid-row:1; justify-self:start; gap:6px; }
 body .site-header .brand-mark { width:30px; height:30px; }
 body .site-header .brand strong { font-size:16px; }
 body .site-header .brand small { font-size:10px; }
 body .site-header .lang-switcher { grid-column:1 / -1; grid-row:2; justify-self:center; }
 body .site-header .mobile-menu-trigger { display:grid; place-items:center; grid-column:2; grid-row:1; width:44px; height:44px; margin:0; padding:0; border:1px solid var(--line,#ecdcca); border-radius:10px; background:#fff; }
 body .site-header .mobile-menu-trigger svg { width:21px; height:21px; stroke:currentColor; stroke-width:2; }
 body .site-header .header-actions { grid-column:3; grid-row:1; }
}

body .site-header .site-nav .header-cta { color:#fff; }

body .site-header .site-nav .header-cta { width:44px; height:44px; min-height:44px; padding:0; margin:0; display:inline-grid; place-items:center; flex:none; }
body .site-header .header-cta svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }

/* Keep utility links out of the header row when the full navigation no longer fits. */
@media (max-width:1200px) {
 body .site-chrome .top-bar, body .site-header .site-nav, body .site-header .header-cta { display:none; }
 body .site-header { grid-template-columns:minmax(0,1fr) 44px 92px; gap:4px 6px; padding:8px 12px; }
 body .site-header .brand-cluster { display:contents; }
 body .site-header .brand { grid-column:1; grid-row:1; justify-self:start; gap:6px; }
 body .site-header .brand-mark { width:30px; height:30px; }
 body .site-header .brand strong { font-size:16px; }
 body .site-header .brand small { font-size:10px; }
 body .site-header .lang-switcher { grid-column:1 / -1; grid-row:2; justify-self:center; }
 body .site-header .mobile-menu-trigger { display:grid; place-items:center; grid-column:2; grid-row:1; width:44px; height:44px; margin:0; padding:0; border:1px solid var(--line,#ecdcca); border-radius:10px; background:#fff; }
 body .site-header .mobile-menu-trigger svg { width:21px; height:21px; stroke:currentColor; stroke-width:2; }
 body .site-header .header-actions { grid-column:3; grid-row:1; }
}

/* The mobile menu is a compact list of links, not one full-width colored block. */
body .mobile-menu-panel .mobile-menu-primary { display:grid; grid-template-columns:minmax(0,1fr); gap:0; width:auto; margin:0; padding:0 0 10px; border-bottom:1px solid var(--line,#ecdcca); background:transparent; }
body .mobile-menu-panel .mobile-menu-primary > a { justify-content:flex-start; min-width:0; min-height:36px; padding:4px 0; border:0; border-radius:0; background:transparent; color:var(--ink,#241a12); font-size:15px; text-align:left; }
body .mobile-menu-panel .mobile-menu-legal { display:grid; grid-template-columns:minmax(0,1fr); gap:0; padding-top:0; border-top:0; }
body .mobile-menu-panel .mobile-menu-legal > a { justify-content:flex-start; min-width:0; min-height:36px; padding:4px 0; border:0; border-radius:0; background:transparent; font-size:14px; line-height:1.25; text-align:left; }

@media (min-width:901px) and (max-width:1200px) {
 body .mobile-menu-backdrop { position:fixed; inset:0; border:0; background:rgba(26,21,16,.28); }
 body .mobile-menu-panel { position:fixed; top:12px; right:12px; left:12px; display:grid; gap:10px; max-height:calc(100vh - 24px); overflow-y:auto; padding:16px; border:1px solid var(--line,#ecdcca); border-radius:16px; background:#fff; box-shadow:0 8px 24px rgba(26,21,16,.18); }
 body .mobile-menu-panel a { display:flex; align-items:center; min-height:36px; padding:4px 0; border:0; border-radius:0; color:var(--ink,#241a12); font-weight:600; text-decoration:none; }
}

@media (min-width:901px) {
 body .site-footer > nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 28px; max-width:600px; }
 body .site-footer > nav a { min-height:26px; line-height:1.35; overflow-wrap:anywhere; }
}

/* One header geometry on every page. Page stylesheets set different body
   line-heights, weights and header widths, so both bars shifted between pages;
   these values are the home page's. */
/* A fixed width, not var(--maxw): FAQ and Security narrow --maxw for their text column. */
body .site-chrome .site-header { max-width:1120px; margin-inline:auto; }
body .site-chrome .brand-cluster { display:flex; flex-direction:column; align-items:center; gap:0; }
body .site-chrome .brand strong { font-size:18px; line-height:1.55; font-weight:800; }
body .site-chrome .brand small { display:block; font-size:11px; line-height:1.55; }
body .site-chrome .lang-switcher { margin-left:0; }
body .site-chrome .top-bar-inner a { font-size:12px; font-weight:600; }
body .site-chrome .site-nav a { font-size:14px; font-weight:600; }

/* The contact button is part of the header on every page. integrations.css
   hid it and only some pages styled it, so it appeared on some pages only. */
@media (min-width:1201px) {
 body .site-header .header-cta { display:inline-grid; place-items:center; width:44px; height:44px; min-height:44px; padding:0; margin:0; border-radius:10px; background:var(--mango,#d86c2d); color:#fff; text-decoration:none; }
 body .site-header .header-cta:hover { background:var(--mango-deep,#b8531d); }
}

/* Larger brand mark from tablet width up; phones keep the compact 40px header. */
@media (min-width:641px) {
 body .site-chrome .brand-mark { width:52px; height:52px; }
}

/* The language row is never wider than the brand: the brand sets the cluster
   width and the six flags spread across it. */
body .site-chrome .brand-cluster { align-items:stretch; width:max-content; }
body .site-chrome .lang-switcher { display:flex; justify-content:space-between; gap:0; width:100%; min-width:0; margin:4px 0 0; padding:0; }
body .site-chrome .lang-switcher .lang { display:grid; place-items:center; width:28px; height:28px; min-width:0; min-height:0; padding:2px; flex:none; }
body .site-chrome .lang-switcher .lang img { display:block; width:22px; height:22px; object-fit:contain; }

/* Phone language switcher: current flag beside the logo plus a chevron menu
   (public/lang-menu.js). */
body .site-chrome .lang-toggle, body .site-chrome .lang-menu { display:none; }
@media (max-width:640px) {
 body .site-chrome .brand-cluster { flex-direction:row; align-items:center; width:auto; gap:6px; }
 body .site-chrome .lang-switcher { position:relative; width:auto; margin:0; gap:0; align-items:center; }
 body .site-chrome .lang-switcher .lang:not(.lang-active) { display:none; }
 body .site-chrome .lang-toggle { display:grid; place-items:center; width:22px; height:44px; padding:0; border:0; background:transparent; color:var(--ink-soft,#5c5045); cursor:pointer; }
 body .site-chrome .lang-toggle svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; transition:transform .15s; }
 body .site-chrome .lang-toggle[aria-expanded="true"] svg { transform:rotate(180deg); }
 body .site-chrome .lang-menu { position:absolute; top:calc(100% + 4px); left:0; z-index:70; display:grid; min-width:180px; padding:6px; border:1px solid var(--line,#ecdcca); border-radius:12px; background:#fff; box-shadow:0 8px 24px rgba(26,21,16,.18); }
 body .site-chrome .lang-menu[hidden] { display:none; }
 body .site-chrome .lang-menu-item { display:flex; align-items:center; gap:10px; min-height:44px; padding:0 10px; border-radius:8px; color:var(--ink,#241a12); font:600 15px/1.2 "Nunito",system-ui,sans-serif; text-decoration:none; }
 body .site-chrome .lang-menu-item img { width:22px; height:22px; }
 body .site-chrome .lang-menu-item.is-current { background:var(--cream,#fdf8f2); }
 /* Keep the subtitle on one line beside the flag, so the header height does not change between languages. */
 body .site-chrome .brand { gap:8px; }
 body .site-chrome .brand-mark { width:36px; height:36px; }
 body .site-chrome .brand small { font-size:10px; white-space:nowrap; }
}
