/* Orynt Docs - Brand 2.0 (purple #7018ff, Orbitron titles, Michroma labels, Inter text) */
:root {
    --accent: #7018ff;
    --accent-hi: #8c45ff;
    --accent-light: #b48bff;
    --accent-soft: rgba(112, 24, 255, .14);
    --accent-line: rgba(112, 24, 255, .45);
    --accent-glow: rgba(112, 24, 255, .5);
    --bg-0: #08070c;
    --bg-1: #0e0d14;
    --bg-2: #14131c;
    --bg-3: #1b1a25;
    --bg-4: #23212f;
    --line: rgba(255, 255, 255, .06);
    --line-2: rgba(255, 255, 255, .1);
    --text: #eeecf5;
    --text-2: #a6a1b8;
    --text-3: #6f6a82;
    --success: #2ed3a0;
    --warn: #ffb547;
    --font: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
    --title-font: 'Orbitron', 'Inter', sans-serif;
    --label-font: 'Michroma', 'Inter', sans-serif;
    --mono: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
    --top: 64px;
    --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-padding-top: calc(var(--top) + 20px); }
body {
    font-family: var(--font); color: var(--text); font-size: 15px; line-height: 1.65;
    background: radial-gradient(1200px 600px at 70% -200px, rgba(112, 24, 255, .16), transparent 70%), var(--bg-0);
    background-attachment: fixed; min-height: 100vh;
}
a { color: var(--accent-light); text-decoration: none; }
a:hover { color: #d2bcff; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: #fff; }

/* ---------- Top bar ---------- */
.top {
    position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; gap: 18px; padding: 0 22px;
    background: rgba(8, 7, 12, .82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); flex-shrink: 0; }
.brand img { width: 34px; height: 34px; filter: drop-shadow(0 0 10px var(--accent-glow)); }
.brand span { display: flex; flex-direction: column; line-height: 1.05; }
.brand b { font-family: var(--title-font); font-weight: 800; font-size: 16px; letter-spacing: .12em; }
.brand i { font-style: normal; font-family: var(--label-font); font-size: 8.5px; letter-spacing: .5em; color: var(--accent-light); }
.menu-btn { display: none; background: none; border: 0; color: var(--text); width: 36px; height: 36px; cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; }

.search { position: relative; flex: 1; max-width: 520px; margin-left: 22px; }
.search > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); }
.search input {
    width: 100%; height: 40px; padding: 0 44px 0 38px; color: var(--text); font: inherit; font-size: 14px;
    background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; outline: none; transition: border .15s, box-shadow .15s;
}
.search input:focus { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 11px var(--mono); color: var(--text-3);
    border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 6px;
}
.results {
    display: none; position: absolute; top: 48px; left: 0; right: 0; max-height: 70vh; overflow-y: auto; padding: 6px;
    background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}
.results.open { display: block; }
.results a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--text); }
.results a.sel, .results a:hover { background: var(--accent-soft); }
.results a small { display: block; font-family: var(--label-font); font-size: 8.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent-light); }
.results a b { font-weight: 600; font-size: 14px; }
.results a span { display: block; font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results mark { background: none; color: #fff; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.results .none { padding: 14px; color: var(--text-3); font-size: 13px; }

.top-actions { display: flex; gap: 8px; margin-left: auto; }
.top-btn { height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--text); border: 1px solid var(--line-2); background: var(--bg-2); }
.top-btn.primary { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--accent-hi), var(--accent)); box-shadow: 0 0 18px -6px var(--accent-glow); }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 260px minmax(0, 1fr) 230px; max-width: 1480px; margin: 0 auto; }
.layout.no-toc { grid-template-columns: 260px minmax(0, 1fr); }
.layout.no-toc .main > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.side { position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; border-right: 1px solid var(--line); }
.side-inner { padding: 22px 14px 40px; }
.side-group { margin-bottom: 20px; }
.side-label { font-family: var(--label-font); font-size: 9px; letter-spacing: .28em; text-transform: uppercase; color: var(--text-3); padding: 0 10px 8px; }
.side a {
    display: flex; align-items: center; gap: 10px; padding: 7px 10px; margin-bottom: 1px; border-radius: 8px;
    color: var(--text-2); font-size: 14px; font-weight: 500; border: 1px solid transparent; transition: background .12s, color .12s;
}
.side a:hover { color: var(--text); background: var(--bg-2); }
.side a.active {
    color: #fff; border-color: transparent;
    background: linear-gradient(90deg, var(--accent-soft), transparent) padding-box, linear-gradient(var(--bg-1), var(--bg-1)) padding-box,
        linear-gradient(90deg, var(--accent-hi), rgba(112, 24, 255, .1)) border-box;
}
.side a span { flex: 1; }
.ic { width: 17px; height: 17px; flex-shrink: 0; }
.side a.active .ic { color: var(--accent-light); }
.tag { font-style: normal; font-size: 10px; font-weight: 600; padding: 1px 7px; border-radius: 20px; }
.tag.free { color: var(--success); background: rgba(46, 211, 160, .12); }
.side a .ext { font-style: normal; font-size: 12px; color: var(--text-3); }
.tag.soon { color: var(--warn); background: rgba(255, 181, 71, .12); }

