/* One Sprint header and drawer for every published page. Units follow Sprint's viewport scale. */
/* Page content and fixed rails sit below the header (100); its open drawer sits above (110). */
/* Keep the page width unchanged when the drawer locks background scrolling. */
html { scrollbar-gutter:stable; }
@media (max-width:767px) {
  body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) :is(.ap-header,.site-back-to-top) { will-change:transform; }
}
:is(.ap-header,.ap-menu){--sh-unit:calc(100vw / 1440 * 16);--sh-edge:2.222222vw;--ep-ease:cubic-bezier(.53,0,0,1);--ep-link-ease:cubic-bezier(.4,0,.25,1);--ep-ink:var(--site-black);--ep-white:#f5f5f6;--ep-accent:#bf012d;--ep-rule-dark:#8a8f95;--ep-font:'Gen Interface JP','Noto Sans JP',sans-serif;font-family:var(--ep-font);font-weight:400;line-height:1.65}
body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-header{height:calc(var(--sh-unit)*4);position:fixed;inset:0 0 auto;z-index:100;display:flex;align-items:center;justify-content:space-between;padding:0 var(--sh-edge);background:#fff;color:var(--ep-ink);border:0;border-bottom:1px solid var(--ep-rule-dark);box-shadow:none}
body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-logo{display:block;width:128px;margin:0;padding:0;background:none}
/* Compensate for the logo SVG's transparent 45 / 716.685 left inset. */
.ap-header .ap-logo img{display:block;width:100%;height:auto;transform:translateX(-6.278778%)}
.ap-header{--sh-control-height:calc(var(--sh-unit)*2.5)}
body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-header-actions{display:flex;gap:calc(var(--sh-unit)*.75);align-items:center;margin:0;padding:0}
:is(.ap-header,.ap-menu) .ap-button{display:flex;align-items:center;justify-content:space-between;gap:calc(var(--sh-unit)*1.25);min-width:calc(var(--sh-unit)*13.125);height:calc(var(--sh-unit)*2.5);padding:calc(var(--sh-unit)*.5) calc(var(--sh-unit)*.625);background:var(--ep-accent);color:var(--ep-white);border:0;border-radius:0;font:400 calc(var(--sh-unit)*.8125)/1 var(--ep-font);text-decoration:none;cursor:pointer}
body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-menu-trigger{box-sizing:border-box;height:calc(var(--sh-unit)*2.5);background:var(--site-black);border:var(--ap-rule-width,1px) solid var(--ap-rule-color,#8a8f95);color:var(--ep-white);transition:color .2s,background-color .2s}
:is(.ap-header,.ap-menu) .ap-button:is(:hover,:focus-visible){background:var(--ep-white);color:var(--ep-ink)}
body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-menu-trigger[data-background-tone=light]{background:var(--ep-white);color:var(--ep-ink)}
body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-menu-trigger[data-background-tone=light]:is(:hover,:focus-visible){background:var(--ep-ink);color:var(--ep-white)}
body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-menu-trigger[data-background-tone=dark]{color:var(--ep-white)}
body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-menu-trigger[data-background-tone=dark]:is(:hover,:focus-visible){background:var(--ep-white);color:var(--ep-ink)}
.ap-menu-icon{width:calc(var(--sh-unit)*.875);display:flex;flex-direction:column;gap:4px}
.ap-menu-icon i{display:block;width:100%;height:1px;background:currentColor}
.ap-header .ap-button-label{height:1.1em;line-height:1.1;overflow:hidden;display:block;position:relative;font-family:'DM Sans',sans-serif}
.ap-header .ap-button-label>span{display:block;transition:transform .6s var(--ep-link-ease)}
.ap-header .ap-button:is(:hover,:focus-visible) .ap-button-label>span{transform:translateY(-100%)}
body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) :is(.ap-header,.ap-menu) .ap-legacy-cta{display:inline-flex;align-items:stretch;justify-content:space-between;gap:0;padding:0;overflow:hidden;border:1px solid var(--ep-accent);border-radius:0;min-width:194px;min-height:calc(var(--sh-unit)*2.5);height:calc(var(--sh-unit)*2.5);font:500 13px/1.3 var(--ep-font);transition:border-color .3s}
:is(.ap-header,.ap-menu) .ap-legacy-cta .button-text{position:relative;display:flex;align-items:center;padding:0 16px;transition:transform .6s var(--ep-ease)}
:is(.ap-header,.ap-menu) .ap-legacy-cta .button-text::after{content:attr(data-text);position:absolute;inset:-100% 0 100%;display:flex;align-items:center;padding:0 16px}
:is(.ap-header,.ap-menu) .ap-legacy-cta .button-icon{display:grid;place-items:center;flex:0 0 46px;width:46px;border-left:1px solid var(--ep-rule-dark);overflow:hidden}
:is(.ap-header,.ap-menu) .arrow-roll{position:relative;display:block;width:20px;height:20px;transition:transform .6s var(--ep-ease)}
:is(.ap-header,.ap-menu) .arrow-roll svg{position:absolute;inset:0 auto auto 0;display:block;width:20px;height:20px;overflow:visible}
:is(.ap-header,.ap-menu) .arrow-roll[data-arrow='↓'] .arrow-roll-next{top:-200%}
:is(.ap-header,.ap-menu) .arrow-roll[data-arrow='↗'] .arrow-roll-next{left:-200%;top:200%}
:is(.ap-header,.ap-menu) .ap-legacy-cta:is(:hover,:focus-visible){background:var(--ep-white);color:var(--ep-ink);border-color:var(--ep-white)}
/* Sprint's legacy CTA rule includes an ID selector; keep this header override explicit. */
body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-header .ap-header-contact:is(:hover,:focus-visible){border-color:var(--site-black)!important}
.ap-header .ap-header-contact .button-icon{transition:border-color .3s}
.ap-header .ap-header-contact:is(:hover,:focus-visible) .button-icon{border-left-color:var(--site-black)}
:is(.ap-header,.ap-menu) .ap-legacy-cta:is(:hover,:focus-visible) .button-text{transform:translateY(100%)}
:is(.ap-header,.ap-menu) .ap-legacy-cta:is(:hover,:focus-visible) .arrow-roll[data-arrow='↓']{transform:translateY(200%)}
:is(.ap-header,.ap-menu) .ap-legacy-cta:is(:hover,:focus-visible) .arrow-roll[data-arrow='↗']{transform:translate(200%,-200%)}
body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-menu{position:fixed;inset:0;z-index:110;overflow:hidden;pointer-events:none;visibility:hidden;transition:visibility .6s;color:var(--ep-white)}
.ap-menu .ap-menu-backdrop{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;background:rgba(23,25,29,.3);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);opacity:0;transition:opacity .22s ease-out;cursor:pointer}
.ap-menu .ap-menu-panel{--sh-menu-gutter:calc(var(--sh-unit)*1.25);position:absolute;right:calc(var(--sh-unit)*.75);top:calc(var(--sh-unit)*.75);bottom:auto;width:calc((100% - var(--sh-unit)*2.5)/3 - var(--sh-unit)*.3125);background:var(--site-black);color:var(--ep-white);clip-path:none;transform:translateX(calc(100% + var(--sh-unit)*.75));transition:transform .6s var(--ep-ease);display:flex;flex-direction:column}
.ap-menu .ap-menu-head{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;padding:8px 0 8px var(--sh-menu-gutter);border-bottom:1px solid #8a8f95}
.ap-menu .ap-menu-logo{display:inline-flex;align-items:center;flex-shrink:0;text-decoration:none}
.ap-menu .ap-menu-logo img{display:block}
.ap-menu .ap-menu-logo:focus-visible{outline:2px solid currentColor;outline-offset:3px}
/* The logo SVG has a 45-unit left inset in its 716.7-unit viewBox.
   Align the visible symbol, rather than that transparent inset, with the links. */
body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-menu-head img{width:128px;height:auto;filter:none;transform:translateX(-6.278778%)}
.ap-menu .ap-menu-close{display:grid;place-items:center;flex-shrink:0;width:44px;height:44px;padding:0;background:none;border:0;color:inherit;cursor:pointer}
.ap-menu .ap-menu-close svg,.ap-menu .ap-menu-group a svg,.ap-menu .ap-menu-group summary svg{display:block;width:20px;height:20px}
.ap-menu .ap-menu-scroll{min-height:0;overflow:auto;overflow-x:hidden;scrollbar-gutter:stable;overscroll-behavior:contain;padding:var(--sh-menu-gutter);padding-right:max(0px,calc(var(--sh-menu-gutter) - var(--sh-scrollbar-width,0px)))}
.ap-menu .ap-menu-group{border-bottom:1px solid #8a8f95;margin:0;padding:0}
.ap-menu .ap-menu-group summary{display:flex;align-items:center;justify-content:space-between;cursor:pointer;list-style:none;padding:var(--sh-unit) 0;font:400 calc(var(--sh-unit)*.75)/1.65 'DM Sans',sans-serif;letter-spacing:.03em}
.ap-menu .ap-menu-group summary>span,.ap-menu .ap-menu-group[open] summary>span{display:block;flex:0 0 20px;width:20px;height:20px;transform:none}
.ap-menu .ap-menu-plus-vertical{transform-box:view-box;transform-origin:12px 12px;transform:rotate(0deg);transition:transform 300ms cubic-bezier(.22,1,.36,1)}
.ap-menu .ap-menu-group summary::-webkit-details-marker{display:none}
.ap-menu .ap-menu-group[open]:not(.is-closing) .ap-menu-plus-vertical{transform:rotate(90deg)}
.ap-menu .ap-menu-group ul{list-style:none;padding:0;margin:0 0 var(--sh-unit)}
.ap-menu .ap-menu-group li{padding:0;margin:0}
.ap-menu .ap-menu-group a[aria-current="page"]{font-weight:500;text-decoration:none}
.ap-menu .ap-menu-group a{position:relative;isolation:isolate;display:flex;align-items:center;justify-content:space-between;gap:var(--sh-unit);margin-inline:calc(var(--sh-menu-gutter)*-1);padding:calc(var(--sh-unit)*.5) var(--sh-menu-gutter);font-size:var(--sh-unit);line-height:1.4;color:inherit;text-decoration:none;background-color:transparent;transition:color 180ms ease-out}
.ap-menu .ap-menu-group > a{padding-block:var(--sh-unit)}
.ap-menu .ap-menu-group a::before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:#fff;transform:scaleY(0);transform-origin:top;transition:transform 640ms cubic-bezier(.16,1,.3,1)}
.ap-menu .ap-menu-group a:focus-visible{color:var(--site-black);transition:none}
.ap-menu .ap-menu-group a:focus-visible::before{transform:scaleY(1);transition:none}
@media(hover:hover){
  .ap-menu .ap-menu-group a:hover{color:var(--site-black);transition-delay:100ms}
  .ap-menu .ap-menu-group a:hover::before{transform:scaleY(1)}
}
/* Keep destination arrows visible, with a gentle lift on interaction. */
.ap-menu .ap-menu-group a>span{flex-shrink:0;transform:translate(0,0);transition:transform 360ms cubic-bezier(.16,1,.3,1)}
.ap-menu :is(.ap-menu-group a>span[aria-hidden],.ap-menu-actions .arrow-roll){color:#fff;opacity:1}
.ap-menu :is(.ap-menu-group a:focus-visible>span[aria-hidden],.ap-menu-actions a:is(:hover,:focus-visible) .arrow-roll){color:inherit}
.ap-menu .ap-menu-group a:focus-visible>span{transform:translate(3px,-3px)}
@media(hover:hover){.ap-menu .ap-menu-group a:hover>span{color:inherit;transform:translate(3px,-3px)}}
.ap-menu .ap-menu-actions{display:grid;gap:var(--sh-unit);padding-top:calc(var(--sh-unit)*2);font-size:calc(var(--sh-unit)*.875)}
body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-menu-actions .ap-legacy-cta{width:100%;min-width:0;min-height:54px;height:auto;font-size:16px}
.ap-menu .ap-menu-actions .button-text,.ap-menu .ap-menu-actions .button-text::after{padding:13px 16px}
.ap-menu .ap-menu-actions .button-icon{width:52px;flex-basis:52px;font:inherit}
.ap-menu .ap-menu-actions .arrow-roll::after{content:none}
body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]).ap-menu-open .ap-menu{visibility:visible;pointer-events:auto}
body.ap-menu-open .ap-menu-backdrop{opacity:1}
body.ap-menu-open .ap-menu-panel{clip-path:none;transform:translateX(0)}
@media(prefers-reduced-motion:reduce){
  body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-menu,
  .ap-menu .ap-menu-backdrop,.ap-menu .ap-menu-panel{transition:none}
}
:is(.ap-header,.ap-menu) :is(a,button,summary):focus-visible{outline:2px solid currentColor;outline-offset:5px}
@media(max-width:980px) and (min-width:681px){:is(.ap-header,.ap-menu){--sh-unit:calc(100vw / 820 * 16)}.ap-menu .ap-menu-panel{width:50%}}
@media(max-width:680px){:is(.ap-header,.ap-menu){--sh-unit:calc(100vw / 402 * 16);--sh-edge:4.830918vw}body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-logo{width:112px}body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-header-contact.ap-legacy-cta{display:none}body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-menu-trigger{min-width:calc(var(--sh-unit)*8)}.ap-menu .ap-menu-panel{inset:calc(var(--sh-unit)*.75);width:auto}.ap-menu .ap-menu-panel{--sh-menu-gutter:var(--sh-unit)}}
/* Keep the header controls compact between phone and desktop widths. */
@media (min-width:481px) and (max-width:980px) {
  .ap-header { --sh-unit:16px; --sh-control-height:var(--site-control-size); }
  body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-header .ap-menu-trigger {
    width:128px;
    min-width:128px;
    height:44px;
    padding:10px 12px;
    gap:16px;
    font-size:14px;
  }
  .ap-header .ap-menu-trigger .ap-menu-icon { width:18px; }
}
/* Mobile keeps both actions visible without scaling them with the viewport. */
@media (max-width:680px) {
  .ap-header { --sh-unit:16px; --sh-edge:clamp(12px,3vw,20px); --sh-control-height:var(--site-control-size); }
  body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-header .ap-logo {
    width:clamp(88px,24vw,112px);
    flex-shrink:0;
  }
  body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-header-actions { gap:8px; }
  body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-header .ap-header-contact.ap-legacy-cta {
    display:inline-flex;
    width:140px;
    min-width:0;
    height:44px;
    min-height:44px;
    flex-shrink:0;
    font-size:12px;
  }
  .ap-header .ap-header-contact .button-text,
  .ap-header .ap-header-contact .button-text::after { padding:0 8px; white-space:nowrap; }
  .ap-header .ap-header-contact .button-icon { width:30px; flex-basis:30px; }
  body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-header .ap-menu-trigger {
    width:44px;
    min-width:44px;
    height:44px;
    padding:12px;
    gap:0;
    justify-content:center;
  }
  .ap-header .ap-menu-trigger .ap-button-label { display:none; }
  .ap-header .ap-menu-trigger .ap-menu-icon { width:18px; }
}
/* Both header actions share their outer height, including their borders. */
body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-header :is(.ap-menu-trigger,.ap-header-contact.ap-legacy-cta,.ap-header-download) {
  box-sizing:border-box;
  height:var(--sh-control-height);
  min-height:var(--sh-control-height);
}
@media(prefers-reduced-motion:reduce){:is(.ap-header,.ap-menu) *,.ap-menu .ap-menu-group a::before{transition:none!important;transition-delay:0ms!important}}

/* Leave both edges clear on the smallest phones. */
@media(max-width:360px){
 body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-header .ap-header-contact.ap-legacy-cta{width:128px;font-size:11px}
}

/* Page styles must not rescale the shared header or its controls. */
body:is(.aitria-panel,.editorial-site[data-site-page]) {
  --header-h:64px;
  --ep-header:64px;
  --site-control-size:40px;
}
/* Match the page gutter on both sides, including the visible edge of the logo.
   The header type selector keeps the shared padding above page navigation overrides. */
body:is(.aitria-panel,.editorial-site[data-site-page]) header.ap-header {
  --header-surface-tone:light;
  --sh-unit:16px;
  --sh-edge:var(--site-fluid-gutter,16px);
  --sh-control-height:var(--site-control-size);
  height:64px;
  padding-inline:var(--sh-edge);
  letter-spacing:normal;
}
/* Match the return control's right inset without moving the logo. */
body:is(.aitria-panel,.editorial-site[data-site-page]) header.ap-header {
  --header-action-right:calc(24px + env(safe-area-inset-right,0px));
  padding-right:var(--header-action-right);
}
@media (max-width:768px) {
  body:is(.aitria-panel,.editorial-site[data-site-page]) header.ap-header {
    --header-action-right:calc(16px + env(safe-area-inset-right,0px));
  }
}
@media (max-width:680px) {
  body:is(.service-panel,.aitria-panel.page-ai-ux-sprint) header.ap-header {
    --header-action-right:16px;
  }
}
/* Hero pages show their background through the header until the first scroll. */
@media (prefers-reduced-motion:no-preference) {
  body[data-site-page]:is([data-site-page="top"],[data-header-over-hero]) header.ap-header {
    transition:background-color .3s ease,border-bottom-color .3s ease,color .3s ease;
  }
}
body[data-site-page]:is([data-site-page="top"],[data-header-over-hero]) header.ap-header:not([data-header-scrolled="true"]) {
  --header-surface-tone:dark;
  background:transparent;
  color:var(--ep-white);
  border-bottom-color:transparent;
}
/* Keep the header surface and controls aligned to the viewport on wide screens. */
@media (min-width:1729px) {
  body:is(.aitria-panel,.editorial-site[data-site-page]) header.ap-header {
    max-width:none;
    margin-inline:0;
    padding-left:var(--sh-edge);
  }
}
body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header-actions {
  gap:12px;
}
body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header .ap-logo {
  width:128px;
  flex-shrink:0;
}
body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header .ap-header-contact.ap-legacy-cta {
  width:194px;
  min-width:194px;
  flex-shrink:0;
  font:500 13px/1.3 var(--ep-font);
}
body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header .ap-menu-trigger {
  width:210px;
  min-width:210px;
  padding:8px 10px;
  gap:20px;
  font:400 13px/1 var(--ep-font);
  border:1px solid #8a8f95;
}
.ap-header .ap-menu-trigger .ap-menu-icon { width:14px; }
@media (min-width:681px) and (max-width:980px) {
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header { --sh-control-height:var(--site-control-size); }
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header .ap-menu-trigger {
    width:128px;
    min-width:128px;
    padding:10px 12px;
    gap:16px;
    font-size:14px;
  }
  .ap-header .ap-menu-trigger .ap-menu-icon { width:18px; }
}
@media (max-width:680px) {
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header {
    --sh-control-height:var(--site-control-size);
  }
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header-actions { gap:8px; }
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header .ap-logo { width:clamp(88px,24vw,112px); }
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header .ap-header-contact.ap-legacy-cta {
    width:140px;
    min-width:0;
    font-size:12px;
  }
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header .ap-menu-trigger {
    width:44px;
    min-width:44px;
    padding:12px;
    gap:0;
  }
  .ap-header .ap-menu-trigger .ap-menu-icon { width:18px; }
}
@media (max-width:360px) {
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header .ap-header-contact.ap-legacy-cta { width:128px; font-size:11px; }
}

/* The arrow cell follows the control's inner height at every breakpoint. */
body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-header .ap-header-contact .button-icon {
  box-sizing:border-box;
  width:calc(var(--sh-control-height) - 2px);
  height:calc(var(--sh-control-height) - 2px);
  flex:0 0 calc(var(--sh-control-height) - 2px);
  border-left:1px solid #fff;
}
body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-header .ap-header-contact:is(:hover,:focus-visible) .button-icon {
  border-left-color:var(--site-black);
}
@media (max-width:680px) {
  /* Fill the label cell so spare width becomes equal space on both sides. */
  .ap-header .ap-header-contact .button-text { flex:1; min-width:0; }
  .ap-header .ap-header-contact .button-text,
  .ap-header .ap-header-contact .button-text::after { padding-inline:6px; justify-content:center; }
}
@media (max-width:360px) {
  .ap-header .ap-header-contact .button-text,
  .ap-header .ap-header-contact .button-text::after { padding-inline:3px; }
}

/* The drawer follows Sprint's fixed type scale, independent of the page's rem. */
body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-menu {
  --sh-unit:16px;
  --sh-menu-gutter:20px;
  --ep-font:var(--site-chrome-font,'Gen Interface JP','Noto Sans JP',sans-serif);
  font-size:16px;
  letter-spacing:normal;
  overflow-wrap:normal;
  word-break:normal;
}
body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-menu .ap-menu-panel {
  top:12px;
  bottom:auto;
  height:auto;
  max-height:calc(100svh - var(--menu-trigger-top,12px) - 12px);
  right:12px;
  --sh-menu-gutter:20px;
}
@media (min-width:681px) {
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-menu .ap-menu-panel {
    width:min(50%,512px);
    right:max(12px,calc((100% - var(--site-content-canvas,1728px))/2 + 12px));
  }
}
@media (max-width:680px) {
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-menu .ap-menu-panel {
    left:12px;
    width:auto;
    max-width:none;
    --sh-menu-gutter:16px;
  }
}

/* The document link shares Menu's surface contrast and the header control height. */
body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) :is(.ap-header,.ap-menu) :is(.ap-header-download,.ap-menu-download) {
  background:var(--site-black);
  color:var(--ep-white);
  border:1px solid var(--ep-rule-dark);
}
body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-header .ap-header-download {
  box-sizing: border-box;
  width: 194px;
  min-width: 194px;
  flex-shrink: 0;
  font: 400 13px/1.3 var(--ep-font);
}
.ap-header .ap-header-download .button-icon {
  width: calc(var(--sh-control-height) - 2px);
  flex-basis: calc(var(--sh-control-height) - 2px);
  border-left: 1px solid var(--ep-rule-dark);
}
body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-header .ap-header-download[data-background-tone="light"] {
  background: var(--ep-white);
  color: var(--ep-ink);
}
body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) :is(.ap-header,.ap-menu) :is(.ap-header-download,.ap-menu-download):is(:hover,:focus-visible) {
  background: var(--ep-white);
  color: var(--ep-ink);
  border-color: var(--ep-rule-dark);
}
body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-header .ap-header-download[data-background-tone="light"]:is(:hover,:focus-visible) {
  background: var(--ep-ink);
  color: var(--ep-white);
  border-color: var(--ep-rule-dark);
}
@media (min-width:681px) and (max-width:980px) {
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header .ap-header-download { width:160px; min-width:160px; }
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header .ap-header-contact.ap-legacy-cta { width:174px; min-width:174px; }
  .ap-header .ap-header-download .button-text,
  .ap-header .ap-header-download .button-text::after { padding-inline:10px; }
}
@media (max-width:680px) {
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header-actions { gap:6px; }
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header .ap-header-download {
    display:none;
    width:clamp(60px,18vw,72px);
    min-width:0;
    font-size:12px;
  }
  .ap-header .ap-header-download .button-text,
  .ap-header .ap-header-download .button-text::after { padding-inline:4px; white-space:nowrap; }
  .ap-header .ap-header-download .button-icon { width:24px; flex-basis:24px; }
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header .ap-header-contact.ap-legacy-cta { width:clamp(96px,30vw,128px); }
}
@media (max-width:360px) {
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header .ap-logo { width:80px; }
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header-actions { gap:4px; }
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header .ap-header-contact.ap-legacy-cta { width:80px; }
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header .ap-header-contact .button-icon { width:24px; flex-basis:24px; }
}

/* The shared menu control is an icon-only square at every viewport size. */
body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) .ap-header .ap-menu-trigger {
  width:var(--sh-control-height);
  min-width:var(--sh-control-height);
  flex:0 0 var(--sh-control-height);
  padding:0;
  gap:0;
  justify-content:center;
}
.ap-header .ap-menu-trigger .ap-menu-icon { width:18px; }

