*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #1a1a2e;
  background: #fafafa;
}

/* Nav */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #0D0D3B;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
nav a.logo {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.3px;
}
nav .nav-links { display: flex; gap: 24px; }
nav .nav-links a {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.15s;
}
nav .nav-links a:hover, nav .nav-links a.active { color: #fff; }

/* Layout */
.page {
  max-width: 780px;
  margin: 0 auto;
  padding: 64px 24px 120px;
}

/* Header */
.doc-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid #e8e8f0;
}
.doc-header .badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #5B5BF0;
  background: #ededff;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.doc-header h1 {
  font-size: 36px;
  font-weight: 700;
  color: #0D0D3B;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 12px;
}
.doc-header .meta {
  font-size: 14px;
  color: #888;
}

/* TOC */
.toc {
  background: #f0f0ff;
  border: 1px solid #ddddf5;
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 48px;
}
.toc h2 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #5B5BF0;
  margin-bottom: 14px;
}
.toc ol {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.toc a {
  font-size: 14px;
  color: #3a3a8a;
  text-decoration: none;
}
.toc a:hover { text-decoration: underline; }

/* Sections */
.section {
  margin-bottom: 56px;
  scroll-margin-top: 80px;
}
.section h2 {
  font-size: 22px;
  font-weight: 700;
  color: #0D0D3B;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #ededff;
}
.section h3 {
  font-size: 16px;
  font-weight: 600;
  color: #0D0D3B;
  margin: 24px 0 8px;
}
.section p { margin-bottom: 14px; color: #3a3a5c; }
.section ul, .section ol {
  padding-left: 22px;
  margin-bottom: 14px;
  color: #3a3a5c;
}
.section li { margin-bottom: 6px; }
.section strong { color: #0D0D3B; }

/* Callout */
.callout {
  background: #fff8e1;
  border-left: 4px solid #f59e0b;
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 14px;
  color: #78350f;
}
.callout.info {
  background: #ededff;
  border-color: #5B5BF0;
  color: #2d2d7a;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}
th {
  background: #f0f0ff;
  text-align: left;
  padding: 10px 14px;
  font-weight: 600;
  color: #0D0D3B;
  border-bottom: 2px solid #ddddf5;
}
td {
  padding: 10px 14px;
  border-bottom: 1px solid #e8e8f0;
  color: #3a3a5c;
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }

/* Footer */
footer {
  background: #0D0D3B;
  padding: 32px 40px;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}
footer a { color: rgba(255,255,255,0.6); text-decoration: none; }
footer a:hover { color: #fff; }
footer .footer-links { display: flex; gap: 24px; justify-content: center; margin-bottom: 16px; }

@media (max-width: 640px) {
  nav { padding: 0 20px; }
  .page { padding: 40px 20px 80px; }
  .doc-header h1 { font-size: 28px; }
}
