:root{
  --bg:#0b0c10;
  --panel:#12141b;
  --panel2:#0f1117;
  --text:#e9edf5;
  --muted:#a7b0c2;
  --line:rgba(255,255,255,.08);
  --accent:#ff3b3b;
  --accent2:#ff7a3b;
  --shadow: 0 18px 50px rgba(0,0,0,.45);
  --radius: 18px;
  --radius2: 22px;
  --max: 1120px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(255,59,59,.18), transparent 55%),
    radial-gradient(800px 480px at 85% 0%, rgba(255,122,59,.10), transparent 55%),
    radial-gradient(900px 600px at 70% 90%, rgba(90,156,255,.10), transparent 50%),
    var(--bg);
  overflow-x:hidden;
}

a{ color:inherit; text-decoration:none; }
.wrap{ max-width:var(--max); margin:0 auto; padding:0 18px; }

/* Topbar */
.topbar{
  position:sticky; top:0; z-index:30;
  backdrop-filter: blur(14px);
  background: rgba(11,12,16,.62);
  border-bottom:1px solid var(--line);
}
.topbar .row{display:flex;align-items:center;justify-content:space-between;padding:14px 0;gap:14px;flex-wrap:nowrap;}
.brand{ display:flex; align-items:center; gap:10px; font-weight:900; letter-spacing:.2px; }
.logo{
  width:34px; height:34px; border-radius:10px;
  background:
    radial-gradient(14px 14px at 30% 35%, rgba(255,255,255,.35), transparent 60%),
    linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 24px rgba(255,59,59,.18);
  position:relative;
}
.logo:after{
  content:""; position:absolute; inset:9px;
  border-radius:8px; background: rgba(11,12,16,.55);
  border:1px solid rgba(255,255,255,.18);
}

nav{
  display:flex; align-items:center; gap:10px;
  color:var(--muted);
  font-weight:800;
  font-size:14px;
}

/* Mega menu */
.navItem{ position:relative; }
.navLink{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 10px; border-radius:12px;
}
.navLink:hover{ background: rgba(255,255,255,.06); color: var(--text); }
.navLink.active{
  background: rgba(255,255,255,.08);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.10);
}
.caret{ opacity:.8; font-size:12px; }

.mega{
  position:absolute;
  top: 44px;
  left: 0;
  min-width: 520px;
  padding: 12px;
  border-radius: 18px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(12,13,18,.92);
  box-shadow: 0 40px 90px rgba(0,0,0,.70);
  display:none;
}
.navItem:hover .mega{ display:block; }
.megaGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.megaCard{
  padding: 12px;
  border-radius: 16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}
.megaCard:hover{ background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
.megaCard strong{ display:block; font-size: 13px; margin-bottom:4px; }
.megaCard span{ display:block; color: var(--muted); font-size: 12px; line-height: 1.35; font-weight: 800; }

.actions{ display:flex; align-items:center; gap:10px; }
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  color:var(--text);
  font-weight:900;
  font-size:14px;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  user-select:none;
}
.btn:hover{ transform: translateY(-1px); background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
.btn.primary{
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: rgba(255,255,255,.14);
  box-shadow: 0 14px 30px rgba(255,59,59,.18);
}

/* Mobile menu */
.menuBtn{ display:none; }
.drawer{
  display:none;
  position:fixed; inset:0;
  background: rgba(0,0,0,.55);
  z-index:80;
}
.drawer .panel{
  width:min(420px, 92vw);
  height:100%;
  background: rgba(12,13,18,.92);
  border-right:1px solid rgba(255,255,255,.10);
  box-shadow: 0 40px 90px rgba(0,0,0,.7);
  padding: 16px;
}
.drawer a{
  display:flex; align-items:center; justify-content:space-between;
  padding: 12px 12px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  margin-bottom: 10px;
  color: rgba(255,255,255,.90);
  font-weight: 900;
}
.drawer a small{ color: var(--muted); font-weight: 800; }
.drawer a.active{ border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.07); }
.drawer .top{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom: 12px;
}
.drawer .x{
  width:44px; height:44px; border-radius: 14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: var(--text);
  cursor:pointer;
  font-weight: 900;
}

/* Cards/sections */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border:1px solid var(--line);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
}
.section{ padding: 22px 0; }
.badge{
  display:inline-flex; align-items:center; gap:8px;
  font-size: 12px;
  color: rgba(255,255,255,.82);
  padding: 7px 10px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.25);
  font-weight: 900;
}
.badge b{
  width: 10px; height: 10px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display:inline-block;
}
h1,h2,h3{ letter-spacing: -.2px; }
h1{ margin: 0 0 10px; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.06; }
p.lead{ margin: 0; color: var(--muted); line-height: 1.65; font-size: 16px; }

