/* One header for every platform page; HTML is rendered by web/presentation.py. */
:root {
  --site-max: 1200px;
  --site-gutter: 48px;
  --soto-header-space: calc(var(--soto-header-height) + 48px);
}
#site-header-root {
  box-sizing: border-box;
  position: relative;
  z-index: 50;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: calc(100% - var(--site-gutter) * 2);
  max-width: var(--site-max);
  min-height: var(--soto-header-height);
  margin: 24px auto;
  padding: 8px 24px;
  border: 1px solid var(--soto-border);
  border-radius: var(--soto-radius-lg, 16px);
  background: var(--soto-surface);
  color: var(--soto-text);
  font: 400 14px/20px var(--soto-font);
}
#site-header-root * { box-sizing: border-box; }
#site-header-root a { color: inherit; text-decoration: none; }
#site-header-root .wordmark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  margin: 0 auto 0 0;
  padding: 0;
  font: 700 18px/24px var(--soto-font);
  letter-spacing: -.025em;
  white-space: nowrap;
}
#site-header-root .wordmark span { font-weight: 400; color: var(--soto-text-secondary); }
#site-header-root .wordmark i { display: none; }
#site-header-root nav {
  position: static;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
#site-header-root nav > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 0;
  color: var(--soto-text-secondary);
  font: 500 14px/20px var(--soto-font);
  white-space: nowrap;
}
#site-header-root nav > a:hover { color: var(--soto-text); }
#site-header-root nav > a[aria-current="page"] { color: var(--soto-text); }
#site-header-root nav > a[aria-current="page"]::after {
  content: '';
  position: absolute;
  inset: auto 0 2px;
  height: 2px;
  background: var(--soto-accent);
}
#site-header-root #commHeaderLink {
  padding: 8px 12px;
  border: 1px solid var(--soto-border-strong);
  border-radius: var(--soto-radius-sm, 8px);
  color: var(--soto-text);
}
#site-header-root #commHeaderLink::after { display: none; }
#site-header-root .header-avatar {
  display: block;
  width: 28px;
  height: 28px;
  margin: 0;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
#site-header-root #commBtnAvatar { display: inline-flex; align-items: center; }
#site-header-root #commBtnAvatar[hidden] { display: none; }
#site-header-root :is(#commBtnLabel, .account-name) {
  overflow: hidden;
  max-width: 140px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#site-header-root :is(.mobile-cabinet, .mobile-menu-toggle) { display: none; }
#site-header-root :is(a, button):focus-visible {
  outline: 2px solid var(--soto-accent);
  outline-offset: 4px;
}
#site-header-root svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#site-header-root .mobile-menu-toggle { cursor: pointer; }
#site-header-root .mobile-menu-toggle svg { transition: transform var(--soto-duration-normal, 300ms) var(--soto-ease, cubic-bezier(.22,1,.36,1)); }
#site-header-root .mobile-menu-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
html[data-platform-surface="admin"] #site-header-root,
html.platform-map #site-header-root {
  width: 100%;
  max-width: none;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--soto-border);
  border-radius: 0;
}
html.platform-map, html[data-platform-surface="admin"] { --soto-header-space: var(--soto-header-height); }
html[data-platform-surface="admin"] #site-header-root { position: sticky; top: 0; }
html[data-platform-embedded="true"] #site-header-root { display: none; }
@media (max-width: 1050px) { :root { --site-gutter: 32px; } }
@media (max-width: 900px) {
  #site-header-root { padding: 8px 16px; gap: 12px; }
  #site-header-root .wordmark { font-size: 16px; }
  #site-header-root .mobile-cabinet { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; max-width: 152px; padding: 8px; }
  #site-header-root .mobile-cabinet .account-name { max-width: 76px; }
  #site-header-root .mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; padding: 0; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--soto-text); }
  #site-header-root .mobile-menu-toggle:hover,
  #site-header-root .mobile-menu-toggle[aria-expanded="true"] { background: var(--soto-surface-hover); }
  #site-header-root nav { display: none; position: absolute; top: calc(100% + 8px); inset-inline: 0; flex-direction: column; align-items: stretch; gap: 4px; padding: 16px; border: 1px solid var(--soto-border); border-radius: 12px; background: var(--soto-surface-raised); max-height: calc(100dvh - 160px); overflow: auto; }
  #site-header-root.menu-open nav { display: flex; }
  #site-header-root nav > a { display: flex; min-height: 48px; padding: 12px; border-radius: 8px; font-size: 16px; line-height: 24px; }
  #site-header-root nav > a[aria-current="page"] { background: var(--soto-surface-hover); }
  #site-header-root nav > a[aria-current="page"]::after { display: none; }
  #site-header-root nav #commHeaderLink { display: none; }
}
@media (max-width: 700px) { :root { --site-gutter: 16px; } #site-header-root { gap: 8px; padding: 8px 12px; border-radius: 12px; } #site-header-root .wordmark { font-size: 14px; } }
@media (max-width: 360px) { #site-header-root .mobile-cabinet.is-signed-in { width: 44px; } #site-header-root .mobile-cabinet.is-signed-in .account-name { display: none; } }
@media (prefers-reduced-motion: reduce) { #site-header-root .mobile-menu-toggle svg { transition: none; } }

/* Optional skip link for specialized tools, independent from their stylesheets. */
a.ui-skip { position: absolute; z-index: 100; top: 8px; left: 16px; padding: 12px 16px; background: var(--soto-surface-raised); color: var(--soto-text); border-radius: 8px; transform: translateY(-160%); }
a.ui-skip:focus { transform: none; outline: 2px solid var(--soto-focus); }
