:root {
  --orange: #FF6B2B;
  --orange-light: #FF8F5C;
  --orange-glow: rgba(255, 107, 43, 0.4);
  --orange-subtle: rgba(255, 107, 43, 0.08);
  --dark: #0D0D1A;
  --dark-card: #151528;
  --dark-elevated: #1C1C35;
  --dark-border: rgba(255, 255, 255, 0.06);
  --gray-400: #8888A4;
  --gray-200: #E0E0EC;
  --white: #FFFFFF;
  --success: #22C55E;
  --warning: #FBBF24;
  --danger: #EF4444;
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'Space Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-display);
  background: var(--dark);
  color: var(--gray-200);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.02'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* === NAV === */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(13, 13, 26, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--dark-border);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 22px;
  font-weight: 900;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-logo span { color: var(--orange); }

.nav-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--gray-400);
}

.nav-breadcrumb a {
  color: var(--gray-400);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-breadcrumb a:hover { color: var(--orange); }

.nav-breadcrumb .separator { opacity: 0.4; }

.nav-breadcrumb .current { color: var(--white); font-weight: 600; }

/* === LAYOUT === */
.page-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 40px 60px;
  gap: 48px;
}

/* === SIDEBAR === */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-top: 20px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.sidebar-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--orange);
  margin-bottom: 16px;
  padding-left: 12px;
}

.sidebar-nav {
  list-style: none;
}

.sidebar-nav li a {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--gray-400);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s;
  border-left: 2px solid transparent;
}

.sidebar-nav li a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.03);
}

.sidebar-nav li a.active {
  color: var(--orange);
  background: var(--orange-subtle);
  border-left-color: var(--orange);
}

.sidebar-nav li.sub a {
  padding-left: 24px;
  font-size: 13px;
}

/* === CONTENT === */
.content {
  flex: 1;
  min-width: 0;
  padding-top: 20px;
}

/* Hero header */
.doc-hero {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--dark-border);
}

.doc-hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--orange-subtle);
  border: 1px solid rgba(255,107,43,0.2);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--orange);
  margin-bottom: 16px;
}

.doc-hero .badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
}

.doc-hero h1 {
  font-size: 42px;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 12px;
}

.doc-hero .subtitle {
  font-size: 18px;
  color: var(--gray-400);
  line-height: 1.6;
  max-width: 600px;
}

/* Prose content */
.prose h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -1px;
  margin: 48px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--dark-border);
  scroll-margin-top: 80px;
}

.prose h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.prose h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin: 32px 0 12px;
  scroll-margin-top: 80px;
}

.prose p {
  font-size: 16px;
  color: var(--gray-200);
  line-height: 1.75;
  margin-bottom: 16px;
}

.prose strong {
  color: var(--white);
  font-weight: 700;
}

/* Prose links */
.prose a {
  color: var(--orange);
  text-decoration: none;
  transition: text-decoration 0.2s;
}

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

/* Prose inline code */
.prose code {
  font-family: var(--font-mono);
  background: var(--dark-elevated);
  border: 1px solid var(--orange-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Tables */
.prose .table-wrapper {
  overflow-x: auto;
  margin: 20px 0 24px;
  border-radius: 16px;
  border: 1px solid var(--dark-border);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  background: var(--dark-card);
}

.prose table thead th {
  padding: 16px 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
  text-align: left;
  border-bottom: 1px solid var(--dark-border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.prose table tbody td {
  padding: 14px 20px;
  font-size: 14px;
  color: var(--gray-200);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  line-height: 1.5;
}

.prose table tbody tr:last-child td {
  border-bottom: none;
}

.prose table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.prose table tbody td strong {
  color: var(--white);
}

/* Lists */
.prose ul, .prose ol {
  margin: 12px 0 20px;
  padding-left: 0;
  list-style: none;
}

.prose ul li, .prose ol li {
  position: relative;
  padding: 8px 0 8px 28px;
  font-size: 15px;
  color: var(--gray-200);
  line-height: 1.65;
}

.prose ul li::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 16px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
}

/* Callout / tip boxes */
.callout {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-left: 3px solid var(--orange);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0;
}

.callout-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.callout p {
  font-size: 14px;
  color: var(--gray-400);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Health indicators */
.health-indicators {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0 24px;
}

.health-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 12px;
}

.health-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.health-dot.green { background: var(--success); box-shadow: 0 0 8px rgba(34, 197, 94, 0.4); }
.health-dot.yellow { background: var(--warning); box-shadow: 0 0 8px rgba(251, 191, 36, 0.4); }
.health-dot.red { background: var(--danger); box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }

.health-item .health-text {
  font-size: 14px;
  color: var(--gray-200);
  line-height: 1.5;
}

.health-item .health-text strong {
  color: var(--white);
}

/* Tips section */
.tips-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 20px 0 24px;
}

.tip-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 14px;
  padding: 20px 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.tip-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.tip-card:hover {
  border-color: rgba(255,107,43,0.2);
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.tip-card:hover::before { opacity: 1; }

.tip-card p {
  font-size: 15px;
  color: var(--gray-200);
  line-height: 1.6;
  margin-bottom: 0;
}

.tip-card strong {
  color: var(--orange);
}

/* Footer */
.doc-footer {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--dark-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.doc-footer a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 12px;
  color: var(--gray-200);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
}

.doc-footer a:hover {
  border-color: var(--orange);
  color: var(--orange);
  transform: translateY(-2px);
}

.doc-footer a .arrow { font-size: 18px; }

.page-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--dark-border);
  padding: 32px 40px;
  text-align: center;
}

.page-footer p {
  font-size: 13px;
  color: var(--gray-400);
}

.page-footer a {
  color: var(--orange);
  text-decoration: none;
}

/* === MOBILE MENU TOGGLE === */
.mobile-menu-toggle {
  display: none;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 8px;
  color: var(--white);
  font-size: 24px;
  padding: 8px 12px;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s;
}

.mobile-menu-toggle:hover {
  border-color: var(--orange);
  color: var(--orange);
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .page-wrapper { flex-direction: column; padding: 80px 20px 40px; gap: 0; }

  .sidebar {
    width: 100%;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    max-height: calc(100vh - 60px);
    background: var(--dark);
    padding: 20px;
    z-index: 99;
    border-bottom: 1px solid var(--dark-border);
    display: none;
  }

  .sidebar.open {
    display: block;
  }

  .doc-hero h1 { font-size: 32px; }
  .prose h2 { font-size: 24px; }
  .nav-breadcrumb { display: none; }
}

@media (max-width: 600px) {
  .nav-inner { padding: 0 20px; }
  .doc-hero h1 { font-size: 28px; letter-spacing: -1px; }
  .prose table { font-size: 13px; }
  .prose table thead th, .prose table tbody td { padding: 10px 14px; }
}