.main { min-width: 0; padding: 34px 48px 0; }
.toc { position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; }
.toc-inner { padding: 34px 18px 40px 6px; border-left: 1px solid var(--line); margin-top: 0; min-height: 100%; }
.toc a { display: block; padding: 4px 0 4px 14px; font-size: 13px; color: var(--text-3); border-left: 2px solid transparent; margin-left: -1px; line-height: 1.4; }
.toc a.l3 { padding-left: 26px; font-size: 12.5px; }
.toc a:hover { color: var(--text); }
.toc a.on { color: var(--accent-light); border-left-color: var(--accent); }

/* ---------- Hero ---------- */
.crumbs { display: flex; gap: 8px; font-family: var(--label-font); font-size: 9px; letter-spacing: .25em; text-transform: uppercase; color: var(--text-3); margin-bottom: 16px; }
.crumbs a { color: var(--text-3); }
.crumbs a:hover { color: var(--accent-light); }
.hero-head { display: flex; align-items: center; gap: 16px; }
.hero-icon {
    width: 54px; height: 54px; display: grid; place-items: center; border-radius: 15px; flex-shrink: 0; color: #fff;
    background: linear-gradient(135deg, var(--accent-hi), var(--accent)); box-shadow: 0 0 30px -6px var(--accent-glow);
}
.hero-icon .ic { width: 26px; height: 26px; }
h1 { font-family: var(--title-font); font-weight: 800; font-size: 34px; letter-spacing: .04em; line-height: 1.15; text-transform: uppercase; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.badge {
    font: 600 12px var(--font); color: var(--text-2); padding: 4px 11px; border-radius: 20px;
    background: var(--bg-3); border: 1px solid var(--line-2);
}
button.badge { cursor: pointer; }
.badge.code { font-family: var(--mono); color: var(--accent-light); background: var(--accent-soft); border-color: var(--accent-line); }
.badge.free { color: var(--success); background: rgba(46, 211, 160, .1); border-color: rgba(46, 211, 160, .3); }
.badge.soon { color: var(--warn); background: rgba(255, 181, 71, .1); border-color: rgba(255, 181, 71, .3); }
.lead { margin-top: 14px; color: var(--text-2); font-size: 16px; max-width: 760px; }
.lead p + p { margin-top: 10px; }
.lead blockquote { border: 0; padding: 0; background: none; margin: 0 0 10px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.quick a {
    font-size: 13px; font-weight: 600; color: var(--text); padding: 7px 14px; border-radius: 9px;
    background: var(--bg-2); border: 1px solid var(--line-2); transition: border-color .15s, color .15s;
}
.quick a:hover { border-color: var(--accent-line); color: var(--accent-light); }

/* ---------- Home ---------- */
.hero.home { text-align: center; padding: 30px 0 10px; }
.hero-emblem { width: 92px; height: 92px; margin: 0 auto 20px; filter: drop-shadow(0 0 30px var(--accent-glow)); }
.hero.home h1 { font-size: 46px; }
.hero.home h1 span { color: var(--accent-light); }
.sub { color: var(--text-2); font-size: 17px; max-width: 560px; margin: 12px auto 0; }
.home-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.btn {
    display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 20px; border-radius: 11px; font-weight: 600; font-size: 14px;
    color: var(--text); background: var(--bg-2); border: 1px solid var(--line-2); transition: transform .15s, border-color .15s;
}
.btn:hover { color: #fff; border-color: var(--accent-line); transform: translateY(-1px); }
.btn.primary { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--accent-hi), var(--accent)); box-shadow: 0 0 26px -8px var(--accent-glow); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 44px 0 10px; }
.step { padding: 16px 16px 18px; border-radius: var(--radius); background: var(--bg-1); border: 1px solid var(--line); }
.step i {
    display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-style: normal; font-family: var(--title-font);
    font-size: 12px; color: var(--accent-light); background: var(--accent-soft); border: 1px solid var(--accent-line); margin-bottom: 10px;
}
.step b { display: block; font-size: 14px; margin-bottom: 4px; }
.step span { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.group { margin-top: 38px; }
.group-title { font-family: var(--label-font); font-weight: 400; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.card {
    display: flex; flex-direction: column; padding: 18px; border-radius: 14px; color: var(--text);
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); border: 1px solid var(--line); transition: transform .15s, border-color .15s, box-shadow .15s;
}
.card:hover { color: var(--text); transform: translateY(-2px); border-color: var(--accent-line); box-shadow: 0 14px 40px -18px var(--accent-glow); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.card-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; color: var(--accent-light); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.card-icon .ic { width: 20px; height: 20px; }
.card b { font-family: var(--title-font); font-weight: 600; font-size: 15px; letter-spacing: .05em; text-transform: uppercase; }
.card p { font-size: 13px; color: var(--text-2); margin: 6px 0 14px; flex: 1; line-height: 1.55; }
.card-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-3); }
.card-foot code { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }
.card-foot i { font-style: normal; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin: 28px 0 6px; }
.gallery figure { cursor: zoom-in; border-radius: 10px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); transition: border-color .15s; }
.gallery figure:hover { border-color: var(--accent-line); }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.gallery figcaption { font-size: 12px; color: var(--text-2); padding: 7px 10px 8px; }
.lightbox { display: none; position: fixed; inset: 0; z-index: 50; background: rgba(4, 3, 8, .9); padding: 4vh 4vw; cursor: zoom-out; }
.lightbox.open { display: grid; place-items: center; }
.lightbox img { max-height: 92vh; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }

