*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #05050a;
  --surface: #0c0c14;
  --card: #11111a;
  --border: rgba(255,255,255,.07);
  --border-hover: rgba(255,255,255,.16);
  --accent: #7c5cff;
  --accent-glow: rgba(124,92,255,.3);
  --terminal: #00ff88;
  --terminal-dim: rgba(0,255,136,.08);
  --term-red: #ff5f56;
  --term-yellow: #ffbd2e;
  --card-hover: #15151f;
  --accent2: #00e5a0;
  --danger: #ff4d6a;
  --danger-dim: rgba(255,77,106,.08);
  --radius: 16px;
  --radius-sm: 10px;
  --text: #f0f0f5;
  --text2: #a6a6bc;
  --muted: #5a5a72;
  --heading: 'Space Grotesk', sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', Menlo, Consolas, monospace;
}
body.light {
  --bg: #f5f5f8;
  --surface: #ffffff;
  --card: #ffffff;
  --card-hover: #f0f0f5;
  --border: rgba(0,0,0,.09);
  --border-hover: rgba(0,0,0,.18);
  --text: #0f0f1a;
  --text2: #56566e;
  --muted: #8a8aa0;
}
body { background: var(--bg); color: var(--text); font-family: var(--body); line-height: 1.7; min-height: 100vh; transition: background .4s, color .4s; -webkit-font-smoothing: antialiased; }
.grid-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; background-image: linear-gradient(rgba(124,92,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(124,92,255,.04) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse 75% 65% at 50% 25%, black 20%, transparent 75%); }
.glow-orb { position: fixed; width: 580px; height: 580px; border-radius: 50%; pointer-events: none; z-index: 0; filter: blur(120px); opacity: .14; }
.glow-orb.purple { background: var(--accent); top: -10%; left: 20%; }
body.light .glow-orb { opacity: .07; }

.page-wrap { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 24px 20px; }

/* HEADER */
.hdr { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hdr-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; height: 56px; padding: 0 14px; border-radius: 20px; background: var(--card); border: 1px solid var(--border); transition: border-color .2s; }
.hdr-logo:hover { border-color: var(--border-hover); }
.hdr-logo-icon { width: 36px; height: 36px; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.hdr-logo-icon img { width: 100%; height: 100%; object-fit: contain; }
.hdr-logo-name { font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--text); white-space: nowrap; letter-spacing: -.02em; }
.hdr-logo-name b { color: var(--accent); }
.hdr-nav { flex: 1; display: none; align-items: center; gap: 6px; height: 56px; padding: 0 22px; border-radius: 20px; background: var(--card); border: 1px solid var(--border); min-width: 0; }
@media (min-width: 1024px) { .hdr-nav { display: flex; } }
.hdr-nav a { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--text2); text-decoration: none; padding: 6px 11px; border-radius: 10px; transition: all .2s; white-space: nowrap; font-family: var(--mono); }
.hdr-nav a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.hdr-nav a.active { color: var(--terminal); }
body.light .hdr-nav a:hover { background: rgba(0,0,0,.08); color: var(--accent); }
.hdr-nav svg { width: 20px; height: 20px; flex-shrink: 0; opacity: .7; }
.hdr-nav a.active svg { opacity: 1; }
.hdr-theme { flex-shrink: 0; display: none; align-items: center; height: 56px; padding: 0 10px; border-radius: 20px; background: var(--card); border: 1px solid var(--border); }
@media (min-width: 1024px) { .hdr-theme { display: flex; } }
.hdr-theme-btn { border: none; background: rgba(255,255,255,.06); border-radius: 100px; width: 44px; height: 32px; cursor: pointer; font-size: 15px; transition: background .2s; display: grid; place-items: center; }
.hdr-theme-btn:hover { background: rgba(255,255,255,.1); }
body.light .hdr-theme-btn { background: rgba(0,0,0,.06); }

