/* Site v2 chrome: the shared header and footer. Loads on every page after foundations.css;
   ships in AGI Site Foundations at release (enqueued after foundations.css). */

/* Gutters: at least 16px plus the safe area on the outer wrappers. html body outranks the inlined copy of foundations.css (margin:0 auto), which loads later. */
html body .agi-shared-shell.agi-shared-header-inner,html body .agi-trust-footer .agi-trust-shell{width:auto!important;margin-left:max(22px,env(safe-area-inset-left,0px),(100% - 1480px)/2)!important;margin-right:max(22px,env(safe-area-inset-right,0px),(100% - 1480px)/2)!important}
/* Header (25 Oct): task-first. "What we automate" and "Proof" open panels, so the bar holds six items.
   Panel links stay bare <a href="/x/"> where build_preview.mark_current should flag them. */
.agi-shared-header .v2-nav{gap:4px 22px}
/* Seven items fit the bar from 1024px when the gaps close up below 1200px. */
@media (min-width:1024px) and (max-width:1199px){html body .agi-shared-header .v2-nav{gap:4px 15px}}
/* Labels in sans 15px sentence case; the booking button is the one filled item. */
html body .agi-shared-header .v2-nav>a:not(.agi-shared-nav-cta){font:500 15px/1.3 var(--agi-font-body)!important;letter-spacing:0;text-transform:none}
html body .agi-shared-header .v2-nav>a.agi-shared-nav-cta{margin-left:6px;padding:12px 16px;border-color:#9ce9fa;background:#9ce9fa;color:#061425!important;font:700 14px/1 var(--agi-font-body)!important;letter-spacing:0;text-transform:none}
html body .agi-shared-header .v2-nav>a.agi-shared-nav-cta:hover{background:#d4f6ff;color:#061425!important}
.agi-shared-header .v2-nav-group.is-current>summary{color:#98e9ff;box-shadow:inset 0 -2px 0 #98e9ff}
html.v2-menu-open{overflow:hidden}
.agi-shared-header .v2-nav-group{position:relative}
html body .agi-shared-header .v2-nav-group>summary{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:9px 4px;cursor:pointer;list-style:none;font:500 15px/1.3 var(--agi-font-body)!important;letter-spacing:0;text-transform:none;white-space:nowrap;color:#c6deea}
.agi-shared-header .v2-nav-group>summary::-webkit-details-marker{display:none}
.agi-shared-header .v2-nav-group>summary::after{content:"";width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:translateY(-2px) rotate(45deg);transition:transform .15s}
.agi-shared-header .v2-nav-group[open]>summary::after{transform:translateY(1px) rotate(-135deg)}
.agi-shared-header .v2-nav-group>summary:hover,.agi-shared-header .v2-nav-group[open]>summary,.agi-shared-header .v2-nav-group:has(a[aria-current])>summary{color:#98e9ff}
.agi-shared-header .v2-nav-panel{position:absolute;top:calc(100% + 12px);left:-16px;z-index:99990;display:grid;gap:2px;width:320px;padding:12px;background:#061425;border:1px solid #79c9e05c;box-shadow:0 22px 48px #000a}
.agi-shared-header .v2-nav-panel-wide{width:min(760px,calc(100vw - 48px));grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);gap:0 24px;padding:18px}
.agi-shared-header .v2-nav-col{display:grid;align-content:start;gap:2px}
/* What we automate holds the four tasks only; teams have their own By team panel. */
.agi-shared-header .v2-nav-panel-tasks{width:min(460px,calc(100vw - 48px));padding:18px}
.agi-shared-header .v2-nav-label{margin:0 0 6px;padding:0 10px;font:700 11px/1.4 var(--agi-font-mono,ui-monospace),monospace;letter-spacing:.08em;text-transform:uppercase;color:#7fa3b5}
html body .agi-shared-header .agi-shared-nav .v2-nav-panel a{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:2px;min-height:0;padding:10px;white-space:normal;text-transform:none;letter-spacing:0;font:400 14px/1.45 var(--agi-font-body)!important;color:#a9c3d1!important;border-radius:2px}
html body .agi-shared-header .agi-shared-nav .v2-nav-panel a:hover,html body .agi-shared-header .agi-shared-nav .v2-nav-panel a:focus-visible{background:#0d243a}
.agi-shared-header .v2-nav-panel a strong{font:600 15px/1.3 var(--agi-font-display);letter-spacing:-.01em;color:#f4fbff}
html body .agi-shared-header .agi-shared-nav .v2-nav-panel a[aria-current] strong,html body .agi-shared-header .agi-shared-nav .v2-nav-panel a[aria-current]{color:#98e9ff!important}
html body .agi-shared-header .agi-shared-nav .v2-nav-panel a.v2-nav-task{flex-direction:row;gap:14px}
.agi-shared-header .v2-nav-task>span,.agi-shared-header .v2-sheet-task>span{display:grid;gap:2px}
.agi-shared-header .v2-nav-panel small,.agi-shared-header .v2-sheet small{font:700 11px/1.4 var(--agi-font-mono,ui-monospace),monospace;letter-spacing:.04em;color:#8fdcef}
.agi-shared-header .v2-task-icon{flex:0 0 22px;margin-top:1px;color:#9ce9fa}
.agi-shared-header .v2-nav-foot{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px 28px;margin:12px 0 0;padding:12px 10px 0;border-top:1px solid #79c9e026;font:400 13px/1.5 var(--agi-font-body);color:#a9c3d1}
html body .agi-shared-header .agi-shared-nav .v2-nav-panel a.v2-nav-inline{display:inline;padding:0;font-size:13px!important;color:#9ce9fa!important;text-decoration:underline!important;text-underline-offset:.16em}
html body .agi-shared-header .agi-shared-nav .v2-nav-panel a.v2-nav-inline:hover{background:none}
html body .agi-shared-header .agi-shared-nav .v2-nav-panel a.v2-nav-sub{display:inline-flex;align-self:flex-start;margin:-6px 0 6px 46px;padding:2px 0;font-size:13px!important;color:#9ce9fa!important;text-decoration:underline!important;text-underline-offset:.16em}
html body .agi-shared-header .agi-shared-nav .v2-nav-panel a.v2-nav-sub:hover{background:none}
.agi-shared-header .v2-nav-group:last-of-type .v2-nav-panel{left:auto;right:-16px;width:360px}
.agi-shared-header .v2-nav-panel a strong small{display:inline-block;margin-left:8px;padding:2px 6px;border:1px solid #98e9ff4d;border-radius:4px;font-size:10px!important;text-transform:uppercase;vertical-align:2px}
.agi-shared-header .v2-nav-book{display:none}
.agi-card[id]{scroll-margin-top:110px}
/* Desktop bar from 1024px: Foundations switches to the menu at 1100px, so the preview keeps the bar on between 1024 and 1100. */
@media (min-width:1024px) and (max-width:1100px){
  html body .agi-shared-header .agi-shared-nav-desktop.v2-nav{display:flex!important}
  html body .agi-shared-header .agi-shared-menu{display:none!important}
}
@media (max-width:1023px){
  .agi-shared-header .v2-nav-book{display:inline-flex;align-items:center;min-height:44px;margin-left:auto;padding:10px 14px;background:#9ce9fa;color:#061425!important;font:700 14px/1 var(--agi-font-body);letter-spacing:0;text-transform:none;text-decoration:none;white-space:nowrap}
  html body .agi-shared-header .agi-shared-menu[open] .agi-shared-nav-mobile.v2-sheet{gap:0;max-height:calc(100dvh - 72px);overflow-y:auto;overscroll-behavior:contain;padding-bottom:0}
  /* A sheet taller than the screen scrolls; its rows never shrink into each other. */
  html body .agi-shared-header .agi-shared-menu[open] .agi-shared-nav-mobile.v2-sheet>*{flex-shrink:0}
  .agi-shared-header .v2-sheet-actions{position:sticky;bottom:0;padding:14px 0 18px;background:#061425}
  html body .agi-shared-header .agi-shared-menu[open] .agi-shared-nav-mobile.v2-sheet .v2-nav-label{margin:18px 0 4px;padding:0}
  html body .agi-shared-header .agi-shared-menu[open] .agi-shared-nav-mobile.v2-sheet a.v2-sheet-task{align-items:flex-start;gap:14px;padding:14px 0;font:400 15px/1.45 var(--agi-font-body)!important;letter-spacing:0;color:#a9c3d1!important}
  html body .agi-shared-header .agi-shared-menu[open] .agi-shared-nav-mobile.v2-sheet a.v2-sheet-task strong{font:600 18px/1.25 var(--agi-font-display);color:#f4fbff}
  html body .agi-shared-header .agi-shared-menu[open] .agi-shared-nav-mobile.v2-sheet a::before{content:none}
  .agi-shared-header .v2-sheet-links{margin-top:14px;padding-top:8px;border-top:1px solid #79c9e026;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 18px}
  .agi-shared-header .v2-sheet-links.v2-sheet-teams{margin-top:0;padding-top:0;border-top:0}
  html body .agi-shared-header .agi-shared-menu[open] .agi-shared-nav-mobile.v2-sheet .v2-sheet-links a{min-height:44px;padding:10px 0;font:600 16px/1.3 var(--agi-font-display)!important;letter-spacing:-.01em}
  .agi-shared-header .v2-sheet-actions{display:grid;gap:10px;margin-top:18px}
  html body .agi-shared-header .agi-shared-menu[open] .agi-shared-nav-mobile.v2-sheet .v2-sheet-actions .agi-shared-nav-cta{margin-top:0}
  html body .agi-shared-header .agi-shared-menu[open] .agi-shared-nav-mobile.v2-sheet a.v2-sheet-email{justify-content:center;align-items:center;min-height:54px;padding:14px;border:1px solid #9ddcf38f;font:600 1rem/1 var(--agi-font-body)!important;color:#d2f7ff!important}
}
@media (max-width:780px){
  html body .agi-shared-shell.agi-shared-header-inner,html body .agi-trust-footer .agi-trust-shell{margin-left:max(16px,env(safe-area-inset-left,0px))!important;margin-right:max(16px,env(safe-area-inset-right,0px))!important}
}

/* Footer: the tagline and location line read as body text. */
.agi-trust-footer .agi-trust-top p+p{color:#a9c3d1}

/* Footer (25 Oct): grouped like the header, by task, by team and company. Links underline on hover only. */
.agi-trust-footer .agi-trust-top.v2-foot{grid-template-columns:minmax(0,1.4fr) repeat(3,minmax(0,1fr));gap:36px 32px}
/* The outline wordmark under the footer is removed (25 Oct); the brand block carries the name. */
html body .agi-trust-footer::after{display:none!important;content:none!important}
@media (min-width:781px){html body .agi-trust-footer .agi-trust-shell{margin-left:max(32px,env(safe-area-inset-left,0px),(100% - 1440px)/2)!important;margin-right:max(32px,env(safe-area-inset-right,0px),(100% - 1440px)/2)!important}}
.agi-trust-footer .v2-foot nav{display:flex;flex-direction:column;align-items:flex-start;gap:10px}
.agi-trust-footer .v2-foot .v2-foot-head{margin:0 0 4px!important;font:700 11px/1.4 var(--agi-font-mono,ui-monospace),monospace!important;letter-spacing:.08em;text-transform:uppercase;color:#7fa3b5}
html body .agi-trust-footer .v2-foot nav a{color:#c6deea!important;text-decoration:none}
html body .agi-trust-footer .v2-foot nav a:hover,html body .agi-trust-footer .v2-foot nav a:focus-visible{color:#98e9ff!important;text-decoration:underline}
.agi-trust-footer .v2-foot .v2-foot-mail{margin-top:16px!important}
@media (max-width:900px){
  .agi-trust-footer .agi-trust-top.v2-foot{grid-template-columns:repeat(2,minmax(0,1fr))}
  .agi-trust-footer .v2-foot>div:first-child{grid-column:1/-1}
}

/* Narrow phones: logo at 120px so the logo, Book a call and Menu fit on one row at 360px. */
@media (max-width:379px){
  html body .agi-shared-header .agi-shared-brand svg{width:120px!important}
  .agi-shared-shell.agi-shared-header-inner{gap:8px!important}
  html body .agi-shared-header .v2-nav-book{padding:10px}
}
/* 320px phones: a smaller logo keeps the Menu button inside the viewport. */
@media (max-width:339px){html body .agi-shared-header .agi-shared-brand svg{width:92px!important}}

/* 1.3.7 (28 Oct): problem-first menu. 1.3.8: the Problems panel foot stacks a By team label, three team tiles (icon, name, one line), then the workshop link last (Andrii, 28 Oct). */
.agi-shared-header .v2-nav-foot.v2-nav-foot-stack{display:block;margin-top:14px;padding:16px 10px 2px}
html body .agi-shared-header .agi-shared-nav .v2-nav-panel a.v2-nav-start{display:flex;width:max-content;max-width:100%;flex-direction:row;align-items:center;gap:10px;margin-top:20px;padding:0;font:500 14px/1.45 var(--agi-font-body)!important;color:#9ce9fa!important;text-decoration:none!important}
html body .agi-shared-header .agi-shared-nav .v2-nav-panel a.v2-nav-start::after{content:"";width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg)}
html body .agi-shared-header .agi-shared-nav .v2-nav-panel a.v2-nav-start:hover{background:none;color:#d4f6ff!important;text-decoration:underline!important;text-underline-offset:.18em}
.agi-shared-header .v2-nav-foot-stack .v2-nav-label{margin:0 0 10px;padding:0}
.agi-shared-header .v2-nav-teams{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
html body .agi-shared-header .agi-shared-nav .v2-nav-panel .v2-nav-teams a{gap:6px;padding:14px 14px 16px;border:1px solid #79c9e02e;background:#0a1c2f;font:400 12.5px/1.45 var(--agi-font-body)!important;color:#a9c3d1!important;text-decoration:none!important}
.agi-shared-header .v2-nav-teams .v2-task-icon{flex:none;margin:0 0 6px}
html body .agi-shared-header .agi-shared-nav .v2-nav-panel .v2-nav-teams a:hover,html body .agi-shared-header .agi-shared-nav .v2-nav-panel .v2-nav-teams a:focus-visible{background:#0d243a;border-color:#79c9e075}
.agi-shared-header .v2-nav-panel-tasks{width:min(480px,calc(100vw - 48px))}
.agi-shared-header .v2-sheet-links.v2-sheet-one{grid-template-columns:1fr}
/* Menu lines wrap on phones; the text column may shrink below its content width. */
html body .agi-shared-header .agi-shared-menu[open] .agi-shared-nav-mobile.v2-sheet a.v2-sheet-task{white-space:normal}
.agi-shared-header .v2-sheet-task>span,.agi-shared-header .v2-nav-task>span{min-width:0}
/* 1.3.9: phone and tablet sheet. The theme numbers every sheet link (01, 02...) at display size; these rules outrank it. */
html body .agi-shared-header .agi-shared-menu[open] .agi-shared-nav-mobile.v2-sheet a::before{content:none!important}
html body .agi-shared-header .agi-shared-menu[open] .agi-shared-nav-mobile.v2-sheet a{counter-increment:none}
.agi-shared-header .v2-sheet .v2-nav-label{margin:26px 0 10px!important}
.agi-shared-header .v2-sheet-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
@media (max-width:600px){.agi-shared-header .v2-sheet-grid{grid-template-columns:1fr}}
html body .agi-shared-header .agi-shared-menu[open] .agi-shared-nav-mobile.v2-sheet .v2-sheet-grid a{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-height:0;padding:14px 16px!important;border:1px solid #79c9e02e!important;background:#0a1c2f;font:400 14px/1.45 var(--agi-font-body)!important;letter-spacing:0;text-transform:none;white-space:normal!important;color:#a9c3d1!important}
.agi-shared-header .v2-sheet-grid a>*{min-width:0;max-width:100%}
html body .agi-shared-header .agi-shared-menu[open] .agi-shared-nav-mobile.v2-sheet .v2-sheet-grid a strong{font:600 17px/1.25 var(--agi-font-display);color:#f4fbff}
.agi-shared-header .v2-sheet-grid .v2-task-icon{margin:0 0 6px}
html body .agi-shared-header .agi-shared-menu[open] .agi-shared-nav-mobile.v2-sheet .v2-sheet-links{margin-top:0;padding-top:0;border-top:0}
html body .agi-shared-header .agi-shared-menu[open] .agi-shared-nav-mobile.v2-sheet .v2-sheet-links a{min-height:44px;padding:11px 0!important;font:500 16px/1.3 var(--agi-font-display)!important;letter-spacing:0}
html body .agi-shared-header .agi-shared-menu[open] .agi-shared-nav-mobile.v2-sheet a.v2-sheet-start{display:block;margin-top:18px;padding:16px 0!important;border:0!important;font:500 15px/1.45 var(--agi-font-body)!important;color:#9ce9fa!important}
/* Footer: brand plus four columns (Problems, Solutions, Ways to start, Proof). */
.agi-trust-footer .agi-trust-top.v2-foot{grid-template-columns:minmax(0,1.2fr) repeat(4,minmax(0,1fr));gap:36px 28px}
@media (max-width:1023px){.agi-trust-footer .agi-trust-top.v2-foot{grid-template-columns:repeat(2,minmax(0,1fr))}}
