:root {
    --bg: #0f1117;
    --bg2: #161b27;
    --bg3: #1e2536;
    --bg4: #252d42;
    --border: rgba(255,255,255,0.08);
    --border2: rgba(255,255,255,0.15);
    --text: #e8eaf0;
    --muted: #8b93a7;
    --accent: #6c8ef5;
    --accent2: #4fd1a5;
    --accent3: #f5c06c;
    --accent4: #e27d76;
    --accent5: #b47cf5;
    --code-bg: #0d1117;
    --tag-bg: rgba(108,142,245,0.12);
    --tag-text: #8fadf7;
    --mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    --sans: 'Inter', system-ui, sans-serif;
  }

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

  body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.7;
    display: flex;
    min-height: 100vh;
  }

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

  .sidebar {
    width: 248px;
    min-width: 248px;
    background: var(--bg2);
    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 20px 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
  }

  .logo-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .logo-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
  .nav-section { margin-bottom: 4px; }

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

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

  .nav-link:hover { color: var(--text); background: var(--bg3); }
  .nav-link.active { color: var(--accent); border-left-color: var(--accent); background: rgba(108,142,245,0.06); }

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

  section { margin-bottom: 60px; scroll-margin-top: 24px; }
  h1 { font-size: 28px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
  h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin: 36px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }
  h3 { font-size: 15px; font-weight: 600; color: var(--text); margin: 24px 0 10px; }
  h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 20px 0 8px;
  }

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

  p strong, li strong { color: var(--text); font-weight: 500; }
  a { color: var(--accent); text-decoration: none; }
  a:hover { text-decoration: underline; }

  .hero {
    background: linear-gradient(135deg, rgba(108,142,245,0.08) 0%, rgba(79,209,165,0.05) 100%);
    border: 1px solid rgba(108,142,245,0.2);
    border-radius: 10px;
    padding: 24px 28px;
    margin-bottom: 36px;
    position: relative;
    overflow: hidden;
  }

  .hero::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(108,142,245,0.15), transparent 70%);
    pointer-events: none;
  }

  .hero h1 { font-size: 22px; margin-bottom: 4px; }

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

  .badge {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
  }

  .badge-blue { background: rgba(108,142,245,0.15); color: #8fadf7; border: 1px solid rgba(108,142,245,0.25); }
  .badge-green { background: rgba(79,209,165,0.12); color: #5dd1a0; border: 1px solid rgba(79,209,165,0.2); }
  .badge-amber { background: rgba(245,192,108,0.12); color: #f5c06c; border: 1px solid rgba(245,192,108,0.2); }
  .badge-purple { background: rgba(180,124,245,0.12); color: #b47cf5; border: 1px solid rgba(180,124,245,0.2); }

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

  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: 13px; }

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

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

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

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

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

  .mode-card {
    border-radius: 10px;
    padding: 18px 20px;
    border-left: 3px solid;
    background: var(--bg2);
    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(--accent2); }
  .mode-card.amber { border-left-color: var(--accent3); }
  .mode-card.purple { border-left-color: var(--accent5); }

  .mode-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
  .mode-name { font-size: 14px; font-weight: 600; color: var(--text); }

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

  .mode-when { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
  .mode-when strong { color: var(--text); }

  .tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

  .tag {
    font-size: 11px;
    padding: 2px 8px;
    background: var(--tag-bg);
    color: var(--tag-text);
    border-radius: 12px;
    border: 1px solid rgba(108,142,245,0.15);
  }

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

  .callout-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
  .callout-body { color: var(--muted); }
  .callout-body strong { color: var(--text); }
  .callout.tip { background: rgba(79,209,165,0.07); border: 1px solid rgba(79,209,165,0.18); }
  .callout.warn { background: rgba(245,192,108,0.07); border: 1px solid rgba(245,192,108,0.18); }
  .callout.info { background: rgba(108,142,245,0.07); border: 1px solid rgba(108,142,245,0.18); }

  .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;
    transition: border-color 0.15s;
  }

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

  ul.standard-list {
    margin: 10px 0 10px 18px;
    color: var(--muted);
  }

  ul.standard-list li { margin-bottom: 8px; }

  ::-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; }
  }
