
:root { --bg: #0f0c0d; --bg2: #161214; --bar: #141012; --line: #2c2326; --line2: #3a2e32; --text: #e9e2da; --muted: #a99d96; --dim: #7d716c; --lime: #c3e126; --lime-d: #9db71a; --ok: #7fe3c5; --warn: #ff9d4d; --err: #ff7f78; --head: #f2ece4;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace; --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
* { box-sizing: border-box; }
html { scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--lime); text-decoration: none; }
a:hover { text-decoration: underline; }
code, kbd, pre { font-family: var(--mono); }
:not(pre) > code { font-size: .88em; background: var(--bg2); border: 1px solid var(--line); border-radius: 5px; padding: .08em .35em; color: var(--head); white-space: nowrap; }
kbd { font-size: .8em; background: var(--bg2); border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 5px; padding: .1em .45em; color: var(--head); }
.dim { color: var(--dim); }
h1, h2, h3 { color: var(--head); line-height: 1.2; letter-spacing: -.01em; }
::selection { background: color-mix(in srgb, var(--lime) 35%, transparent); }

/* header */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; padding: 14px clamp(16px, 4vw, 40px); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--head); font: 700 20px var(--mono); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand em { font-style: normal; color: var(--dim); font-weight: 400; font-size: 15px; }
.logo { width: 28px; height: 28px; flex-shrink: 0; }
footer .logo { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 15px; }
.top nav a:not(.btn) { color: var(--muted); }
.top nav a:not(.btn):hover { color: var(--head); text-decoration: none; }

.btn { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 10px; background: var(--lime); color: #12100a; font-weight: 650; border: 1px solid var(--lime); transition: transform .12s, background .12s; }
.btn:hover { text-decoration: none; background: #d2ef33; transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--head); border-color: var(--line2); }
.btn.ghost:hover { border-color: var(--lime); background: transparent; }
.btn.small { padding: 7px 14px; font-size: 14px; border-radius: 8px; }
.btn:focus-visible, a:focus-visible, input:focus-visible + label, input:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

/* code */
figure.code { margin: 18px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--bar); overflow: hidden; }
figure.code figcaption { font: 12px var(--mono); color: var(--dim); padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--bg2); }
figure.code figcaption:empty, figure.code figcaption:is([data-blank]) { display: none; }
pre { margin: 0; padding: 14px 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; color: var(--text); }
.h-kw { color: var(--lime); font-weight: 700; } .h-kw2 { color: var(--lime); } .h-cmd { color: var(--head); font-weight: 600; }
.h-flag { color: #7fc7ff; } .h-str { color: #f5c97a; } .h-var { color: var(--ok); } .h-num { color: #ff9fbf; }
.h-op { color: var(--muted); } .h-fn { color: #c9a2ff; } .h-note { color: var(--dim); font-style: italic; }
.h-prompt { color: var(--lime); } .h-out { color: var(--muted); }

/* landing */
main { display: block; }
.home section { padding: clamp(56px, 8vw, 96px) clamp(16px, 5vw, 64px); max-width: 1180px; margin: 0 auto; }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; padding-top: clamp(56px, 9vw, 110px) !important; }
.eyebrow { font: 600 13px var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--lime); margin: 0 0 14px; }
.hero h1 { font-size: clamp(44px, 7vw, 76px); margin: 0 0 20px; letter-spacing: -.035em; }
.lede { font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); max-width: 38em; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 18px; }
.cta.center { justify-content: center; }
.hint { color: var(--dim); font-size: 14px; }
.hero-term { border: 1px solid var(--line2); border-radius: 14px; background: var(--bar); box-shadow: 0 30px 80px -30px rgba(195,225,38,.18), 0 20px 60px -20px rgba(0,0,0,.8); overflow: hidden; }
.hero-term figure.code { margin: 0; border: 0; border-radius: 0; }
.hero-term figcaption { display: none; }
.hero-term pre { padding: 18px 20px 22px; font-size: 13px; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--bg2); font: 12px var(--mono); color: var(--dim); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line2); }
.term-bar i:first-child { background: var(--lime); }
.term-bar span { margin-left: 8px; }
.langs { text-align: center; }
.langs h2, .safety h2, .get h2 { font-size: clamp(30px, 4vw, 44px); margin: 0 0 14px; }
.sub { color: var(--muted); max-width: 44em; margin: 0 auto 30px; font-size: 17px; }
.switch { max-width: 760px; margin: 0 auto; text-align: left; display: grid; grid-template-columns: auto auto 1fr; }
.switch input { position: absolute; opacity: 0; }
.switch label { cursor: pointer; padding: 9px 18px; font: 600 14px var(--mono); color: var(--muted); border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; margin-right: 6px; background: var(--bg2); }
.switch input:checked + label { color: #12100a; background: var(--lime); border-color: var(--lime); }
.switch .pane { grid-column: 1 / -1; display: none; }
.switch .pane figure { margin-top: 0; border-top-left-radius: 0; }
.switch figcaption { display: none; }
#l-basic:checked ~ .p-basic, #l-script:checked ~ .p-script { display: block; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid > *, .hero > *, .safety-cols > * { min-width: 0; }
.grid article { border: 1px solid var(--line); border-radius: 14px; padding: 22px 22px 8px; background: linear-gradient(180deg, var(--bg2), var(--bg)); }
.grid h3 { margin: 0 0 8px; font-size: 19px; }
.grid p { color: var(--muted); margin: 0 0 12px; font-size: 15px; }
.grid figure.code { margin: 8px 0 14px; } .grid figcaption { display: none; } .grid pre { font-size: 12.5px; padding: 10px 12px; }
.safety-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 40px; }
.safety ul { list-style: none; padding: 0; margin: 0; }
.safety li { position: relative; padding: 14px 0 14px 30px; border-bottom: 1px solid var(--line); color: var(--muted); }
.safety li::before { content: ""; position: absolute; left: 4px; top: 22px; width: 10px; height: 10px; border-radius: 3px; background: var(--lime); }
.safety li strong { color: var(--head); }
.get { text-align: center; border-top: 1px solid var(--line); }
.get p { color: var(--muted); font-size: 17px; }

