:root{
  --bg: #0d1117;
  --bg-elevated: #12181f;
  --sidebar-bg: #0a0e13;
  --border: #1f2830;
  --text: #dbe2ea;
  --text-dim: #8b98a5;
  --text-faint: #5b6672;
  --accent: #4fc3e8;
  --accent-soft: rgba(79,195,232,0.12);
  --warn: #ff8b3d;
  --warn-soft: rgba(255,139,61,0.09);
  --info: #4fc3e8;
  --info-soft: rgba(79,195,232,0.08);
  --radius: 8px;
  --font-display: "Noto Sans", sans-serif;
  --font-body: "Noto Sans", sans-serif;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ============ TOPBAR ============ */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10,14,19,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner{
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand{
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--accent);
  color: #05121a;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 800;
}
.brand-sub{
  font-weight: 400;
  color: var(--text-faint);
  font-size: 13px;
  letter-spacing: 0;
}
.search-fake{
  flex: 1;
  max-width: 420px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 12px;
  color: var(--text-faint);
  font-size: 13px;
  cursor: pointer;
}
.search-fake kbd{
  font-family: var(--font-body);
  font-size: 11px;
  background: var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--text-dim);
}
/* ============ SHELL / LAYOUT ============ */
.shell{
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
}

/* ============ SIDEBAR ============ */
.sidebar{
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  padding: 24px 16px 40px;
  border-right: 1px solid var(--border);
  background: var(--sidebar-bg);
}
.side-section{ margin-bottom: 28px; }
.side-label{
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0 10px;
  margin-bottom: 8px;
}
.side-link{
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13.5px;
  margin-bottom: 1px;
  transition: background 0.12s, color 0.12s;
}
.side-link:hover{
  background: var(--bg-elevated);
  color: var(--text);
}
.side-link.active{
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
/* ============ CONTENT ============ */
.content{
  padding: 40px 56px 120px;
  min-width: 0;
}
.page{
  max-width: 760px;
  padding-top: 8px;
  scroll-margin-top: 76px;
}
.page + .page{
  border-top: 1px solid var(--border);
  margin-top: 64px;
  padding-top: 56px;
}
.crumbs{
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 10px;
}
h1{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  color: #fff;
}
h2{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  margin: 36px 0 12px;
  color: #fff;
  letter-spacing: -0.005em;
}
.lede{
  font-size: 16.5px;
  color: var(--text-dim);
  line-height: 1.6;
  margin: 0 0 24px;
}
p{ margin: 0 0 14px; color: var(--text); }
.fine-note{
  font-size: 12.5px;
  color: var(--text-faint);
  margin-top: -6px;
}
a{ color: var(--accent); }
code{
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--accent);
}

/* ============ CALLOUTS ============ */
.callout{
  display: flex;
  gap: 12px;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 18px 0;
  border: 1px solid transparent;
}
.callout-icon{
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1.4;
}
.callout p{ margin: 4px 0 0; }
.callout strong{ color: #fff; }
.callout-warn{ background: var(--warn-soft); border-color: rgba(255,139,61,0.22); }
.callout-warn .callout-icon{ color: var(--warn); }
.callout-info{ background: var(--info-soft); border-color: rgba(79,195,232,0.2); }
.callout-info .callout-icon{ color: var(--info); }

/* ============ TABLES ============ */
.data-table{
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 22px;
  font-size: 13.5px;
}
.data-table th, .data-table td{
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
}
.data-table th{
  color: var(--text-faint);
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.data-table tr:hover td{ background: rgba(255,255,255,0.015); }

/* ============ LISTS ============ */
.steps{
  padding-left: 20px;
  margin: 14px 0 22px;
}
.steps li{ margin-bottom: 10px; padding-left: 4px; }
.check-list{
  list-style: none;
  padding: 0;
  margin: 14px 0 22px;
}
.check-list li{
  padding: 7px 0 7px 24px;
  position: relative;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.check-list li:before{
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.check-list li:last-child{ border-bottom: none; }

.enchant-list{
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 2;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px){
  .shell{ grid-template-columns: 1fr; }
  .sidebar{
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .content{ padding: 32px 20px 100px; }
  h1{ font-size: 26px; }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
}