/* PAGE */
.page-hero { max-width: 900px; margin: 0 auto; padding: 54px 0 8px; }
.page-hero .tag { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--terminal); background: var(--terminal-dim); border: 1px solid rgba(0,255,136,.15); padding: 5px 12px; border-radius: 100px; margin-bottom: 16px; }
.page-hero .tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--terminal); box-shadow: 0 0 10px var(--terminal); }
.page-hero h1 { font-family: var(--heading); font-size: clamp(26px, 4.5vw, 38px); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
.page-hero h1 .p { color: var(--accent); }
.page-hero .sub { color: var(--text2); font-size: 14px; margin-top: 10px; max-width: 520px; }
.page-content { max-width: 900px; margin: 0 auto; padding: 26px 0 12px; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 26px 28px; margin-bottom: 18px; }
.card h2 { font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card h2::before { content: '>'; color: var(--accent); font-family: var(--mono); }
.card h3 { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--text); margin: 18px 0 8px; }
.card p, .card li { font-size: 14px; color: var(--text2); }
.card ul, .card ol { padding-left: 20px; }
.card li { margin-bottom: 6px; }
.card a { color: var(--accent); text-decoration: none; }
.card a:hover { text-decoration: underline; }

/* FOOTER */
.ftr { margin-top: 34px; margin-bottom: 10px; border-radius: 25px; background: var(--card); border: 1px solid var(--border); overflow: hidden; }
.ftr-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 24px; }
@media (min-width: 1024px) { .ftr-inner { flex-direction: row; justify-content: space-between; padding: 0 32px; height: 86px; } }
.ftr-brand { display: flex; align-items: center; gap: 10px; }
.ftr-brand-icon { width: 46px; height: 46px; border-radius: 12px; overflow: hidden; }
.ftr-brand-icon img { width: 100%; height: 100%; object-fit: contain; }
.ftr-brand-name { font-family: var(--mono); font-size: 16px; font-weight: 700; color: var(--text); }
.ftr-brand-name b { color: var(--accent); }
.ftr-copy { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.ftr-socials { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.ftr-social { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text2); font-size: 13px; font-weight: 500; padding: 8px 14px; border-radius: 12px; transition: all .2s; font-family: var(--mono); }
.ftr-social:hover { color: var(--text); background: rgba(255,255,255,.05); }
body.light .ftr-social:hover { background: rgba(0,0,0,.04); }
.ftr-social svg { width: 20px; height: 20px; }


/* ===== CONSOLE WINDOW (term) ===== */
.term { --ac: var(--accent); background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 16px; transition: border-color .25s; }
.term:hover { border-color: color-mix(in srgb, var(--ac) 50%, transparent); }
.term-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: color-mix(in srgb, var(--ac) 10%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--ac) 22%, transparent); font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--ac); text-transform: uppercase; letter-spacing: .04em; }
body.light .term-bar { background: rgba(0,0,0,.03); }
.term-dots { display: flex; gap: 4px; margin-right: 4px; flex-shrink: 0; }
.term-dots span { width: 7px; height: 7px; border-radius: 50%; }
.term-dots span:nth-child(1) { background: var(--term-red); }
.term-dots span:nth-child(2) { background: var(--term-yellow); }
.term-dots span:nth-child(3) { background: var(--terminal); }
.term-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term-body { padding: 18px 20px; }
.term-body p { font-size: 13px; color: var(--text2); line-height: 1.7; margin-bottom: 10px; }
.term-body p:last-child { margin-bottom: 0; }
.term-body .lbl { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--ac); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.term-body h2, .term-body h3 { font-family: var(--mono); margin-bottom: 8px; }
.term-body h2 { font-size: 15px; color: var(--text); }
.term-body h3 { font-size: 13px; color: var(--text); }

/* Terminal list */
.term-list { list-style: none; }
.term-list li { display: flex; gap: 8px; font-size: 13px; color: var(--text2); line-height: 1.6; padding: 9px 0; border-bottom: 1px solid var(--border); }
.term-list li:last-child { border-bottom: none; }
.term-list li::before { content: '>'; color: var(--ac); font-family: var(--mono); font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.term-list li b { color: var(--text); font-weight: 700; }

/* Badges / chips */
.chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 9px; border-radius: 6px; color: var(--ac); background: color-mix(in srgb, var(--ac) 12%, transparent); border: 1px solid color-mix(in srgb, var(--ac) 35%, transparent); width: fit-content; }
.chip.green { color: var(--terminal); background: var(--terminal-dim); border-color: rgba(0,255,136,.25); }
.chip.red { color: var(--danger); background: var(--danger-dim); border-color: rgba(255,77,106,.25); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.term-doc { display: flex; flex-direction: column; gap: 14px; }
.term-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; color: var(--text2); padding: 10px 0; border-bottom: 1px dashed var(--border); }
.term-row:last-child { border-bottom: none; }
.term-row .k { color: var(--muted); }
.term-row .v { color: var(--text); text-align: right; }
.term-row .v a { color: var(--accent); text-decoration: none; }
.term-hl { background: var(--terminal-dim); border: 1px solid rgba(0,255,136,.18); padding: 12px 14px; border-radius: 10px; font-size: 12px; color: var(--text2); line-height: 1.6; }
.term-hl b, .term-hl strong { color: var(--terminal); }
.term-warn { background: rgba(255,189,46,.07); border: 1px solid rgba(255,189,46,.2); padding: 12px 14px; border-radius: 10px; font-size: 12px; color: var(--text2); line-height: 1.6; }
.term-warn::before { content: 'warning: '; color: var(--term-yellow); font-family: var(--mono); font-weight: 700; }
