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

:root {
  --bg: #0a0f1a;
  --bg2: #0f1726;
  --bg3: #162035;
  --bg4: #1e2c48;
  --border: rgba(255, 153, 0, 0.12);
  --border2: rgba(255, 153, 0, 0.22);
  --text: #ecf0f8;
  --muted: #9aa8c0;
  --accent: #ff9900;
  --accent2: #ffb84d;
  --accent3: #6ee7b7;
  --accent4: #ff6b6b;
  --accent5: #7eb8ff;
  --accent6: #ffd166;
  --code-bg: #080c16;
  --tag-bg: rgba(255, 153, 0, 0.10);
  --tag-text: #ffcc80;
  --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(255, 153, 0, 0.10), transparent 30%), 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(15, 23, 38, 0.98), rgba(10, 15, 26, 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(--accent);
  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(255, 153, 0, 0.06);
}

.nav-link.active {
  color: var(--accent2);
  border-left-color: var(--accent);
  background: rgba(255, 153, 0, 0.08);
}

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

h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 20px 0 8px;
}

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(--accent5);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

.hero {
  background:
    linear-gradient(135deg, rgba(255, 153, 0, 0.12) 0%, rgba(110, 231, 183, 0.05) 100%),
    linear-gradient(180deg, rgba(15, 23, 38, 0.92), rgba(10, 15, 26, 0.94));
  border: 1px solid rgba(255, 153, 0, 0.22);
  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(255, 179, 71, 0.22), 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(--accent);
  margin-bottom: 10px;
}

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

.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-orange { background: rgba(255, 153, 0, 0.14); color: var(--accent2); border: 1px solid rgba(255, 153, 0, 0.24); }
.badge-blue { background: rgba(126, 184, 255, 0.12); color: var(--accent5); border: 1px solid rgba(126, 184, 255, 0.22); }
.badge-green { background: rgba(110, 231, 183, 0.12); color: var(--accent3); border: 1px solid rgba(110, 231, 183, 0.22); }
.badge-amber { background: rgba(255, 209, 102, 0.14); color: var(--accent6); border: 1px solid rgba(255, 209, 102, 0.22); }
.badge-red { background: rgba(255, 107, 107, 0.14); color: var(--accent4); border: 1px solid rgba(255, 107, 107, 0.22); }

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

.comment { color: #5a6474; }
.kw { color: #c678dd; }
.str { color: #98c379; }
.num { color: #d19a66; }
.fn { color: #61afef; }
.key { color: #e06c75; }
.type { color: #56b6c2; }
.anno { color: var(--accent6); }
.dec { color: #e5c07b; }

.tag {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: 12px;
  border: 1px solid rgba(255, 153, 0, 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(15, 23, 38, 0.96), rgba(10, 17, 30, 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-icon { font-size: 20px; margin-bottom: 10px; }

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

.mode-card {
  border-radius: 12px;
  padding: 18px 20px;
  border-left: 3px solid;
  background: linear-gradient(180deg, rgba(15, 23, 38, 0.96), rgba(10, 17, 30, 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.orange { border-left-color: var(--accent); }
.mode-card.blue { border-left-color: var(--accent5); }
.mode-card.green { border-left-color: var(--accent3); }
.mode-card.red { border-left-color: var(--accent4); }
.mode-card.amber { border-left-color: var(--accent6); }

.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);
}

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

.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;
  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.07); border: 1px solid rgba(255, 209, 102, 0.18); }
.callout.info { background: rgba(126, 184, 255, 0.07); border: 1px solid rgba(126, 184, 255, 0.18); }
.callout.danger { background: rgba(255, 107, 107, 0.07); border: 1px solid rgba(255, 107, 107, 0.18); }
.callout.billing { background: rgba(255, 153, 0, 0.07); border: 1px solid rgba(255, 153, 0, 0.18); }

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

.flow-step {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 6px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
}

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

ul, ol {
  margin: 8px 0 12px 20px;
  color: var(--muted);
  font-size: 14px;
}

li {
  margin-bottom: 4px;
  line-height: 1.7;
}

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

@media (max-width: 860px) {
  body { flex-direction: column; }
  .sidebar {
    width: 100%;
    min-width: unset;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
  }
  .main { padding: 24px 20px 60px; }
}