.hero{ padding: 38px 0 14px; }
.heroGrid{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 18px;
  align-items: stretch;
}
.heroLeft{ padding: 22px; position:relative; overflow:hidden; }
.heroLeft:before{
  content:"";
  position:absolute; inset:-2px;
  background:
    radial-gradient(620px 260px at 40% 10%, rgba(255,59,59,.22), transparent 60%),
    radial-gradient(520px 280px at 80% 40%, rgba(255,122,59,.14), transparent 60%);
  opacity:.85; pointer-events:none;
}
.heroLeft > *{ position:relative; }
.kicker{
  display:inline-flex; align-items:center; gap:10px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(11,12,16,.35);
  color: var(--muted);
  font-weight:900;
  font-size:13px;
  margin-bottom:12px;
}
.dot{
  width:10px; height:10px; border-radius:999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 20px rgba(255,59,59,.25);
}
.heroCtas{ display:flex; gap:10px; flex-wrap:wrap; margin-top: 14px; }
.mini{
  margin-top: 14px;
  display:flex; gap:12px; flex-wrap:wrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.mini span{
  display:inline-flex; align-items:center; gap:8px;
  padding: 8px 10px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(11,12,16,.25);
}
.check{
  width:18px; height:18px; border-radius:6px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.14);
  display:inline-grid; place-items:center;
  font-size:12px; color: var(--text);
}

/* Feature panel */
.sidePanel{ padding: 18px; }
.sidePanel .pillRow{ display:flex; gap:10px; flex-wrap:wrap; margin: 10px 0 0; }
.pill{
  padding: 9px 10px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.88);
  font-weight: 900;
  font-size: 12px;
}

/* Grids */
.grid3{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid2{ display:grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

.tile{
  padding: 18px;
  border-radius: var(--radius);
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  min-height: 140px;
}
.tile:hover{ transform: translateY(-2px); background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.14); }
.tile h3{ margin: 10px 0 6px; font-size: 16px; }
.tile p{ margin: 0; color: var(--muted); line-height: 1.55; font-size: 14px; }
.icon{
  width:42px; height:42px; border-radius: 16px;
  border:1px solid rgba(255,255,255,.12);
  background:
    radial-gradient(20px 20px at 35% 35%, rgba(255,255,255,.18), transparent 60%),
    linear-gradient(135deg, rgba(255,59,59,.26), rgba(255,122,59,.12));
  display:grid; place-items:center;
  font-size: 18px;
  font-weight: 900;
}

/* Breadcrumbs / page header */
.pageTop{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin-bottom: 10px;
}
.breadcrumbs{
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  color: rgba(255,255,255,.70);
  font-weight: 900;
  font-size: 12px;
}
.breadcrumbs a{ color: rgba(255,255,255,.75); }
.breadcrumbs a:hover{ color: rgba(255,255,255,.92); }
.breadcrumbs .sep{ opacity:.6; }
.versionSel{
  display:flex; align-items:center; gap:10px;
  padding: 8px 10px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
}
.versionSel label{ color: rgba(255,255,255,.74); font-weight: 900; font-size: 12px; }
.versionSel select{
  border:none; outline:none;
  background: transparent;
  color: rgba(255,255,255,.90);
  font-weight: 900;
}

/* Docs layout */
.docsGrid{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap: 14px;
  align-items:start;
}
.sidebar{
  padding: 14px;
  position: sticky;
  top: 74px;
}
.search{
  display:flex; gap:10px;
  padding:10px;
  border-radius: 16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.25);
  margin-bottom: 12px;
}
.search input{
  width:100%;
  border:none;
  outline:none;
  background: transparent;
  color: var(--text);
  font-weight: 900;
}
.navGroup{ margin-top: 12px; }
.navGroup h4{
  margin: 10px 6px;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  letter-spacing:.4px;
  text-transform: uppercase;
}
.docLink{
  display:flex; justify-content:space-between; gap:10px;
  padding: 10px 10px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  margin-bottom: 10px;
  color: rgba(255,255,255,.90);
  font-weight: 900;
}
.docLink:hover{ background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.14); }
.docLink small{ color: var(--muted); font-weight: 900; }

.docArticle{ padding: 18px; }
.docMeta{ color: var(--muted); font-weight: 900; font-size: 13px; }
hr.sep{ border:none; border-top: 1px solid rgba(255,255,255,.08); margin: 14px 0; }
code.inline{
  padding: 3px 6px; border-radius: 10px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.25);
}

