.demo-strip {
  position: relative;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 34px;
  padding: 6px 18px;
  color: rgba(255, 255, 255, 0.84);
  background: linear-gradient(90deg, var(--deep), #2a5073 50%, var(--steel));
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.035em;
  text-align: center;
}

.demo-strip strong {
  color: var(--white);
  font-weight: 750;
}

.demo-strip .icon {
  width: 13px;
  height: 13px;
  opacity: 0.72;
}

site-header,
site-footer {
  display: block;
}

.site-header-wrap {
  position: sticky;
  z-index: 50;
  top: 0;
  display: block;
  padding: 14px 0 0;
  pointer-events: none;
}

.site-header {
  position: relative;
  z-index: 51;
  pointer-events: auto;
  width: min(1260px, calc(100% - 32px));
  margin-inline: auto;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow:
    0 1px 2px rgba(27, 59, 90, 0.03),
    0 20px 50px rgba(27, 59, 90, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.site-header.is-scrolled {
  border-color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    0 2px 3px rgba(27, 59, 90, 0.03),
    0 22px 50px rgba(27, 59, 90, 0.11),
    inset 0 1px 0 var(--white);
}

.header-inner {
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  gap: 22px;
  padding: 0 16px 0 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  position: relative;
  display: block;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 5px 16px rgba(27, 59, 90, 0.17), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: transform 0.35s var(--ease);
}

.brand:hover .brand-mark {
  transform: rotate(-4deg) scale(1.04);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.brand-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  overflow: hidden;
  color: var(--deep);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.035em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-sub {
  color: var(--faint);
  font-size: 7.5px;
  font-weight: 750;
  letter-spacing: 0.23em;
  line-height: 1.2;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 2px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
  color: var(--deep);
  background: rgba(255, 255, 255, 0.6);
}

.nav-link.is-active {
  color: var(--deep);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 14px rgba(27, 59, 90, 0.045);
}

.nav-link.is-active::before {
  content: '';
  width: 4px;
  height: 4px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--wave-shadow);
}

.header-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
}

.auth-slot {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-skeleton {
  width: 136px;
  height: 42px;
  border-radius: 999px;
}

.user-menu {
  position: relative;
}

.user-trigger {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 9px;
  padding: 4px 13px 4px 4px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 999px;
  color: var(--deep);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow-xs);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.user-trigger:hover,
.user-trigger[aria-expanded='true'] {
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.user-trigger .avatar {
  width: 36px;
  height: 36px;
}

.user-trigger-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.user-trigger-name {
  max-width: 112px;
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 750;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-trigger-role {
  color: var(--faint);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}

.user-trigger .chevron {
  width: 13px;
  height: 13px;
  color: var(--faint);
  transition: transform 0.2s ease;
}

.user-trigger[aria-expanded='true'] .chevron {
  transform: rotate(180deg);
}

.user-dropdown {
  position: absolute;
  z-index: 70;
  top: calc(100% + 10px);
  right: 0;
  width: 258px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(20px);
  animation: dropdown-in 0.2s var(--ease);
}

@keyframes dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-5px) scale(0.985);
  }
}

.dropdown-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 9px 12px;
  border-bottom: 1px solid var(--line);
}

.dropdown-head .avatar {
  width: 40px;
  height: 40px;
}

.dropdown-head-text {
  min-width: 0;
}

.dropdown-head-text strong {
  display: block;
  overflow: hidden;
  color: var(--deep);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-head-text span {
  display: block;
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  transition: background 0.18s ease, color 0.18s ease;
}

.dropdown-link:hover {
  color: var(--deep);
  background: rgba(198, 238, 247, 0.35);
}

.dropdown-link .icon {
  width: 16px;
  height: 16px;
  color: var(--steel);
}

.dropdown-link-danger {
  color: var(--steel);
}

.dropdown-sep {
  height: 1px;
  margin: 5px 7px;
  background: var(--line);
}

.mobile-toggle {
  display: none;
}

.mobile-nav {
  display: none;
}

/* Footer */
.site-footer {
  position: relative;
  margin-top: 60px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.72);
  background: linear-gradient(155deg, #1b3b5a 0%, #223f5d 52%, #2c4e69 100%);
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -260px;
  right: -40px;
  width: 700px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(156, 224, 216, 0.2), transparent 66%);
  pointer-events: none;
}

.footer-wave {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 90px;
  opacity: 0.55;
  pointer-events: none;
}

.footer-main {
  position: relative;
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 0.8fr 1fr;
  gap: clamp(28px, 5vw, 70px);
  padding: 94px 0 56px;
}

.footer-brand {
  max-width: 310px;
}

.footer-brand .brand {
  margin-bottom: 18px;
}

.footer-brand .brand-name {
  color: var(--white);
}

.footer-brand .brand-sub {
  color: rgba(255, 255, 255, 0.47);
}

.footer-brand .brand-mark {
  border-color: rgba(255, 255, 255, 0.35);
}

.footer-description {
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  line-height: 1.7;
}

.footer-steam {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 650;
}

.footer-steam .icon {
  width: 15px;
  height: 15px;
}

.footer-col h3 {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12.5px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-links a:hover {
  color: var(--white);
  transform: translateX(3px);
}

.footer-bottom {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 24px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
  font-size: 10.5px;
  line-height: 1.6;
}

.footer-bottom .footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.62);
}

