
:root {
  --bg: #0f0e0d;
  --bg-alt: #1a1917;
  --card: #1f1e1c;
  --card-2: #272523;
  --line: rgba(255,255,255,.08);
  --line-2: rgba(255,255,255,.14);
  --text: #ecebe9;
  --muted: #a19d97;
  --dim: #6f6b65;
  --blue: #5b78f7;
  --blue-hi: #7d93f9;
  --blue-soft: rgba(91,120,247,.12);
  --green: #22c55e;
  --gold: #facc15;
  --red: #f87171;
  --top-h: 60px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 20px); }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; line-height: 1.6; overflow-x: hidden; }
a { color: var(--blue-hi); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: .86em; background: var(--card-2);
  border: 1px solid var(--line); padding: .08rem .35rem; border-radius: .35rem; color: #fff; white-space: nowrap; }
kbd { font-family: inherit; font-size: .68rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line-2);
  border-radius: .3rem; padding: .05rem .35rem; background: var(--bg-alt); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; }

.skip { position: absolute; left: -999px; top: 0; z-index: 999; background: #fff; color: #111; padding: .5rem 1rem; }
.skip:focus { left: 1rem; top: 1rem; }

.ambient { position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(ellipse 70% 40% at 50% -5%, rgba(91,120,247,.18) 0%, transparent 60%); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border: 1px solid transparent; border-radius: .6rem;
  font-family: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.btn-sm { font-size: .82rem; padding: .48rem .95rem; }
.btn-md { font-size: .9rem; padding: .68rem 1.25rem; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-hi); }
.btn-ghost { background: var(--card); color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--card-2); }
.icon-btn { background: none; border: none; color: var(--text); cursor: pointer; padding: .35rem; display: flex; }

