.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.container-wide {
  width: min(1280px, calc(100% - 24px));
  margin: 0 auto;
}

.container-narrow {
  width: min(780px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--color-header-bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--mshp-line);
  margin-bottom: var(--space-8);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 64px;
}

.logo {
  color: var(--mshp-text);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.logo:hover {
  color: var(--mshp-sky-dark);
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.nav-link {
  color: var(--mshp-text);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 10px 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-sm);
  border-bottom: 2px solid transparent;
}

.nav-link:hover {
  background: var(--mshp-surface-2);
  color: var(--mshp-text);
  text-decoration: none;
}

.nav-link.is-active {
  background: var(--mshp-surface-3);
  border-bottom-color: var(--mshp-sky);
  color: var(--mshp-text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}

.nav-toggle,
.drawer-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--mshp-line);
  background: var(--mshp-paper);
  border-radius: var(--radius-md);
  color: var(--mshp-text);
  cursor: pointer;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.page-header h1 {
  margin-bottom: var(--space-2);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  font-size: 0.875rem;
  color: var(--mshp-muted);
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
}

.breadcrumbs a {
  color: var(--mshp-text);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: var(--space-2);
  color: var(--mshp-line-strong);
}

.site-main {
  padding-bottom: var(--space-12);
}

.drawer-backdrop {
  display: none;
}

.profile-menu {
  position: relative;
}

.profile-menu-panel {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 200px;
  background: var(--mshp-paper);
  border: 1px solid var(--mshp-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-2);
  z-index: 50;
}

.profile-menu.is-open .profile-menu-panel {
  display: block;
}

.profile-menu-user {
  padding: 8px 12px;
  margin: 0;
}

.profile-menu-panel .button--ghost {
  width: 100%;
  justify-content: flex-start;
}

@media (max-width: 860px) {
  .site-header {
    margin-bottom: var(--space-6);
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    background: var(--mshp-paper);
    border-bottom: 1px solid var(--mshp-line);
    padding: var(--space-3);
    flex-direction: column;
    align-items: stretch;
  }

  .site-header.is-nav-open .nav {
    display: flex;
  }

  .nav-link {
    width: 100%;
  }

  .header-inner {
    flex-wrap: wrap;
  }
}