footer { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; padding: 26px clamp(16px, 4vw, 40px); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* docs */
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr) 200px; gap: 40px; max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); }
.side { position: sticky; top: 61px; align-self: start; height: calc(100vh - 61px); overflow-y: auto; padding: 28px 0; border-right: 1px solid var(--line); }
.side nav { display: flex; flex-direction: column; }
.side a { color: var(--muted); padding: 7px 14px; border-radius: 8px 0 0 8px; font-size: 15px; border-right: 2px solid transparent; margin-right: -1px; }
.side a:hover { color: var(--head); background: var(--bg2); text-decoration: none; }
.side a[aria-current] { color: var(--lime); background: color-mix(in srgb, var(--lime) 8%, transparent); border-right-color: var(--lime); font-weight: 600; }
.side .ver { color: var(--dim); font-size: 12px; padding: 18px 14px; margin: 0; font-family: var(--mono); }
.doc { padding: 36px 0 60px; min-width: 0; }
.doc h1 { font-size: clamp(32px, 4vw, 42px); margin: 0 0 14px; }
.doc h2 { font-size: 26px; margin: 48px 0 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.doc h2 a, .cmd h3 a { color: inherit; }
.doc h3 { font-size: 19px; margin: 28px 0 6px; }
.doc p, .doc li { color: #d9d1c9; }
.doc ul, .doc ol { padding-left: 22px; } .doc li { margin: 5px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14.5px; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.doc td code { white-space: normal; }
.toc { position: sticky; top: 61px; align-self: start; padding: 40px 0; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 61px); overflow-y: auto; }
.toc p { font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin: 0 0 8px; }
.toc a { color: var(--muted); font-size: 13.5px; padding: 3px 0; }
.toc a:hover { color: var(--lime); text-decoration: none; }
.callout { border: 1px solid var(--line2); border-left: 3px solid var(--lime); background: var(--bg2); padding: 12px 16px; border-radius: 8px; margin: 18px 0; color: #d9d1c9; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0; }
.cards a { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: var(--bg2); color: var(--muted); }
.cards a strong { color: var(--head); font-size: 17px; }
.cards a:hover { border-color: var(--lime); text-decoration: none; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); }
.pager a { border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; color: var(--head); }
.pager a:hover { border-color: var(--lime); text-decoration: none; }
.cmd { border-top: 1px dashed var(--line); padding: 4px 0 6px; }
.cmd h3 { font-family: var(--mono); color: var(--lime); }
.cmd .usage { font: 14px var(--mono); background: var(--bar); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; overflow-x: auto; white-space: pre; }
.cmd figure.code { margin: 12px 0; }
.filter { position: sticky; top: 61px; z-index: 2; background: var(--bg); padding: 10px 0; }
.filter input { width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg2); color: var(--text); font: 15px var(--sans); }
.menu-btn { display: none; }

@media (max-width: 1100px) { .docs { grid-template-columns: 220px minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 36px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .safety-cols { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .top nav a:not(.btn) { display: none; }
  .grid, .cards { grid-template-columns: minmax(0, 1fr); }
  .docs { grid-template-columns: 1fr; }
  .menu-btn { display: inline-block; margin-left: auto; color: var(--head); border: 1px solid var(--line2); border-radius: 8px; padding: 5px 12px; font-size: 14px; cursor: pointer; }
  .docs-top nav { margin-left: 0; }
  .side { display: none; position: fixed; inset: 61px 0 0 0; z-index: 9; background: var(--bg); height: auto; border: 0; padding: 16px; }
  #menu:checked + .docs .side { display: block; }
  .filter { top: 61px; }
}