/* One outlined rectangle grows from the header control into the drawer.
   Its top-right corner stays anchored; content is clipped, never scaled. */
.ap-menu[data-menu-morph] { transition:none !important; }
body.ap-menu-morphing .ap-menu[data-menu-morph] { visibility:visible; }
body:is(.ap-menu-open,.ap-menu-morphing) .ap-header .ap-menu-trigger { opacity:0; pointer-events:none; }
body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-menu[data-menu-morph] .ap-menu-panel {
  top:var(--menu-trigger-top,12px);
  right:var(--menu-trigger-right,12px);
  bottom:auto;
  z-index:2;
  transform:none;
  background:transparent;
  transition:none;
}
.ap-menu[data-menu-morph] .ap-menu-morph-frame {
  position:absolute;
  z-index:1;
  box-sizing:border-box;
  border:1px solid #8a8f95;
  pointer-events:none;
}
.ap-menu-morph-control {
  position:absolute;
  top:-1px;
  right:-1px;
  display:grid;
  place-items:center;
  width:var(--menu-control-size,44px);
  height:var(--menu-control-size,44px);
}
.ap-menu-morph-control .ap-menu-icon { width:18px; }
.ap-menu-morph-control i { transition:transform .2s cubic-bezier(.22,1,.36,1); }
body.ap-menu-open .ap-menu-morph-control i:first-child { transform:translateY(2.5px) rotate(45deg); }
body.ap-menu-open .ap-menu-morph-control i:last-child { transform:translateY(-2.5px) rotate(-45deg); }
.ap-menu[data-menu-morph] .ap-menu-head { position:relative; min-height:64px; padding-right:calc(var(--menu-control-size,44px) + 12px); }
.ap-menu[data-menu-morph] .ap-menu-close { position:absolute; top:0; right:0; width:var(--menu-control-size,44px); height:var(--menu-control-size,44px); box-sizing:border-box; border:1px solid #8a8f95; }
.ap-menu[data-menu-morph] .ap-menu-close svg { visibility:hidden; }
body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-menu[data-menu-morph] .ap-menu-head img {
  width:var(--menu-logo-width,128px);
  height:var(--menu-logo-height,auto);
}
@media (max-width:680px) {
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-menu[data-menu-morph] .ap-menu-panel { left:var(--menu-trigger-right,12px); }
}
@media (prefers-reduced-motion:reduce) {
  .ap-menu-morph-control i { transition:none; }
}

/* The menu and back-to-top controls share one responsive square size. */
@media (max-width:980px) {
  body:is(.aitria-panel,.editorial-site[data-site-page]) { --site-control-size:44px; }
}
body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) :is(.site-back-to-top,.ap-back-to-top) {
  width:var(--site-control-size,40px);
  height:var(--site-control-size,40px);
}
body:is(.aitria-panel,.service-panel,.editorial-site[data-site-page]) :is(.site-back-to-top,.ap-back-to-top) svg {
  width:18px;
  height:18px;
}