.footer-bottom a:hover {
  color: var(--white);
}

.footer-legal {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.28);
  font-size: 9.5px;
  line-height: 1.6;
}

/* Page hero shared by inner pages */
.page-hero {
  position: relative;
  padding: clamp(56px, 8vw, 104px) 0 clamp(44px, 6vw, 74px);
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  top: -190px;
  right: -90px;
  width: 580px;
  height: 580px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 44% 44%, rgba(255, 255, 255, 0.68), transparent 50%),
    radial-gradient(circle at 64% 56%, rgba(156, 224, 216, 0.46), transparent 64%);
  filter: blur(10px);
}

.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  align-items: end;
  gap: clamp(32px, 6vw, 80px);
}

.page-hero h1 {
  max-width: 860px;
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 84px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.99;
}

.page-hero-lead {
  max-width: 590px;
  margin-top: 24px;
  color: var(--muted);
  font-size: clamp(14.5px, 1.6vw, 17px);
  line-height: 1.75;
}

.page-hero-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 7px;
}

.hero-stat-card {
  width: 100%;
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 20px;
  background: var(--grad-glass);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.hero-stat-card .stat-value {
  display: block;
  color: var(--deep);
  font-family: var(--font-display);
  font-size: 31px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.hero-stat-card .stat-label {
  display: block;
  margin-top: 7px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-section {
  padding: clamp(34px, 5vw, 60px) 0 clamp(72px, 9vw, 120px);
}

@media (max-width: 1040px) {
  .main-nav {
    gap: 0;
  }

  .nav-link {
    padding-inline: 10px;
    font-size: 11.5px;
  }

  .header-inner {
    gap: 12px;
  }

  .footer-main {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
    max-width: 430px;
  }
}

@media (max-width: 880px) {
  .main-nav {
    display: none;
  }

  .mobile-toggle {
    display: inline-grid;
  }

  .user-trigger-text,
  .user-trigger .chevron {
    display: none;
  }

  .user-trigger {
    padding: 4px;
  }

  .auth-desktop {
    display: none;
  }

  .site-header {
    width: calc(100% - 20px);
    border-radius: 19px;
  }

  .header-inner {
    min-height: 68px;
    padding-inline: 13px;
  }

  .brand-mark {
    width: 39px;
    height: 39px;
  }

  .brand-name {
    font-size: 14.5px;
  }

  .brand-sub {
    font-size: 6.5px;
  }

  .site-header-wrap {
    padding-top: 9px;
  }

  .mobile-nav {
    position: fixed;
    z-index: 49;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: 100px 18px 30px;
    overflow-y: auto;
    visibility: hidden;
    pointer-events: auto;
    background: rgba(244, 251, 254, 0.92);
    backdrop-filter: blur(24px);
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  .mobile-nav.is-open {
    visibility: visible;
    opacity: 1;
  }

  .mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 28px;
  }

  .mobile-nav .nav-link {
    display: flex;
    justify-content: space-between;
    padding: 16px 15px;
    border-radius: 13px;
    color: var(--deep);
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 500;
    letter-spacing: -0.03em;
  }

  .mobile-nav .nav-link::after {
    content: '↗';
    color: var(--faint);
    font-family: var(--font-body);
    font-size: 16px;
  }

  .mobile-nav .nav-link.is-active::before {
    display: none;
  }

  .mobile-nav .nav-link.is-active::after {
    content: '•';
    color: var(--wave-shadow);
  }

  .mobile-nav-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--line);
  }

  .mobile-nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.55);
  }

  .mobile-nav-user-text {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
  }

  .mobile-nav-user-text strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-nav-user-text span {
    color: var(--faint);
    font-size: 10px;
  }

  .mobile-nav-user .btn {
    margin-left: auto;
  }

  body.menu-open {
    overflow: hidden;
  }

  .page-hero-grid {
    grid-template-columns: 1fr;
  }

  .page-hero-aside {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 76px;
  }
}

@media (max-width: 560px) {
  .brand-sub {
    display: none;
  }

  .brand-name {
    font-size: 13.5px;
  }

  .header-actions > .btn {
    min-height: 40px;
    padding: 9px 15px;
    font-size: 11.5px;
  }

  .header-actions > .btn .icon {
    width: 15px;
    height: 15px;
  }

  .footer-main {
    gap: 32px 22px;
  }

  .footer-col h3 {
    margin-bottom: 13px;
  }

  .page-hero-aside {
    grid-template-columns: 1fr;
  }

  .page-hero h1 {
    font-size: clamp(38px, 13vw, 56px);
  }

  .demo-strip {
    align-items: flex-start;
    font-size: 9.5px;
    line-height: 1.45;
    padding-inline: 12px;
  }
}
