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

  :root {
    --bg: #0e141b;
    --bg2: #141d27;
    --bg3: #1b2634;
    --bg4: #223246;
    --panel: rgba(255,255,255,0.03);
    --border: rgba(255,255,255,0.08);
    --border2: rgba(255,255,255,0.16);
    --text: #edf2f7;
    --muted: #95a3b6;
    --accent: #58a6ff;
    --accent2: #34c9a3;
    --accent3: #f3b84f;
    --accent4: #f07d6f;
    --accent5: #86a8ff;
    --code-bg: #0a1016;
    --tag-bg: rgba(88,166,255,0.12);
    --tag-text: #93c5fd;
    --sans: 'Manrope', system-ui, sans-serif;
    --mono: 'JetBrains Mono', 'Cascadia Code', monospace;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body {
    background:
      radial-gradient(circle at top right, rgba(88,166,255,0.08), transparent 24%),
      radial-gradient(circle at left bottom, rgba(52,201,163,0.06), 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: 252px;
    min-width: 252px;
    background: rgba(20,29,39,0.94);
    border-right: 1px solid var(--border);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 24px 0 40px;
    flex-shrink: 0;
    backdrop-filter: blur(18px);
  }
  .sidebar::-webkit-scrollbar { width: 5px; }
  .sidebar::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 8px; }

  .logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
  }
  .logo-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .logo-sub {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
  }

  .nav-section { margin-bottom: 4px; }
  .nav-label {
    font-size: 10px;
    font-weight: 700;
    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-color 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(88,166,255,0.08);
  }

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

  section { margin-bottom: 60px; scroll-margin-top: 24px; }
  h1 { font-size: 30px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
  h2 {
    font-size: 21px;
    font-weight: 700;
    color: var(--text);
    margin: 38px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }
  h3 { font-size: 15px; font-weight: 700; color: var(--text); margin: 24px 0 10px; }
  h4 {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin: 20px 0 8px;
  }
  p { color: var(--muted); margin-bottom: 10px; line-height: 1.75; }
  p strong { color: var(--text); font-weight: 600; }
  a { color: var(--accent); text-decoration: none; }
  a:hover { text-decoration: underline; }

  .hero {
    background:
      linear-gradient(135deg, rgba(88,166,255,0.11) 0%, rgba(52,201,163,0.08) 100%),
      var(--panel);
    border: 1px solid rgba(88,166,255,0.22);
    border-radius: 14px;
    padding: 28px 30px;
    margin-bottom: 36px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  }
  .hero::before {
    content: '';
    position: absolute;
    inset: auto -40px -40px auto;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(243,184,79,0.18), transparent 68%);
    pointer-events: none;
  }
  .hero h1 { font-size: 24px; margin-bottom: 4px; }
  .page-sub { font-size: 15px; color: var(--muted); margin-bottom: 24px; max-width: 760px; }
  .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;
    border: 1px solid transparent;
    white-space: nowrap;
  }
  .badge-blue { background: rgba(88,166,255,0.15); color: #a9d2ff; border-color: rgba(88,166,255,0.22); }
  .badge-green { background: rgba(52,201,163,0.12); color: #7ce7ca; border-color: rgba(52,201,163,0.18); }
  .badge-amber { background: rgba(243,184,79,0.12); color: #ffd78a; border-color: rgba(243,184,79,0.18); }
  .badge-coral { background: rgba(240,125,111,0.12); color: #ffada3; border-color: rgba(240,125,111,0.18); }

  pre {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 18px;
    overflow-x: auto;
    margin: 12px 0;
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.65;
  }
  pre::-webkit-scrollbar { height: 5px; }
  pre::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 5px; }
  code {
    font-family: var(--mono);
    font-size: 12.5px;
    background: rgba(255,255,255,0.06);
    padding: 1px 5px;
    border-radius: 4px;
    color: #7ce7ca;
  }
  pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: inherit;
    font-size: inherit;
  }

  .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.05em;
  }
  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: rgba(20,29,39,0.88);
    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; }
  .card-kicker {
    display: inline-block;
    margin-bottom: 10px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .mode-card {
    border-radius: 12px;
    padding: 18px 20px;
    border-left: 3px solid;
    background: rgba(20,29,39,0.88);
    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.red { border-left-color: var(--accent4); }
  .mode-card.purple { border-left-color: var(--accent5); }
  .mode-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
  .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: 5px;
    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: 10px; }
  .tag {
    font-size: 11px;
    padding: 2px 8px;
    background: var(--tag-bg);
    color: var(--tag-text);
    border-radius: 12px;
    border: 1px solid rgba(88,166,255,0.18);
  }

  .callout {
    display: flex;
    gap: 12px;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 14px 0;
    font-size: 13px;
    line-height: 1.65;
  }
  .callout-mark {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
  }
  .callout-body { color: var(--muted); }
  .callout-body strong { color: var(--text); }
  .callout.tip { background: rgba(52,201,163,0.08); border: 1px solid rgba(52,201,163,0.2); }
  .callout.tip .callout-mark { background: rgba(52,201,163,0.14); color: #89eed3; }
  .callout.warn { background: rgba(243,184,79,0.08); border: 1px solid rgba(243,184,79,0.2); }
  .callout.warn .callout-mark { background: rgba(243,184,79,0.16); color: #ffd78a; }
  .callout.info { background: rgba(88,166,255,0.08); border: 1px solid rgba(88,166,255,0.2); }
  .callout.info .callout-mark { background: rgba(88,166,255,0.15); color: #aed3ff; }
  .callout.danger { background: rgba(240,125,111,0.08); border: 1px solid rgba(240,125,111,0.2); }
  .callout.danger .callout-mark { background: rgba(240,125,111,0.16); color: #ffc3bc; }

  .flow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0;
  }
  .flow-step {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    background: var(--bg3);
    border: 1px solid var(--border2);
    color: var(--text);
  }
  .flow-arrow { color: var(--muted); font-size: 14px; }

  .bullet-list {
    list-style: none;
    display: grid;
    gap: 8px;
    margin: 12px 0;
  }
  .bullet-list li {
    padding: 10px 12px 10px 38px;
    position: relative;
    background: rgba(20,29,39,0.82);
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--muted);
    font-size: 13px;
  }
  .bullet-list li::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 15px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
  }
  .bullet-list strong { color: var(--text); }

  .metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    margin: 14px 0;
  }
  .metric-box {
    background: rgba(20,29,39,0.86);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
  }
  .metric-label {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
  }
  .metric-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
  .metric-copy { font-size: 13px; color: var(--muted); }

  .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: rgba(20,29,39,0.86);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    transition: border-color 0.15s;
  }
  .link-list li:hover { border-color: var(--border2); }
  .ll-tag {
    font-size: 10px;
    color: var(--muted);
    background: var(--bg3);
    padding: 1px 6px;
    border-radius: 4px;
    flex-shrink: 0;
  }

  .mini-note {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
  }

  .divider { border: none; border-top: 1px solid var(--border); margin: 40px 0; }
  ::-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: 900px) {
    .sidebar { display: none; }
    .main { padding: 24px 20px 60px; }
  }

  @media (max-width: 720px) {
    .hero { padding: 22px 20px; }
    .flow { align-items: flex-start; }
    table { min-width: 720px; }
  }