/* Share the homepage's mobile contact button across every page. */
@media (max-width:680px) {
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header .ap-header-actions > .ap-header-contact.ap-legacy-cta {
    width:180px;
    min-width:180px;
  }
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header .ap-header-contact .button-text {
    flex:1;
    min-width:0;
  }
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header .ap-header-contact .button-text,
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header .ap-header-contact .button-text::after {
    padding-inline:16px;
    justify-content:center;
  }
}
@media (max-width:360px) {
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header .ap-header-actions > .ap-header-contact.ap-legacy-cta {
    width:144px;
    min-width:144px;
  }
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header .ap-header-contact .button-text,
  body:is(.aitria-panel,.editorial-site[data-site-page]) .ap-header .ap-header-contact .button-text::after {
    padding-inline:12px;
  }
}

/* Give the larger action text enough room without squeezing its arrow cell. */
@media (min-width:981px) {
  body[data-site-page] .ap-header .ap-header-actions > :is(.ap-header-contact,.ap-header-download).ap-legacy-cta {
    width:max-content;
    min-width:208px;
  }
}
@media (min-width:681px) and (max-width:980px) {
  body[data-site-page] .ap-header .ap-header-actions > :is(.ap-header-contact,.ap-header-download).ap-legacy-cta {
    width:194px;
    min-width:194px;
    line-height:1.15;
  }
}
@media (max-width:360px) {
  body[data-site-page] .ap-header .ap-logo { width:64px; }
}

