/* ==========================================================================
   SCYPT Unified Top Navigation Bar (shared across all 7 public pages)
   - Mint-tinted floating Liquid Glass capsule (1080px x 60px)
   - Identical brand lockup, tab order, sliding active pill & opaque drawer
   - High specificity so page themes (landing/web-theme/guides/legal) match 100%
   ========================================================================== */

html body header.sg-nav {
  position: sticky;
  top: 14px;
  z-index: 95;
  width: min(1080px, calc(100% - 32px));
  margin: 14px auto 0;
  border-radius: 999px;
  background: linear-gradient(
    110deg,
    rgba(235, 252, 248, 0.84) 0%,
    rgba(255, 255, 255, 0.7) 48%,
    rgba(214, 246, 240, 0.78) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.94);
  box-shadow:
    0 14px 36px -14px rgba(15, 92, 101, 0.16),
    0 2px 8px rgba(31, 59, 65, 0.04),
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 rgba(110, 216, 198, 0.22);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  font-family: 'Noto Sans Thai', 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  color: #1F3B41;
  box-sizing: border-box;
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

html body header.sg-nav.is-scrolled {
  background: linear-gradient(
    110deg,
    rgba(239, 253, 249, 0.94) 0%,
    rgba(255, 255, 255, 0.86) 48%,
    rgba(224, 248, 243, 0.9) 100%
  );
  box-shadow:
    0 18px 42px -14px rgba(15, 92, 101, 0.2),
    inset 0 1px 0 #ffffff;
}

html body header.sg-nav *,
html body header.sg-nav *::before,
html body header.sg-nav *::after {
  box-sizing: border-box;
}

html body header.sg-nav .sg-nav-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  height: 60px;
  padding: 0 12px 0 20px;
}

html body header.sg-nav .sg-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #1F3B41;
  text-decoration: none;
  flex-shrink: 0;
}

html body header.sg-nav .sg-brand:hover {
  text-decoration: none;
}

html body header.sg-nav .sg-brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: block;
  object-fit: contain;
}

html body header.sg-nav .sg-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

html body header.sg-nav .sg-brand-name {
  font-family: 'Inter', 'Noto Sans Thai', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1F3B41;
}

html body header.sg-nav .sg-brand-dot {
  color: #1FC6B2;
}

html body header.sg-nav .sg-brand-sub {
  margin-top: 2px;
  font-family: 'Inter', sans-serif;
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #83999F;
  white-space: nowrap;
}

html body header.sg-nav .sg-nav-links {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  justify-self: center;
  padding: 4px;
  border-radius: 999px;
  background: rgba(31, 59, 65, 0.045);
}

html body header.sg-nav .sg-nav-links::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: var(--sg-pill-left, 4px);
  width: var(--sg-pill-width, 0px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 12px rgba(31, 59, 65, 0.08), inset 0 1px 0 #ffffff;
  opacity: 1;
  transition: left 0.28s cubic-bezier(0.22, 1, 0.36, 1), width 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
  pointer-events: none;
  z-index: 0;
}

html body header.sg-nav .sg-nav-links:not([data-pill-ready])::before,
html body header.sg-nav .sg-nav-links[data-pill-hidden="true"]::before {
  opacity: 0;
}

html body header.sg-nav .sg-nav-links a {
  position: relative;
  z-index: 1;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  color: #5D767C;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

html body header.sg-nav .sg-nav-links a:hover,
html body header.sg-nav .sg-nav-links a[aria-current="page"] {
  color: #1F3B41;
  text-decoration: none;
}

html body header.sg-nav .sg-nav-links:not([data-pill-ready]) a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 12px rgba(31, 59, 65, 0.08), inset 0 1px 0 #ffffff;
}

html body header.sg-nav .sg-nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

html body header.sg-nav .sg-nav-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 0;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(31, 59, 65, 0.08);
  background: rgba(255, 255, 255, 0.8);
  color: #2C4A50;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(31, 59, 65, 0.04), inset 0 1px 0 #ffffff;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

html body header.sg-nav a.sg-nav-login:hover {
  background: #ffffff;
  border-color: rgba(31, 198, 178, 0.35);
  text-decoration: none;
}

html body header.sg-nav button.sg-nav-login:disabled {
  cursor: not-allowed;
  opacity: 0.78;
}

html body header.sg-nav .preview-lock-label {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(15, 132, 123, 0.22);
  background: rgba(230, 247, 244, 0.9);
  color: #0F847B;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
}

html body header.sg-nav .menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.85);
  color: #1F3B41;
  box-shadow: 0 2px 8px rgba(31, 59, 65, 0.06);
  cursor: pointer;
}

html body header.sg-nav .menu-button svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  fill: none;
}

html body header.sg-nav .mobile-nav {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 98;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: 24px;
  background: linear-gradient(155deg, #ffffff 0%, #f6fbfc 100%);
  border: 1px solid rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 56px -12px rgba(31, 59, 65, 0.22), 0 4px 14px rgba(31, 59, 65, 0.08);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html body header.sg-nav .mobile-nav[hidden] {
  display: none;
}

html body header.sg-nav .mobile-nav a,
html body header.sg-nav .mobile-nav button:disabled {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  border-radius: 16px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: #1F3B41;
  text-decoration: none;
  text-align: left;
  border: 0;
  background: transparent;
  box-shadow: none;
}

html body header.sg-nav .mobile-nav a[aria-current="page"],
html body header.sg-nav .mobile-nav a:hover {
  background: rgba(235, 250, 246, 0.95);
  color: #0F847B;
  text-decoration: none;
  box-shadow: none;
}

/* Harmonized Pre-launch Glass Status Capsule (identical across preview pages) */
html body header.sg-nav + .public-preview-notice {
  width: min(740px, calc(100% - 32px));
  margin: 12px auto 0;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(232, 249, 245, 0.6));
  box-shadow: 0 12px 26px -14px rgba(15, 92, 101, 0.14), inset 0 1px 0 #ffffff;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #155E63;
  font-family: 'Noto Sans Thai', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html body header.sg-nav + .public-preview-notice strong {
  font-size: 12.5px;
  font-weight: 600;
}

html body header.sg-nav + .public-preview-notice p {
  margin: 1px 0 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: #5D767C;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html body header.sg-nav,
  html body header.sg-nav + .public-preview-notice {
    background: rgba(251, 253, 253, 0.96);
  }
}

@media (max-width: 820px) {
  html body header.sg-nav {
    width: calc(100% - 24px);
    top: 10px;
    margin-top: 10px;
  }

  html body header.sg-nav .sg-nav-inner {
    grid-template-columns: auto auto;
    justify-content: space-between;
    padding: 0 10px 0 16px;
  }

  html body header.sg-nav .sg-nav-links,
  html body header.sg-nav .sg-nav-login {
    display: none;
  }

  html body header.sg-nav .menu-button {
    display: inline-flex;
  }

  html body header.sg-nav + .public-preview-notice {
    width: calc(100% - 24px);
    border-radius: 20px;
    justify-content: flex-start;
    padding: 10px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body header.sg-nav,
  html body header.sg-nav .sg-nav-links::before {
    transition: none;
  }
}
