:root{
  --ha-navy:#17375E;
  --ha-teal:#1FB7AE;
  --ha-gold:#F5A623;
  --ha-bg:#F7F8FA;
  --ha-border:#D8DEE9;
  --ha-muted:#66758a;
  --ha-display:Georgia,"Times New Roman",serif;
  --ha-body:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --ha-mono:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
}

body > .beta-top-banner,
body > .beta-banner,
body > header:not(.ha-ignore-shared-header),
body > nav.topnav,
body > .topnav{display:none !important;}

.ha-site-header{
  background:#fff;
  border-bottom:2px solid var(--ha-navy);
  position:relative;
  z-index:1000;
  color:var(--ha-navy);
  font-family:var(--ha-body);
}

.ha-header-inner{
  width:100%;
  max-width:1720px;
  margin:0 auto;
  min-height:94px;
  padding:17px clamp(22px,3vw,54px);
  display:grid;
  grid-template-columns:minmax(238px,auto) minmax(0,1fr) minmax(225px,auto);
  gap:clamp(18px,2vw,34px);
  align-items:center;
}

.ha-brand-block{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:5px;
  min-width:238px;
  flex-shrink:0;
}
.ha-brand-link{
  color:var(--ha-navy);
  text-decoration:none;
  font-family:var(--ha-display);
  font-size:2rem;
  line-height:1;
  font-weight:900;
  letter-spacing:-.035em;
  white-space:nowrap;
}
.ha-product-label{
  font-family:var(--ha-mono);
  font-size:.61rem;
  line-height:1;
  color:var(--ha-gold);
  text-transform:uppercase;
  letter-spacing:.14em;
  white-space:nowrap;
  font-weight:900;
}

.ha-nav-shell{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:clamp(12px,1.4vw,22px);
  min-width:0;
}
.ha-nav-links,
.ha-account-actions{
  display:flex;
  align-items:center;
  gap:clamp(9px,1vw,16px);
  min-width:0;
}
.ha-nav-resource:first-of-type{margin-left:3px}
.ha-nav-resource:first-of-type:before{
  content:"";
  position:absolute;
  left:-9px;
  top:50%;
  width:1px;
  height:18px;
  background:var(--ha-border);
  transform:translateY(-50%);
}
.ha-nav-link,
.ha-action-link{
  position:relative;
  color:var(--ha-navy);
  text-decoration:none;
  font-size:.84rem;
  font-weight:750;
  white-space:nowrap;
  padding:8px 0;
  border:0;
  background:none;
  font-family:inherit;
  cursor:pointer;
}
.ha-nav-link:after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:2px;
  height:2px;
  background:transparent;
  border-radius:999px;
}
.ha-nav-link:hover,
.ha-action-link:hover{color:var(--ha-teal)}
.ha-nav-link.is-active,
.ha-action-link.is-active{color:var(--ha-navy)}
.ha-nav-link.is-active:after{background:var(--ha-teal)}