@media (min-width: 681px) and (max-width: 767px) {
  body[data-site-page][data-header-menu-layout="floating"] .ap-header .ap-header-shortcuts > :is(.ap-header-download,.ap-header-contact).ap-legacy-cta {
    width: 156px;
    min-width: 156px;
    font-size: 12px !important;
  }
  body[data-site-page][data-header-menu-layout="floating"] .ap-header .ap-legacy-cta .button-text,
  body[data-site-page][data-header-menu-layout="floating"] .ap-header .ap-legacy-cta .button-text::after { padding-inline: 8px; }
}

/* Keep the mobile action bar fixed to the viewport. */
body[data-site-page][data-header-menu-layout="floating"] header.ap-header {
  will-change: auto;
}
body[data-site-page][data-header-menu-layout="floating"] .ap-header-shortcuts { display: flex; gap: 12px; }
body[data-site-page][data-header-menu-layout="floating"]:is(.ap-menu-open,.ap-menu-morphing) .ap-header-actions { visibility: hidden; }

/* Icon cells match the action's inner height, including their own divider. */
body[data-site-page][data-header-menu-layout="floating"] .ap-header .ap-header-shortcuts > .ap-legacy-cta .button-icon {
  width: calc(var(--sh-control-height) - 2px);
  flex: 0 0 calc(var(--sh-control-height) - 2px);
}