/* Code blocks with copy */
pre{
  margin: 12px 0 0;
  padding: 14px;
  border-radius: 18px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.28);
  overflow:auto;
  position: relative;
}
pre code{ color: rgba(255,255,255,.88); font-weight: 800; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace; }
.copyBtn{
  position:absolute;
  top:10px; right:10px;
  padding: 8px 10px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  font-weight: 900;
  font-size: 12px;
  cursor:pointer;
}
.copyBtn:hover{ background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.14); }

/* Footer */
footer{
  margin-top: 22px;
  border-top:1px solid var(--line);
  background: rgba(0,0,0,.15);
  padding: 22px 0;
  color: var(--muted);
  font-size: 13px;
}
.footGrid{
  display:grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 14px;
}
.footGrid h4{ color: var(--text); margin: 0 0 10px; font-size: 14px; }
.footGrid a{ display:block; padding: 6px 0; color: var(--muted); font-weight: 800; }
.footGrid a:hover{ color: var(--text); }

/* Responsive */
@media (max-width: 980px){
  nav{ display:none; }
  .menuBtn{ display:inline-flex; }
  .heroGrid{ grid-template-columns: 1fr; }
  .docsGrid{ grid-template-columns: 1fr; }
  .sidebar{ position:relative; top:auto; }
  .mega{ display:none !important; } /* desktop mega menu hidden on mobile */
}
@media (max-width: 760px){
  .grid3{ grid-template-columns: 1fr; }
  .grid2{ grid-template-columns: 1fr; }
  .footGrid{ grid-template-columns: 1fr 1fr; }
}


/* Docs TOC (right) */
.docsGrid3{
  display:grid;
  grid-template-columns: 320px 1fr 260px;
  gap: 14px;
  align-items:start;
}
.toc{
  padding: 14px;
  position: sticky;
  top: 74px;
}
.toc h4{
  margin: 10px 6px;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  letter-spacing:.4px;
  text-transform: uppercase;
}
.toc a{
  display:block;
  padding: 8px 10px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  margin-bottom: 10px;
  color: rgba(255,255,255,.88);
  font-weight: 900;
  font-size: 13px;
}
.toc a:hover{ background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.14); }
.toc a.active{
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.96);
}

/* Sidebar active state */
.docLink.active{
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.07);
}

/* Search results panel */
.searchResults{
  display:none;
  margin-top: 10px;
  padding: 10px;
  border-radius: 16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
}
.searchResults .groupTitle{
  margin: 10px 6px 8px;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  letter-spacing:.4px;
  text-transform: uppercase;
  font-weight: 900;
}
.searchResults a{
  display:flex; justify-content:space-between; gap:10px;
  padding: 10px 10px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  margin-bottom: 10px;
  color: rgba(255,255,255,.90);
  font-weight: 900;
}
.searchResults a:hover{ background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.14); }
.searchResults a small{ color: var(--muted); font-weight: 900; }

/* Responsive adjustments */
@media (max-width: 1180px){
  .docsGrid3{ grid-template-columns: 320px 1fr; }
  .toc{ display:none; }
}


/* Mega menu: 3 columns + scroll if needed */
.mega{
  min-width: 860px;
  max-width: min(980px, calc(100vw - 40px));
  max-height: 70vh;
  overflow:auto;
}
.megaGrid{
  grid-template-columns: 1fr 1fr 1fr;
}
.megaCol h5{
  margin: 8px 8px 10px;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  letter-spacing:.35px;
  text-transform: uppercase;
}
.megaList a{
  display:block;
  padding: 10px 10px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  margin: 0 0 10px;
  color: rgba(255,255,255,.92);
  font-weight: 900;
  font-size: 13px;
}
.megaList a:hover{ background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.14); }
.megaList a small{ display:block; color: var(--muted); font-weight: 900; margin-top: 4px; line-height:1.25; }

/* Product/solution detail layout */
.kv{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.kv .tile{ min-height: unset; }
@media (max-width: 760px){ .kv{ grid-template-columns: 1fr; } }

/* Menu fix: keep nav centered and compact */
nav{flex:1; justify-content:center; gap:8px;}
.actions{flex:0 0 auto; white-space:nowrap;}
.brand{flex:0 0 auto;}
/* Prevent mega from pushing layout */
.navItem{position:relative;}
.mega{left:50%; transform:translateX(-50%); min-width: 920px; max-width: min(1040px, calc(100vw - 40px));}
@media (max-width: 980px){
  .topbar .row{flex-wrap:wrap;}
  nav{display:none !important;}
  .mega{display:none !important;}
}
