/* Shared WaSeen site shell — left nav on desktop, drawer on mobile */
:root {
  --sidebar-w: 252px;
  --shell-accent: #00d4aa;
  --shell-accent-dim: #00a884;
  --shell-border: #243044;
  --shell-muted: #a0afbe;
  --shell-text: #e8edf2;
  --shell-bg: #070a0f;
  --shell-surface: #0f1419;
}

body.has-site-nav {
  margin: 0;
  min-height: 100vh;
}

.site-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  max-width: var(--sidebar-w);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.15rem 0.85rem 1.5rem;
  background: rgba(11, 16, 22, 0.96);
  border-right: 1px solid var(--shell-border);
  backdrop-filter: blur(14px);
  overflow-x: hidden;
  overflow-y: auto;
  transform: translateX(0);
  transition: transform 0.22s ease;
}

.site-sidebar-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.15rem;
  min-height: 0;
  width: 100%;
}

.site-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.55rem 0.85rem;
  margin-bottom: 0.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--shell-text);
  text-decoration: none;
  border-bottom: 1px solid var(--shell-border);
}

.site-sidebar-brand img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  box-shadow: 0 0 18px rgba(0, 212, 170, 0.22);
}

.site-nav-label {
  margin: 0.85rem 0.55rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5a687c;
}

.site-nav-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  color: var(--shell-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  min-width: 0;
  width: 100%;
}

.site-nav-link:hover {
  background: rgba(0, 212, 170, 0.08);
  color: var(--shell-text);
}

.site-nav-link.active {
  background: rgba(0, 212, 170, 0.14);
  color: var(--shell-accent);
  box-shadow: inset 3px 0 0 var(--shell-accent);
}

.site-nav-link .ico {
  width: 1.15rem;
  text-align: center;
  opacity: 0.85;
  flex-shrink: 0;
}

.site-nav-link.external::after {
  content: "↗";
  margin-left: auto;
  font-size: 0.72rem;
  opacity: 0.55;
}

.site-content {
  min-height: 100vh;
  margin-left: var(--sidebar-w);
  position: relative;
  z-index: 1;
}

.site-menu-btn {
  display: none;
  position: fixed;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 50;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--shell-border);
  border-radius: 10px;
  background: rgba(15, 20, 25, 0.92);
  color: var(--shell-text);
  font-size: 1.15rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.site-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(0, 0, 0, 0.55);
  border: none;
  padding: 0;
  cursor: pointer;
}

@media (max-width: 960px) {
  .site-sidebar {
    transform: translateX(-105%);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.45);
  }

  body.site-nav-open .site-sidebar {
    transform: translateX(0);
  }

  body.site-nav-open .site-sidebar-backdrop {
    display: block;
  }

  .site-content {
    margin-left: 0;
  }

  .site-menu-btn {
    display: grid;
    place-items: center;
  }

  /* Keep top header clear of the menu button on landing */
  body.has-site-nav header nav {
    padding-left: 2.75rem;
  }
}

/* Subpages — readable column beside nav */
body.has-site-nav.page-doc .site-content {
  padding: 1.5rem 1.25rem 3rem;
}

body.has-site-nav.page-doc .doc-wrap {
  max-width: 44rem;
  margin: 0 auto;
}

body.has-site-nav.page-doc h1 {
  font-size: 1.65rem;
  color: var(--shell-accent);
  margin: 0 0 0.5rem;
}

body.has-site-nav.page-doc h2 {
  font-size: 1.05rem;
  color: var(--shell-accent-dim);
  margin: 1.5rem 0 0.5rem;
}

body.has-site-nav.page-doc p,
body.has-site-nav.page-doc li {
  color: var(--shell-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

body.has-site-nav.page-doc a {
  color: var(--shell-accent);
}

body.has-site-nav.page-doc .bar {
  width: 5rem;
  height: 4px;
  background: var(--shell-accent);
  border-radius: 2px;
  margin: 0 0 1.25rem;
}

html[dir="rtl"] .site-sidebar {
  inset: 0 0 0 auto;
  border-right: none;
  border-left: 1px solid var(--shell-border);
}

html[dir="rtl"] .site-content {
  margin-left: 0;
  margin-right: var(--sidebar-w);
}

html[dir="rtl"] .site-nav-link.active {
  box-shadow: inset -3px 0 0 var(--shell-accent);
}

@media (max-width: 960px) {
  html[dir="rtl"] .site-content {
    margin-right: 0;
  }

  html[dir="rtl"] .site-sidebar {
    transform: translateX(105%);
  }

  html[dir="rtl"] body.site-nav-open .site-sidebar {
    transform: translateX(0);
  }

  html[dir="rtl"] .site-menu-btn {
    left: auto;
    right: 0.85rem;
  }
}