.top { position: sticky; top: 0; z-index: 50; height: var(--top-h); background: rgba(15,14,13,.96); border-bottom: 1px solid var(--line); }
.top-in { height: 100%; max-width: 1480px; margin: 0 auto; padding: 0 1.25rem; display: flex; align-items: center; gap: 1rem; }
.menu-btn { display: none; }
.brand { display: flex; align-items: center; gap: .55rem; color: #fff; font-weight: 700; letter-spacing: -.02em; text-decoration: none !important; flex-shrink: 0; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.brand em { font-style: normal; font-size: .72rem; font-weight: 600; color: var(--blue-hi); background: var(--blue-soft); padding: .1rem .45rem; border-radius: 99px; }
.search-btn { display: flex; align-items: center; gap: .55rem; margin-left: 1.5rem; min-width: 240px; padding: .42rem .6rem .42rem .75rem;
  background: var(--card); border: 1px solid var(--line); border-radius: .6rem; color: var(--dim); font-family: inherit; font-size: .84rem; cursor: pointer; }
.search-btn:hover { border-color: var(--line-2); color: var(--muted); }
.search-btn kbd { margin-left: auto; }
.top-links { display: flex; gap: 1.4rem; margin-left: auto; }
.top-links a { color: var(--muted); font-size: .85rem; font-weight: 500; text-decoration: none; }
.top-links a:hover { color: #fff; }

.shell { position: relative; z-index: 1; max-width: 1480px; margin: 0 auto; display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 230px; gap: 0; }

.side { position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow-y: auto; padding: 1.5rem 1rem 3rem 1.25rem;
  border-right: 1px solid var(--line); scrollbar-width: thin; }
.side-group { margin-bottom: 1.4rem; }
.side-title { font-size: .76rem; font-weight: 700; color: #fff; margin: 0 0 .4rem .65rem; letter-spacing: .01em; }
.side ul { list-style: none; }
.side a { display: block; padding: .32rem .65rem; border-radius: .45rem; font-size: .86rem; color: var(--muted); text-decoration: none; line-height: 1.45; }
.side a:hover { color: #fff; background: var(--card); }
.side a.active { color: var(--blue-hi); background: var(--blue-soft); font-weight: 600; }
.side-shade { display: none; }

.main { min-width: 0; padding: 2.5rem 3.5rem 2rem; }
.doc { max-width: 780px; margin: 0 auto; }
.toc { position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow-y: auto; padding: 2.5rem 1.25rem 2rem 0; }
.toc-title { font-size: .76rem; font-weight: 700; color: #fff; margin-bottom: .6rem; }
.toc ul { list-style: none; border-left: 1px solid var(--line); }
.toc a { display: block; padding: .25rem 0 .25rem .85rem; margin-left: -1px; border-left: 1px solid transparent; font-size: .82rem; color: var(--dim); text-decoration: none; line-height: 1.45; }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--blue-hi); border-left-color: var(--blue); }
.toc li.sub a { padding-left: 1.6rem; font-size: .78rem; }

.crumb { font-size: .78rem; font-weight: 600; color: var(--blue-hi); margin-bottom: .5rem; }
.doc h1 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; color: #fff; }
.doc .lead { font-size: 1.07rem; color: var(--muted); margin-top: .8rem; line-height: 1.7; }
.doc h2 { font-size: 1.4rem; font-weight: 700; letter-spacing: -.02em; color: #fff; margin: 2.75rem 0 .2rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.doc h3 { font-size: 1.05rem; font-weight: 700; color: #fff; margin: 1.75rem 0 .2rem; }
.doc p { margin-top: .75rem; color: var(--text); font-size: .95rem; }
.doc ul:not(.steps):not(.cards), .doc ol:not(.steps) { margin: .75rem 0 0 1.25rem; font-size: .95rem; }
.doc li { margin-top: .3rem; }
.doc li::marker { color: var(--dim); }
.doc strong { color: #fff; }
.doc a.anchor { color: var(--dim); margin-left: .4rem; opacity: 0; text-decoration: none; font-weight: 500; }
.doc h2:hover a.anchor { opacity: 1; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.chip { font-size: .7rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: .18rem .55rem; border-radius: 99px; }
.chip.free { color: var(--green); background: rgba(34,197,94,.1); }
.chip.prem { color: var(--gold); background: rgba(250,204,21,.1); }
.chip.srv { color: var(--muted); background: var(--card-2); }
.dpath { font-size: .86rem; font-weight: 600; color: #fff; background: var(--card); border: 1px solid var(--line); padding: .12rem .5rem; border-radius: .4rem; white-space: nowrap; }
.dpath b { color: var(--dim); font-weight: 400; }

.shot { margin: 1.4rem 0 0; }
.shot-img { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: .85rem; overflow: hidden; background: #313338; cursor: zoom-in; }
.shot-img:hover { border-color: var(--line-2); }
.shot:not(.wide) .shot-img { width: auto; max-width: 100%; }
.shot-img img { width: 100%; height: auto; }
.shot figcaption { font-size: .8rem; color: var(--dim); margin-top: .5rem; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.4rem; align-items: start; }
.gallery .shot { margin: 0; }
.gallery .shot-img { width: 100%; }

.presets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; margin-top: .9rem; }
.presets figure { margin: 0; }
.presets img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: .7rem; border: 1px solid var(--line); }
.presets figcaption { font-size: .76rem; color: var(--dim); margin-top: .35rem; text-align: center; }

.showcase { margin-top: 1.75rem; border-radius: 1rem; overflow: hidden; border: 1px solid var(--line-2); }
.showcase .shot-img { border: none; border-radius: 0; width: 100%; }

.callout { margin-top: 1.25rem; border-radius: .8rem; padding: .9rem 1.1rem; border: 1px solid var(--line); background: var(--card); border-left-width: 3px; }
.callout-title { font-size: .76rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .25rem; }
.callout-body { font-size: .9rem; color: var(--text); }
.callout-body p:first-child { margin-top: 0; }
.callout.tip { border-left-color: var(--green); } .callout.tip .callout-title { color: var(--green); }
.callout.info { border-left-color: var(--blue); } .callout.info .callout-title { color: var(--blue-hi); }
.callout.warning { border-left-color: #f59e0b; } .callout.warning .callout-title { color: #f59e0b; }
.callout.premium { border-left-color: var(--gold); } .callout.premium .callout-title { color: var(--gold); }

.table-wrap { margin-top: 1rem; overflow-x: auto; border: 1px solid var(--line); border-radius: .8rem; }
.cmds { width: 100%; border-collapse: collapse; font-size: .87rem; }
.cmds th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); font-weight: 700; background: var(--card); padding: .6rem .9rem; border-bottom: 1px solid var(--line); }
.cmds td { padding: .6rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--muted); }
.cmds tr:last-child td { border-bottom: none; }
.cmds td:first-child { width: 1%; white-space: nowrap; }

.steps { list-style: none; counter-reset: s; margin-top: 1rem; }
.steps li { counter-increment: s; position: relative; padding: 0 0 1rem 2.6rem; font-size: .93rem; margin: 0; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -.05rem; width: 1.65rem; height: 1.65rem; border-radius: 50%;
  background: var(--blue-soft); color: var(--blue-hi); font-size: .78rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.steps li::after { content: ''; position: absolute; left: .8rem; top: 1.75rem; bottom: .15rem; width: 1px; background: var(--line); }
.steps li:last-child::after { display: none; }

.cards { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; margin-top: 1.25rem; }
.cards a { display: block; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: .9rem; padding: 1.05rem 1.15rem; text-decoration: none; }
.cards a:hover { border-color: var(--blue); }
.cards b { display: flex; align-items: center; gap: .5rem; color: #fff; font-size: .95rem; }
.cards b i { width: 8px; height: 8px; border-radius: 2px; display: block; flex-shrink: 0; }
.cards span { display: block; font-size: .84rem; color: var(--muted); margin-top: .3rem; line-height: 1.55; }

.faq details { border: 1px solid var(--line); background: var(--card); border-radius: .8rem; margin-top: .7rem; }
.faq summary { cursor: pointer; padding: .85rem 1.1rem; font-weight: 600; color: #fff; font-size: .93rem; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--dim); }
.faq details[open] summary::after { content: '–'; }
.faq details > div { padding: 0 1.1rem 1rem; font-size: .9rem; color: var(--muted); }

.compare { width: 100%; border-collapse: collapse; font-size: .87rem; }
.compare th, .compare td { padding: .6rem .9rem; border-bottom: 1px solid var(--line); text-align: left; color: var(--muted); }
.compare th { background: var(--card); color: var(--dim); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.compare td:first-child { color: var(--text); }
.compare tr:last-child td { border-bottom: none; }

.pager { max-width: 780px; margin: 3.5rem auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pg { display: block; border: 1px solid var(--line); border-radius: .8rem; padding: .85rem 1.1rem; background: var(--card); text-decoration: none !important; }
.pg:hover { border-color: var(--blue); }
.pg small { display: block; font-size: .74rem; color: var(--dim); }
.pg span { display: block; color: var(--blue-hi); font-weight: 600; font-size: .95rem; margin-top: .1rem; }
.pg.next { text-align: right; grid-column: 2; }
.foot { max-width: 780px; margin: 3rem auto 0; padding-top: 1.25rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem;
  font-size: .78rem; color: var(--dim); }
.foot a { color: var(--muted); }

.search { position: fixed; inset: 0; z-index: 200; background: rgba(10,9,8,.8); display: flex; justify-content: center; padding: 10vh 1rem 1rem; }
.search[hidden] { display: none; }
.search-box { width: 100%; max-width: 620px; max-height: 70vh; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line-2);
  border-radius: 1rem; box-shadow: 0 30px 80px rgba(0,0,0,.5); overflow: hidden; }
.search-field { display: flex; align-items: center; gap: .65rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); color: var(--dim); }
.search-field input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: #fff; font-family: inherit; font-size: 1rem; }
.search-results { list-style: none; overflow-y: auto; padding: .4rem; }
.search-results a { display: block; padding: .6rem .75rem; border-radius: .55rem; text-decoration: none; }
.search-results a:hover, .search-results a.sel { background: var(--blue-soft); }
.search-results b { display: block; color: #fff; font-size: .9rem; font-weight: 600; }
.search-results small { display: block; color: var(--dim); font-size: .78rem; margin-top: .1rem; }
.search-results mark { background: none; color: var(--blue-hi); font-weight: 700; }
.search-empty { padding: 1.25rem; color: var(--dim); font-size: .88rem; text-align: center; }

.lb { position: fixed; inset: 0; z-index: 300; background: rgba(10,9,8,.94); display: none; align-items: center; justify-content: center; padding: 1rem; cursor: zoom-out; }
.lb.open { display: flex; }
.lb img { max-width: 94vw; max-height: 90vh; border-radius: .8rem; border: 1px solid var(--line-2); }

@media (max-width: 1200px) {
  .shell { grid-template-columns: 250px minmax(0, 1fr); }
  .toc { display: none; }
  .main { padding: 2.25rem 2.25rem 2rem; }
}
@media (max-width: 900px) {
  .menu-btn { display: flex; }
  .top-links { display: none; }
  .search-btn { margin-left: auto; min-width: 0; }
  .search-btn span, .search-btn kbd { display: none; }
  .add-btn { margin-left: 0; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; top: var(--top-h); left: 0; bottom: 0; height: auto; width: min(300px, 85vw); z-index: 60;
    background: var(--bg); transform: translateX(-100%); transition: transform .2s ease; }
  .side.open { transform: none; }
  .side-shade { position: fixed; inset: var(--top-h) 0 0; z-index: 55; background: rgba(0,0,0,.55); }
  .side.open + .side-shade { display: block; }
  .main { padding: 1.75rem 1rem 1.5rem; }
  .gallery, .cards { grid-template-columns: minmax(0, 1fr); }
  .presets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pg.next { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .side { transition: none; }
}
