/* Canonical HUD shell overrides for current public template pages. */

body {
  overflow-x: hidden;
}

.page {
  max-width: 100%;
}

.topbar {
  gap: clamp(0.9rem, 2vw, 1.5rem);
  padding: clamp(0.8rem, 2vw, 1rem) clamp(1rem, 4vw, 2.25rem) clamp(0.72rem, 1.8vw, 0.9rem);
  flex-wrap: wrap;
}

.logo-slot {
  gap: clamp(0.75rem, 2vw, 1.1rem);
  max-width: 100%;
}

.logo-mark {
  height: clamp(72px, 10vw, 106px);
  flex: 0 0 auto;
}

.logo-title {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
}

.logo-title strong {
  font-size: clamp(1.35rem, 4vw, 2.22rem);
  line-height: 1.02;
}

.logo-title span {
  display: block;
  max-width: 100%;
  font-size: clamp(0.72rem, 1.8vw, 0.9rem);
  letter-spacing: clamp(0.08em, 0.22vw, 0.22em);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.top-actions {
  gap: clamp(0.45rem, 1vw, 0.8rem);
}

.cta {
  max-width: 100%;
  text-align: center;
}

.chip-track {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.content-shell,
.side-menu,
.main,
.panel,
.panel-heading,
.site-template {
  min-width: 0;
}

.main > * {
  min-width: 0;
}

.panel-title {
  flex-wrap: wrap;
  row-gap: 0.25rem;
  font-size: clamp(1.05rem, 2.6vw, 1.55rem);
}

.panel-footer,
.site-footer-inner,
.site-footer-nav {
  flex-wrap: wrap;
}

.menu-item,
.route-list a,
.block-list li {
  min-width: 0;
}

.menu-label,
.panel-title span,
.route-list a span,
.block-list li span {
  overflow-wrap: anywhere;
}

@media (max-width: 920px) {
  .topbar {
    align-items: flex-start;
  }

  .logo-slot {
    flex: 1 1 100%;
  }

  .top-actions {
    width: 100%;
    margin-left: 0;
    align-items: flex-start;
  }

  .chip-track {
    justify-content: flex-start;
  }

  .content-shell {
    flex-direction: column;
  }

  .side-menu {
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 1rem 1rem 1.15rem;
    gap: 0.7rem;
    border-right: 0;
    border-bottom: 1px solid var(--syzygy-line, rgba(205, 179, 255, 0.26));
    border-radius: 0 0 1.6rem 1.6rem;
  }

  .side-toggle {
    display: none;
  }

  .menu-heading {
    text-align: left;
    padding-right: 0;
  }

  .menu-item {
    width: 100%;
    justify-content: space-between;
    border-radius: 999px;
    padding: 0.55rem 0.8rem;
  }

  .content-shell.is-collapsed .side-menu {
    min-width: 0;
    padding: 1rem 1rem 1.15rem;
  }

  .content-shell.is-collapsed .menu-heading,
  .content-shell.is-collapsed .menu-item .menu-label,
  .content-shell.is-collapsed .menu-item .menu-indicator {
    opacity: 1;
    width: auto;
    overflow: visible;
  }

  .content-shell.is-collapsed .menu-item {
    justify-content: space-between;
    padding: 0.55rem 0.8rem;
  }

  .content-shell.is-collapsed .menu-item .menu-glyph {
    display: inline-block;
  }

  .main {
    padding: 1rem 1rem 2rem;
  }

  .panel-heading {
    padding: 0.6rem 0.8rem;
    border-radius: 1rem;
  }

  .site-template {
    padding: 0.65rem;
  }

  .site-footer {
    padding: 1rem 1rem 1.25rem;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 0.8rem 0.8rem 0.7rem;
  }

  .logo-slot {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: flex-start;
    padding: 0.5rem 0.7rem 0.55rem;
    border-radius: 1rem;
  }

  .logo-mark {
    width: 52px;
    height: 52px;
  }

  .logo-title strong {
    font-size: 1.08rem;
  }

  .logo-title span {
    font-size: 0.56rem;
    letter-spacing: 0.05em;
    white-space: normal;
  }

  .cta {
    width: 100%;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    font-size: 0.7rem;
  }

  .chip-track {
    display: none;
  }

  .panel-title {
    font-size: 1rem;
  }

  .panel-footer {
    flex-direction: column;
    padding: 0;
    font-size: 0.76rem;
  }

  .site-template,
  .template-block,
  .hero-card {
    border-radius: 0.85rem;
  }
}