.ha-account-actions{
  padding-left:15px;
  border-left:1px solid var(--ha-border);
  flex-shrink:0;
}
.ha-action-link.ha-primary{
  background:var(--ha-gold);
  color:#243142;
  padding:10px 14px;
  border-radius:5px;
  font-weight:900;
}
.ha-action-link.ha-secondary{
  border:1px solid var(--ha-border);
  padding:9px 12px;
  border-radius:5px;
}
.ha-action-link.ha-secondary.is-active{border-color:var(--ha-teal);box-shadow:inset 0 -2px 0 var(--ha-teal)}
.ha-action-link.ha-cta{
  background:var(--ha-teal);
  color:#fff;
  padding:10px 14px;
  border-radius:5px;
  font-weight:900;
}
.ha-action-link.ha-cta:hover{background:#189e96;color:#fff}

.ha-header-right{
  justify-self:end;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  min-width:0;
}
.ha-tagline{
  text-align:right;
  line-height:1.35;
  max-width:265px;
  color:var(--ha-muted);
  font-family:var(--ha-mono);
  font-size:.69rem;
}
.ha-tagline strong{
  display:block;
  color:var(--ha-navy);
  font-family:var(--ha-body);
  font-size:.88rem;
  font-weight:850;
  margin-bottom:2px;
  white-space:nowrap;
}

.ha-help-menu{position:relative}
.ha-help-dropdown{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  min-width:210px;
  background:#fff;
  border:1px solid var(--ha-border);
  border-radius:8px;
  box-shadow:0 12px 28px rgba(23,55,94,.16);
  padding:6px;
  z-index:1002;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.ha-help-dropdown a{
  display:block;
  padding:9px 10px;
  border-radius:5px;
  color:var(--ha-navy);
  text-decoration:none;
  font-size:.84rem;
  font-weight:650;
  white-space:nowrap;
}
.ha-help-dropdown a:hover,
.ha-help-dropdown a:focus-visible{background:var(--ha-bg);color:var(--ha-teal);outline:none}
/* FR3 round root-cause fix: .ha-help-dropdown's own `display:flex` above is
   an author-origin declaration, and author declarations always win over the
   browser's built-in `[hidden]{display:none}` user-agent rule, regardless
   of selector specificity -- so the `hidden` attribute this dropdown's own
   JS state (site-header.js's closeHelp()) has always correctly set/cleared
   never actually controlled its rendering. The dropdown was ALWAYS
   display:flex, at every point in the page lifecycle, including on a fresh
   page load before Help was ever clicked; the only thing that ever visibly
   hid it was the body.ha-overlay-open rule below, active only while some
   other overlay (the tour, a modal) happens to be open. This explicit
   [hidden] override makes the attribute -- and the JS that already sets it
   correctly -- actually work, standing on its own without depending on any
   overlay being active. Confirmed via a real Chromium render (not just
   source-text inspection) in scripts/test-help-dropdown-visibility.js. */
.ha-help-dropdown[hidden]{display:none !important;}
/* Follow-up round: while ANY application overlay is open (Welcome, guided
   tour, Add Customer Data, Manage Customer Accounts, Prepare for Call, or
   any branded confirm/info dialog -- see site-header.js's beginOverlay()/
   endOverlay()), the Help dropdown and the mobile nav shell are forced
   hidden here, in CSS, regardless of their own hidden attribute/open
   class or any JS event-ordering race that might otherwise leave one of
   them visibly open behind the overlay. */
body.ha-overlay-open .ha-help-dropdown,
body.ha-overlay-open .ha-site-header.is-open .ha-nav-shell{display:none !important;}
@media(max-width:1260px){
  .ha-help-menu{width:100%}
  .ha-help-dropdown{position:static;box-shadow:none;border:0;padding:0 0 0 12px;margin-top:2px}
}

.ha-menu-button{
  display:none;
  width:42px;
  height:40px;
  border:1px solid var(--ha-border);
  border-radius:6px;
  background:#fff;
  color:var(--ha-navy);
  font-size:1.25rem;
  cursor:pointer;
  align-items:center;
  justify-content:center;
}
.ha-auth-loading .ha-account-actions{visibility:hidden}

@media(max-width:1500px){
  .ha-header-inner{grid-template-columns:minmax(222px,auto) minmax(0,1fr) minmax(190px,auto);gap:18px;padding-left:28px;padding-right:28px}
  .ha-brand-block{min-width:222px}
  .ha-brand-link{font-size:1.88rem}
  .ha-nav-shell{gap:12px}
  .ha-nav-links,.ha-account-actions{gap:10px}
  .ha-nav-link,.ha-action-link{font-size:.79rem}
  .ha-tagline{max-width:210px}
  .ha-tagline span{display:none}
}

@media(max-width:1260px){
  .ha-header-inner{
    min-height:76px;
    grid-template-columns:1fr auto;
    padding:13px 22px;
  }
  .ha-brand-block{min-width:0;gap:4px}
  .ha-brand-link{font-size:1.75rem}
  .ha-product-label{font-size:.58rem}
  .ha-menu-button{display:inline-flex;justify-self:end}
  .ha-nav-shell{
    display:none;
    grid-column:1/-1;
    align-items:stretch;
    justify-content:flex-start;
    flex-direction:column;
    padding:16px 0 4px;
    border-top:1px solid var(--ha-border);
    margin-top:4px;
  }
  .ha-site-header.is-open .ha-nav-shell{display:flex}
  .ha-nav-links,.ha-account-actions{align-items:stretch;flex-direction:column;gap:2px;width:100%}
  .ha-nav-link,.ha-action-link{display:block;width:100%;padding:10px 4px;text-align:left;font-size:.9rem}
  .ha-nav-link:after{left:4px;right:auto;width:30px;bottom:5px}
  .ha-nav-resource:first-of-type{margin-left:0;margin-top:7px;padding-top:16px;border-top:1px solid var(--ha-border)}
  .ha-nav-resource:first-of-type:before{display:none}
  .ha-account-actions{border-left:0;border-top:1px solid var(--ha-border);padding:10px 0 0;margin-top:7px}
  .ha-action-link.ha-primary,.ha-action-link.ha-secondary{padding:11px 12px;text-align:center;margin-top:4px}
  .ha-header-right{display:none}
}

@media(max-width:560px){
  .ha-header-inner{padding:11px 15px}
  .ha-brand-link{font-size:1.5rem}
  .ha-product-label{font-size:.53rem;letter-spacing:.11em}
}

.ha-site-footer{
  max-width:1080px;
  margin:32px auto 0;
  padding:20px 32px 32px;
  border-top:1px solid var(--ha-border);
  font-family:var(--ha-mono);
  font-size:.76rem;
  color:var(--ha-muted);
  text-align:center;
}
.ha-site-footer-links{display:flex;justify-content:center;gap:16px;flex-wrap:wrap;}
.ha-site-footer-links a{color:var(--ha-muted);text-decoration:none;}
.ha-site-footer-links a:hover{color:var(--ha-teal);}
@media(max-width:560px){.ha-site-footer{padding:16px 20px 26px;}}
