
:root{
  --bg:#ffffff;
  --sidebar:#fafafa;
  --text:#1f2328;
  --muted:#667085;
  --faint:#8a93a3;
  --border:#e7e9ee;
  --border-strong:#d9dde5;
  --hover:#f3f4f6;
  --active:#eef2ff;
  --active-text:#3346a8;
  --code:#f6f8fa;
  --note:#f7f8fb;
  --warning:#fff9ec;
  --warning-border:#ead9a8;
  --shadow:0 1px 2px rgba(0,0,0,.04);
  --sidebar-w:286px;
  --toc-w:220px;
  --content-w:760px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  color:var(--text);
  background:var(--bg);
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
}
button,input{font:inherit}
button{color:inherit}
svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.app-shell{
  min-height:100vh;
  display:grid;
  grid-template-columns:var(--sidebar-w) minmax(0,1fr);
}
.sidebar{
  position:fixed;
  inset:0 auto 0 0;
  width:var(--sidebar-w);
  background:var(--sidebar);
  border-right:1px solid var(--border);
  display:flex;
  flex-direction:column;
  z-index:30;
}
.sidebar-top{
  height:64px;
  display:flex;
  align-items:center;
  padding:0 18px;
  gap:8px;
}
.brand{
  min-width:0;
  flex:1;
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--text);
  text-decoration:none;
}
.brand-mark{
  width:30px;
  height:30px;
  border:1px solid var(--border-strong);
  border-radius:7px;
  display:grid;
  place-items:center;
  background:#fff;
  font-size:11px;
  font-weight:750;
  letter-spacing:-.2px;
}
.brand strong{
  display:block;
  font-size:14px;
  line-height:1.2;
  font-weight:650;
}
.brand small{
  display:block;
  margin-top:2px;
  color:var(--muted);
  font-size:11px;
}
.icon-button{
  border:0;
  background:transparent;
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:7px;
  cursor:pointer;
}
.icon-button:hover{background:var(--hover)}
.sidebar-close{display:none}
.search-wrap{
  position:relative;
  padding:4px 14px 14px;
}
.search-icon{
  position:absolute;
  left:25px;
  top:14px;
  color:var(--faint);
  pointer-events:none;
  line-height:0;
}
.search-wrap input{
  width:100%;
  height:36px;
  padding:0 10px 0 34px;
  border:1px solid var(--border);
  border-radius:7px;
  outline:none;
  background:#fff;
  color:var(--text);
  font-size:13px;
  box-shadow:var(--shadow);
}
.search-wrap input:focus{
  border-color:#b9c0ce;
  box-shadow:0 0 0 2px rgba(82,96,133,.08);
}
.search-results{
  position:absolute;
  top:46px;
  left:14px;
  right:14px;
  max-height:340px;
  overflow:auto;
  background:#fff;
  border:1px solid var(--border);
  border-radius:8px;
  box-shadow:0 10px 30px rgba(0,0,0,.08);
  z-index:50;
  padding:6px;
}
.search-result{
  display:block;
  padding:9px 10px;
  text-decoration:none;
  color:var(--text);
  border-radius:6px;
}
.search-result:hover{background:var(--hover)}
.search-result strong{
  display:block;
  font-size:13px;
  font-weight:600;
}
.search-result span{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:11px;
}
.doc-nav{
  flex:1;
  overflow:auto;
  padding:0 10px 18px;
}
.nav-group{margin:12px 0 18px}
.nav-group-title{
  padding:0 10px;
  margin:0 0 5px;
  color:#9197a3;
  font-size:11px;
  font-weight:650;
  text-transform:uppercase;
  letter-spacing:.055em;
}
.nav-link{
  display:block;
  padding:7px 10px;
  color:#4b5563;
  text-decoration:none;
  font-size:13px;
  line-height:1.35;
  border-radius:6px;
}
.nav-link:hover{
  color:var(--text);
  background:var(--hover);
}
.nav-link.active{
  color:var(--active-text);
  background:var(--active);
  font-weight:550;
}
.sidebar-footer{
  border-top:1px solid var(--border);
  padding:13px 20px 16px;
  display:flex;
  flex-direction:column;
  gap:3px;
  color:#9aa0aa;
  font-size:10.5px;
}
.main-shell{
  grid-column:2;
  min-width:0;
}
.topbar{
  position:sticky;
  top:0;
  z-index:20;
  height:56px;
  display:flex;
  align-items:center;
  border-bottom:1px solid var(--border);
  background:rgba(255,255,255,.94);
  backdrop-filter:saturate(180%) blur(10px);
  padding:0 24px;
}
.mobile-menu{display:none}
.breadcrumbs{
  min-width:0;
  display:flex;
  align-items:center;
  gap:7px;
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
}
.breadcrumbs span:last-child{
  overflow:hidden;
  text-overflow:ellipsis;
  color:#4a505a;
}
.topbar-spacer{flex:1}
.main-grid{
  display:grid;
  grid-template-columns:minmax(0,var(--content-w)) var(--toc-w);
  gap:72px;
  justify-content:center;
  padding:48px 54px 90px;
}
.article{
  min-width:0;
  outline:none;
}
.article-header{
  padding-bottom:26px;
  border-bottom:1px solid var(--border);
  margin-bottom:34px;
}
.article h1{
  margin:0;
  font-size:36px;
  line-height:1.17;
  letter-spacing:-.75px;
  font-weight:690;
}
.subtitle{
  margin:10px 0 0;
  color:var(--muted);
  font-size:16px;
  line-height:1.6;
}
.doc-section{
  scroll-margin-top:84px;
  margin:0 0 34px;
}
.doc-section h2{
  margin:0 0 12px;
  font-size:21px;
  line-height:1.35;
  letter-spacing:-.2px;
  font-weight:650;
}
.article p,
.article li{
  color:#3f4650;
  font-size:15px;
  line-height:1.78;
}
.article p{margin:0 0 14px}
.article ul,
.article ol{
  padding-left:22px;
  margin:0 0 16px;
}
.article li{margin:5px 0}
.article strong{font-weight:650;color:#272c33}
.note{
  margin:18px 0;
  padding:14px 16px;
  background:var(--note);
  border:1px solid var(--border);
  border-left:3px solid #939baa;
  border-radius:6px;
  color:#414853;
  font-size:14px;
  line-height:1.65;
}
.note.warning{
  background:var(--warning);
  border-color:var(--warning-border);
  border-left-color:#b79a47;
}
.tokens,
.pills{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin:4px 0 16px;
}
.tokens span,
.pills span{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:5px 9px;
  border:1px solid var(--border);
  border-radius:6px;
  background:#fff;
  color:#505864;
  font-size:12px;
}
table{
  width:100%;
  border-collapse:collapse;
  margin:12px 0 18px;
  font-size:14px;
}
th,td{
  text-align:left;
  padding:10px 12px;
  border-bottom:1px solid var(--border);
  vertical-align:top;
}
th{
  color:#59616d;
  font-weight:600;
  background:#fafafa;
}
td{color:#3f4650}
pre{
  margin:14px 0 18px;
  padding:14px 16px;
  overflow:auto;
  border:1px solid var(--border);
  border-radius:7px;
  background:var(--code);
}
code{
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;
  font-size:13px;
  line-height:1.65;
}
.checklist{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px 18px;
}
.checklist label{
  display:flex;
  gap:8px;
  align-items:flex-start;
  color:#414853;
  font-size:14px;
  line-height:1.5;
}
.checklist input{margin-top:3px}
.page-nav{
  margin-top:50px;
  padding-top:22px;
  border-top:1px solid var(--border);
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
.page-nav button{
  min-height:64px;
  text-align:left;
  padding:10px 12px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:7px;
  cursor:pointer;
}
.page-nav button:last-child{text-align:right}
.page-nav button:hover{background:#fafafa}
.page-nav small{
  display:block;
  color:#9aa0aa;
  margin-bottom:4px;
  font-size:10.5px;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.page-nav span{
  color:#39414b;
  font-size:13px;
  font-weight:550;
}
.toc{
  position:sticky;
  top:84px;
  align-self:start;
  max-height:calc(100vh - 110px);
  overflow:auto;
  padding-left:14px;
  border-left:1px solid var(--border);
}
.toc-title{
  color:#9299a4;
  font-size:10.5px;
  text-transform:uppercase;
  letter-spacing:.06em;
  margin:0 0 10px;
}
.toc a{
  display:block;
  padding:4px 0;
  color:#7a828f;
  text-decoration:none;
  font-size:12px;
  line-height:1.45;
}
.toc a:hover{color:#3f4650}
.toc a.active{color:#2f3742;font-weight:550}
.overlay{display:none}

@media(max-width:1120px){
  .main-grid{
    grid-template-columns:minmax(0,var(--content-w));
    gap:0;
  }
  .toc{display:none}
}
@media(max-width:760px){
  :root{--sidebar-w:286px}
  .app-shell{display:block}
  .sidebar{
    transform:translateX(-100%);
    transition:transform .18s ease;
    box-shadow:none;
  }
  .sidebar.open{
    transform:translateX(0);
    box-shadow:8px 0 30px rgba(0,0,0,.08);
  }
  .sidebar-close{display:grid}
  .main-shell{grid-column:auto}
  .mobile-menu{display:grid;margin-right:8px}
  .topbar{padding:0 12px}
  .main-grid{display:block;padding:34px 20px 64px}
  .article h1{font-size:30px}
  .subtitle{font-size:15px}
  .checklist{grid-template-columns:1fr}
  .overlay{
    position:fixed;
    inset:0;
    z-index:25;
    background:rgba(0,0,0,.18);
  }
  .overlay.show{display:block}
}
@media(prefers-reduced-motion:reduce){
  *{scroll-behavior:auto!important;transition:none!important}
}