/* ---------- The docs text ---------- */
.prose { margin-top: 26px; max-width: 860px; }
.prose h2 {
    font-family: var(--title-font); font-weight: 600; font-size: 21px; letter-spacing: .05em; text-transform: uppercase;
    margin: 46px 0 14px; padding-top: 26px; border-top: 1px solid var(--line); position: relative;
}
.prose > h2:first-child { margin-top: 10px; border-top: 0; padding-top: 0; }
.prose h3 { font-size: 17px; font-weight: 700; margin: 30px 0 10px; position: relative; }
.prose h4 { font-size: 15px; font-weight: 700; margin: 22px 0 8px; }
.prose .anchor { position: absolute; left: -22px; color: var(--text-3); opacity: 0; font-weight: 400; transition: opacity .15s; }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; }
.prose h2 .anchor { top: 26px; }
.prose p { margin: 10px 0; color: #d6d3e2; }
.prose ul, .prose ol { margin: 10px 0 10px 22px; color: #d6d3e2; }
.prose li { margin: 4px 0; }
.prose li::marker { color: var(--accent-light); }
.prose strong { color: #fff; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }
.prose code, .lead code, .step code {
    font-family: var(--mono); font-size: .86em; padding: 2px 6px; border-radius: 6px;
    color: #e3d5ff; background: rgba(112, 24, 255, .12); border: 1px solid rgba(112, 24, 255, .22);
}
.prose pre {
    position: relative; margin: 14px 0; padding: 16px 18px; overflow-x: auto; border-radius: 11px;
    background: var(--bg-1); border: 1px solid var(--line-2);
}
.prose pre code { font-size: 13px; line-height: 1.6; padding: 0; background: none; border: 0; color: #e6e3f0; }
.copy {
    position: absolute; top: 8px; right: 8px; font: 600 11px var(--font); color: var(--text-2); padding: 4px 10px; border-radius: 7px;
    background: var(--bg-3); border: 1px solid var(--line-2); cursor: pointer; opacity: 0; transition: opacity .15s;
}
.prose pre:hover .copy { opacity: 1; }
.copy.done { color: var(--success); opacity: 1; }
.table-wrap { overflow-x: auto; margin: 14px 0; border: 1px solid var(--line-2); border-radius: 11px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--text-2); background: var(--bg-2); }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose td { color: #d6d3e2; }
.prose td:first-child { white-space: nowrap; }
blockquote.note {
    margin: 16px 0; padding: 12px 16px; border-radius: 11px; color: #d6d3e2;
    background: var(--accent-soft); border: 1px solid var(--accent-line); border-left: 3px solid var(--accent);
}
blockquote.note p { margin: 4px 0; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 860px; margin: 50px 0 10px; }
.pager a { padding: 14px 18px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-1); color: var(--text); font-weight: 600; }
.pager a:hover { border-color: var(--accent-line); color: var(--accent-light); }
.pager a small { display: block; font-family: var(--label-font); font-weight: 400; font-size: 8.5px; letter-spacing: .25em; text-transform: uppercase; color: var(--text-3); margin-bottom: 3px; }
.pager a.next { text-align: right; }

.foot { display: flex; align-items: center; gap: 18px; margin-top: 60px; padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 13px; }
.foot img { height: 22px; opacity: .8; }

/* ---------- Smaller screens ---------- */
@media (max-width: 1200px) {
    .layout { grid-template-columns: 250px minmax(0, 1fr); }
    .toc { display: none; }
}
@media (max-width: 900px) {
    :root { --top: 58px; }
    .layout { grid-template-columns: minmax(0, 1fr); }
    .menu-btn { display: grid; place-items: center; }
    .side {
        position: fixed; z-index: 40; top: var(--top); left: 0; width: 280px; height: calc(100vh - var(--top));
        background: var(--bg-1); transform: translateX(-100%); transition: transform .2s; box-shadow: 20px 0 50px rgba(0, 0, 0, .5);
    }
    body.menu-open .side { transform: none; }
    .main { padding: 24px 16px 0; }
    .search { margin-left: 0; }
    .search kbd, .brand span { display: none; }
    .top { gap: 10px; padding: 0 12px; }
    .steps { grid-template-columns: 1fr 1fr; }
    h1 { font-size: 26px; }
    .hero.home h1 { font-size: 34px; }
    .top-actions { display: none; }
}
@media (max-width: 520px) {
    .steps { grid-template-columns: 1fr; }
    .prose td:first-child { white-space: normal; }
    .pager { grid-template-columns: 1fr; }
}