/* Restore the inline desktop actions, retaining their existing dimensions. */
@media (min-width: 768px) and (max-width: 980px) {
  body[data-site-page][data-header-menu-layout="floating"] .ap-header .ap-header-shortcuts > .ap-legacy-cta {
    width: 194px;
    min-width: 194px;
  }
}
@media (min-width: 681px) {
  body[data-site-page][data-header-menu-layout="floating"] .ap-header .ap-header-actions {
    position: static;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    border: 0;
    background: none;
  }
  body[data-site-page][data-header-menu-layout="floating"] .ap-header-shortcuts {
    position: static;
    flex-direction: row;
    gap: 12px;
  }
}
@media (min-width: 981px) {
  body[data-site-page][data-header-menu-layout="floating"] .ap-header .ap-header-shortcuts > .ap-legacy-cta {
    width: 208px;
    min-width: 208px;
  }
}

/* Use the same action links in a bottom bar on phones, including the safe area. */
@media (max-width: 680px) {
  body[data-site-page][data-header-menu-layout="floating"] { padding-bottom: calc(69px + env(safe-area-inset-bottom,0px)); }
  body[data-site-page][data-header-menu-layout="floating"] .ap-header .ap-header-shortcuts {
    --shortcut-label-size: 14px;
    --shortcut-label-inset: 12px;
    position: fixed;
    inset: auto 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom,0px));
    border-top: 1px solid #8a8f95;
    background: #17191d;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .6s ease, transform .6s ease;
  }
  body[data-site-page][data-header-menu-layout="floating"]:has(> :is(.site-back-to-top,.ap-back-to-top).is-visible):not(.ap-menu-open):not(.ap-menu-morphing) .ap-header .ap-header-shortcuts {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }
  body[data-site-page][data-header-menu-layout="floating"] .ap-header .ap-header-shortcuts > :is(.ap-header-download,.ap-header-contact).ap-legacy-cta {
    display: inline-flex;
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    font-size: var(--shortcut-label-size) !important;
  }
  body[data-site-page][data-header-menu-layout="floating"] .ap-header .ap-header-shortcuts .ap-legacy-cta .button-text {
    flex: 1;
    min-width: 0;
    justify-content: flex-start;
    padding-inline: var(--shortcut-label-inset) 4px;
    line-height: 1.2;
    text-align: start;
    white-space: normal;
    text-wrap: balance;
  }
  body[data-site-page][data-header-menu-layout="floating"] :is(.site-back-to-top,.ap-back-to-top) { bottom: calc(84px + env(safe-area-inset-bottom,0px)); }
  html:has(body[data-site-page][data-header-menu-layout="floating"]) { scroll-padding-bottom: calc(88px + env(safe-area-inset-bottom,0px)); }
}
@media (max-width: 384px) {
  body[data-site-page][data-header-menu-layout="floating"] .ap-header .ap-header-shortcuts {
    --shortcut-label-size: 13px;
    --shortcut-label-inset: 8px;
  }
}
