/* The selected Contorno menu, shared by all published pages.
   Keep legacy page/content styles outside this header untouched. */
html body:is(.page-body, .site-body) > .dashboard-shell { padding-top: 0; }
html body:is(.page-body, .site-body) .topbar.site-header {
  position: relative;
  inset: auto !important;
  display: grid !important;
  grid-template-areas: none !important;
  grid-template-columns: 1.1fr auto 1fr !important;
  grid-template-rows: auto;
  align-items: center;
  width: min(1230px, calc(100% - 48px)) !important;
  height: 104px !important;
  min-height: 104px !important;
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.5;
  gap: 24px !important;
  margin: 0 auto !important;
  padding: 16px 0 !important;
  overflow: visible;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html body:is(.page-body, .site-body) .topbar.site-header::before,
html body:is(.page-body, .site-body) .topbar.site-header::after { display: none !important; }
html body:is(.page-body, .site-body) .site-header .brand-mark { display: flex; align-items: center; justify-content: center; overflow: hidden; }
html body:is(.page-body, .site-body) .site-header .topbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  grid-area: auto;
  grid-column: 1;
  grid-row: 1;
  flex: none;
  min-width: 0 !important;
  max-width: none !important;
  gap: 13px;
  padding: 0 !important;
}
html body:is(.page-body, .site-body) .topbar.site-header .brand-mark,
html body:is(.page-body, .site-body) .topbar.site-header .brand-mark img {
  width: 56px !important;
  height: 56px !important;
  min-width: 56px !important;
  flex: 0 0 56px;
  border-radius: 16px;
}
html body:is(.page-body, .site-body) .site-header .topbar-brand strong {
  display: block;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.8px;
}
html body:is(.page-body, .site-body) .site-header .topbar-brand small:not(.sr-only) {
  display: block;
  max-width: 280px;
  margin-top: 4px;
  overflow: visible;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  white-space: normal;
}
html body:is(.page-body, .site-body) .topbar.site-header .top-nav {
  position: static !important;
  inset: auto !important;
  grid-area: auto;
  grid-column: 2;
  grid-row: 1;
  display: flex !important;
  flex: initial;
  flex-wrap: nowrap;
  justify-content: center;
  justify-self: stretch;
  order: 0 !important;
  width: auto !important;
  max-width: none;
  height: auto !important;
  min-height: 44px !important;
  gap: 10px !important;
  padding: 0 !important;
  overflow: visible !important;
}
html body:is(.page-body, .site-body) .topbar.site-header .top-nav a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto;
  min-width: 0;
  height: 44px !important;
  min-height: 44px !important;
  margin: 0;
  padding: 0 19px !important;
  border: 1px solid transparent !important;
  border-radius: 18px;
  color: var(--gp-muted) !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 600;
  line-height: 1.2 !important;
  text-align: center;
  text-decoration: none;
  white-space: nowrap !important;
  transition: color 160ms ease, box-shadow 160ms ease;
}
html body:is(.page-body, .site-body) .topbar.site-header .top-nav a:is(.active, [aria-current='page']) {
  color: var(--gp-accent) !important;
  box-shadow: inset 0 0 0 1px var(--gp-accent) !important;
}
html body:is(.page-body, .site-body) .topbar.site-header .topbar-actions {
  grid-area: auto;
  grid-column: 3;
  grid-row: 1;
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  gap: 24px;
  min-height: 0 !important;
  height: auto !important;
  margin: 0;
  padding: 0 !important;
  overflow: visible;
}
html body:is(.page-body, .site-body) .topbar.site-header .topbar-actions .user-chip {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  min-width: 120px;
  max-width: 192px;
  min-height: 44px;
  height: 44px;
  box-sizing: border-box;
  line-height: 1.2;
  padding: 0 20px;
  border: 1px solid var(--gp-accent);
  border-radius: 999px;
  text-decoration: none;
  background: transparent !important;
}
html body:is(.page-body, .site-body) .site-header .user-chip strong {
  min-width: 0;
  max-width: none;
  overflow: hidden;
  color: var(--gp-accent) !important;
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html body:is(.page-body, .site-body) .site-header .user-chip .ui-icon { display: inline-block !important; }
html body:is(.page-body, .site-body) .topbar.site-header .theme-controls {
  position: static !important;
  inset: auto !important;
  display: inline-flex !important;
  flex-direction: row;
  flex: 0 0 auto;
  width: auto !important;
  min-width: 0;
  height: auto !important;
  min-height: 0 !important;
  margin: 0;
  padding: 2px;
  line-height: 1;
}
@media (hover: hover) and (pointer: fine) {
  html body:is(.page-body, .site-body) .topbar.site-header .top-nav a:hover { color: var(--gp-accent) !important; }
}
@media (max-width: 1200px) {
  html body:is(.page-body, .site-body) .site-header .topbar-brand small:not(.sr-only) { display: none; }
  html body:is(.page-body, .site-body) .topbar.site-header .topbar-actions { gap: 12px; }
  html body:is(.page-body, .site-body) .topbar.site-header .top-nav a { padding-inline: 13px !important; }
}
@media (max-width: 1099px) {
  html body:is(.page-body, .site-body) .topbar.site-header {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto;
    height: auto !important;
    min-height: 0 !important;
    gap: 12px 16px !important;
  }
  html body:is(.page-body, .site-body) .topbar.site-header .topbar-actions { grid-column: 2; gap: 8px; }
  html body:is(.page-body, .site-body) .topbar.site-header .top-nav {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100% !important;
    height: 44px !important;
    gap: 8px !important;
  }
  html body:is(.page-body, .site-body) .topbar.site-header .top-nav a {
    width: 100%;
    padding-inline: 8px !important;
    border-radius: 14px;
    font-size: 12px !important;
  }
}
@media (max-width: 960px) {
  html body:is(.page-body, .site-body) .site-header .topbar-brand strong { font-size: 24px; }
}
@media (max-width: 640px) {
  html body:is(.page-body, .site-body) .topbar.site-header { width: calc(100% - 32px) !important; }
  html body:is(.page-body, .site-body) .site-header .topbar-brand { margin-right: auto; gap: 8px; }
  html body:is(.page-body, .site-body) .topbar.site-header .brand-mark,
  html body:is(.page-body, .site-body) .topbar.site-header .brand-mark img {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    flex-basis: 40px;
    border-radius: 12px;
  }
  html body:is(.page-body, .site-body) .site-header .topbar-brand strong { font-size: 21px; }
  html body:is(.page-body, .site-body) .topbar.site-header .topbar-actions .user-chip {
    justify-content: center;
    width: 42px;
    min-width: 0;
    min-height: 42px;
    height: 42px;
    padding: 0;
  }
  html body:is(.page-body, .site-body) .site-header .user-chip strong { display: none; }
  html body:is(.page-body, .site-body) .site-header .theme-controls button { width: 40px; height: 40px; }
  html body:is(.page-body, .site-body) .topbar.site-header .top-nav a { border-radius: 12px; }
}
@media (max-width: 400px) {
  html body:is(.page-body, .site-body) .topbar.site-header { gap: 10px 6px !important; padding-block: 12px !important; }
  html body:is(.page-body, .site-body) .topbar.site-header .top-nav { gap: 4px !important; }
  html body:is(.page-body, .site-body) .topbar.site-header .top-nav a { padding-inline: 3px !important; font-size: 11px !important; }
}
@media (max-width: 360px) {
  html body:is(.page-body, .site-body) .topbar.site-header { width: calc(100% - 24px) !important; gap: 4px !important; }
  html body:is(.page-body, .site-body) .site-header .topbar-brand { gap: 5px; }
  html body:is(.page-body, .site-body) .topbar.site-header .brand-mark,
  html body:is(.page-body, .site-body) .topbar.site-header .brand-mark img {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    flex-basis: 32px;
  }
  html body:is(.page-body, .site-body) .site-header .topbar-brand strong { font-size: 17px; }
  html body:is(.page-body, .site-body) .topbar.site-header .topbar-actions { gap: 4px; }
  html body:is(.page-body, .site-body) .site-header .theme-controls [aria-pressed='true'] { display: none; }
  html body:is(.page-body, .site-body) .topbar.site-header .top-nav a { font-size: 10px !important; white-space: normal !important; }
}
@media (prefers-reduced-motion: reduce) {
  html body:is(.page-body, .site-body) .site-header .top-nav a { transition: none; }
}
