@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #07131f;
  --bg2: #0d2033;
  --bg3: #12314d;
  --bg4: #1a4367;
  --border: rgba(143, 187, 255, 0.12);
  --border2: rgba(143, 187, 255, 0.2);
  --text: #ecf5ff;
  --muted: #9eb8d6;
  --accent: #3ea6ff;
  --accent2: #7ed0ff;
  --accent3: #ffd166;
  --accent4: #ff8d6a;
  --accent5: #6ee7b7;
  --accent6: #9fd5ff;
  --code-bg: #06101a;
  --tag-bg: rgba(62, 166, 255, 0.12);
  --tag-text: #91d7ff;
  --mono: 'JetBrains Mono', 'Cascadia Code', monospace;
  --sans: 'Manrope', system-ui, sans-serif;
}

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

body {
  background: radial-gradient(circle at top right, rgba(62, 166, 255, 0.14), transparent 28%), var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.7;
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 272px;
  min-width: 272px;
  background: linear-gradient(180deg, rgba(13, 32, 51, 0.98), rgba(8, 22, 36, 0.96));
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 24px 0 40px;
  flex-shrink: 0;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

.logo {
  padding: 0 22px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.logo-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.logo-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.nav-section { margin-bottom: 4px; }

.nav-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 10px 22px 4px;
}

.nav-link {
  display: block;
  padding: 7px 22px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
  border-left: 2px solid transparent;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(62, 166, 255, 0.08);
}

.nav-link.active {
  color: var(--accent2);
  border-left-color: var(--accent);
  background: rgba(62, 166, 255, 0.1);
}

.main {
  flex: 1;
  max-width: 960px;
  padding: 40px 48px 88px;
  overflow-x: hidden;
}

section {
  margin-bottom: 60px;
  scroll-margin-top: 24px;
}

h1 {
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

h2 {
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  margin: 36px 0 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 10px;
}

p {
  color: var(--muted);
  margin-bottom: 10px;
  line-height: 1.75;
  font-size: 14px;
}

p strong {
  color: var(--text);
  font-weight: 600;
}

a {
  color: var(--accent2);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

.hero {
  background:
    linear-gradient(135deg, rgba(62, 166, 255, 0.14) 0%, rgba(110, 231, 183, 0.06) 100%),
    linear-gradient(180deg, rgba(13, 32, 51, 0.92), rgba(8, 19, 31, 0.94));
  border: 1px solid rgba(62, 166, 255, 0.24);
  border-radius: 14px;
  padding: 26px 28px;
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: auto -48px -48px auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(126, 208, 255, 0.26), transparent 70%);
  pointer-events: none;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent2);
  margin-bottom: 10px;
}

.hero-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-blue { background: rgba(62, 166, 255, 0.14); color: var(--accent2); border: 1px solid rgba(62, 166, 255, 0.24); }
.badge-green { background: rgba(110, 231, 183, 0.12); color: var(--accent5); border: 1px solid rgba(110, 231, 183, 0.22); }
.badge-amber { background: rgba(255, 209, 102, 0.14); color: var(--accent3); border: 1px solid rgba(255, 209, 102, 0.22); }
.badge-purple { background: rgba(159, 213, 255, 0.12); color: #bfdfff; border: 1px solid rgba(159, 213, 255, 0.2); }

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  overflow-x: auto;
  margin: 12px 0;
  font-family: var(--mono);
  font-size: 12.8px;
  line-height: 1.65;
}

pre::-webkit-scrollbar { height: 4px; }
pre::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--accent2);
}

pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  color: inherit;
  font-size: 12.8px;
}

.tag {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: 12px;
  border: 1px solid rgba(62, 166, 255, 0.18);
}

.table-wrap { overflow-x: auto; margin: 12px 0; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  text-align: left;
  padding: 9px 12px;
  background: var(--bg3);
  color: var(--text);
  font-weight: 700;
  border-bottom: 1px solid var(--border2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  vertical-align: top;
}

tr:hover td { background: rgba(255, 255, 255, 0.02); }

.card-grid { display: grid; gap: 14px; }
.card-grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card-grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: linear-gradient(180deg, rgba(13, 32, 51, 0.96), rgba(10, 24, 38, 0.96));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--border2);
  transform: translateY(-1px);
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.card-body {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

.toc-grid { align-items: stretch; }

.toc-card {
  position: relative;
  overflow: hidden;
}

.toc-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), transparent);
}

.toc-card.current::before {
  background: linear-gradient(180deg, var(--accent5), transparent);
}

.toc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.toc-status {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent5);
  font-weight: 700;
}

.toc-status.muted { color: var(--muted); }

.mode-card {
  border-radius: 12px;
  padding: 18px 20px;
  border-left: 3px solid;
  background: linear-gradient(180deg, rgba(13, 32, 51, 0.96), rgba(10, 24, 38, 0.96));
  border-right: 1px solid var(--border);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.mode-card.blue { border-left-color: var(--accent); }
.mode-card.green { border-left-color: var(--accent5); }

.mode-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.mode-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.mode-shortcut {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--bg4);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text);
  border: 1px solid var(--border2);
}

.callout {
  display: flex;
  gap: 12px;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 14px 0;
  font-size: 13px;
  line-height: 1.6;
}

.callout-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.callout-body { color: var(--muted); }
.callout-body strong { color: var(--text); }

.callout.tip { background: rgba(110, 231, 183, 0.07); border: 1px solid rgba(110, 231, 183, 0.18); }
.callout.warn { background: rgba(255, 209, 102, 0.08); border: 1px solid rgba(255, 209, 102, 0.18); }
.callout.info { background: rgba(62, 166, 255, 0.08); border: 1px solid rgba(62, 166, 255, 0.18); }
.callout.danger { background: rgba(255, 141, 106, 0.08); border: 1px solid rgba(255, 141, 106, 0.18); }

.flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 0;
}

.flow-step {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(62, 166, 255, 0.1);
  border: 1px solid rgba(62, 166, 255, 0.18);
  color: var(--text);
}

.flow-arrow {
  color: var(--muted);
  font-size: 14px;
}

.link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0;
}

.link-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 13px;
}

.link-list .ll-tag {
  font-size: 10px;
  color: var(--muted);
  background: var(--bg3);
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

ul.bullet {
  list-style: disc;
  padding-left: 22px;
  margin: 8px 0;
}

ul.bullet li {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 5px;
  line-height: 1.65;
}

ul.bullet li strong { color: var(--text); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 3px; }

@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { padding: 24px 20px 60px; }
  .hero { padding: 22px 20px; }
  h1 { font-size: 26px; }
}