/* Arrow Studio Docs — 2026 redesign */
:root {
  --brand: #00d981;
  --brand-2: #5cf2b5;
  --brand-ink: #022b1a;
  --bg: #06090a;
  --bg-2: #0a0f10;
  --panel: rgba(255, 255, 255, .028);
  --panel-2: rgba(255, 255, 255, .05);
  --panel-solid: #0d1314;
  --line: rgba(255, 255, 255, .075);
  --line-2: rgba(255, 255, 255, .13);
  --text: #eef4f1;
  --text-2: #aab7b1;
  --text-3: #6d7a75;
  --code-bg: #070b0c;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .7);
  --glow: 0 0 0 1px rgba(0, 217, 129, .35), 0 12px 40px -12px rgba(0, 217, 129, .35);
  --radius: 18px;
  --radius-sm: 12px;
  --top: 64px;
  --side: 284px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Inter Tight", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", ui-monospace, "SFMono-Regular", Consolas, monospace;
  color-scheme: dark;
}
html.light {
  --bg: #f6f8f7;
  --bg-2: #eef2f0;
  --panel: rgba(10, 30, 20, .025);
  --panel-2: rgba(10, 30, 20, .05);
  --panel-solid: #ffffff;
  --line: rgba(10, 30, 20, .09);
  --line-2: rgba(10, 30, 20, .16);
  --text: #0b1512;
  --text-2: #45524d;
  --text-3: #7b8782;
  --code-bg: #0b1112;
  --brand: #00a862;
  --brand-2: #00c475;
  --shadow: 0 30px 70px -35px rgba(10, 40, 25, .35);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 24px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 15.5px/1.7 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
::selection { background: color-mix(in srgb, var(--brand) 35%, transparent); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
kbd {
  font: 600 11px/1 var(--mono); padding: 4px 6px; border-radius: 6px; color: var(--text-2);
  background: var(--panel-2); border: 1px solid var(--line); box-shadow: inset 0 -1px 0 var(--line);
}
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
.only-mobile { display: none !important; }

/* ---------- ambient background ---------- */
.aurora { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; animation: drift 26s var(--ease) infinite alternate; }
.aurora i:nth-child(1) { width: 620px; height: 620px; left: -160px; top: -260px; background: radial-gradient(circle, rgba(0, 217, 129, .22), transparent 65%); }
.aurora i:nth-child(2) { width: 520px; height: 520px; right: -120px; top: 20%; background: radial-gradient(circle, rgba(32, 160, 255, .12), transparent 65%); animation-delay: -8s; }
.aurora i:nth-child(3) { width: 560px; height: 560px; left: 35%; bottom: -320px; background: radial-gradient(circle, rgba(140, 90, 255, .10), transparent 65%); animation-delay: -16s; }
html.light .aurora i { opacity: .35; }
@keyframes drift { to { transform: translate3d(60px, 40px, 0) scale(1.08); } }

/* ---------- progress ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); box-shadow: 0 0 12px var(--brand); transition: width .1s linear; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--top); display: flex; align-items: center; gap: 18px; padding: 0 22px;
  background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; font-size: 18px; white-space: nowrap; }
.brand img { transition: transform .5s var(--ease); }
.brand:hover img { transform: rotate(-12deg) scale(1.08); }
.brand-name span { font-weight: 500; color: var(--text-2); }
.brand-tag { font: 700 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--brand); padding: 5px 7px; border-radius: 7px; background: color-mix(in srgb, var(--brand) 12%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); }
.search-trigger {
  flex: 0 1 440px; margin: 0 auto; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 14px; color: var(--text-3);
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; transition: border-color .25s, background .25s, box-shadow .25s;
}
.search-trigger:hover { border-color: var(--line-2); background: var(--panel-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 7%, transparent); }
.search-trigger span:not(.mod) { flex: 1; text-align: left; font-size: 14px; }
.search-trigger kbd { display: flex; gap: 3px; }
.top-links { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; }
.top-links a { padding: 8px 12px; border-radius: 10px; color: var(--text-2); transition: color .2s, background .2s; }
.top-links a:hover { color: var(--text); background: var(--panel-2); }
.top-links .pill { color: var(--brand-ink); background: var(--brand); font-weight: 700; }
.top-links .pill:hover { color: var(--brand-ink); background: var(--brand-2); }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); transition: background .2s, transform .2s, border-color .2s; }
.icon-btn:hover { background: var(--panel-2); border-color: var(--line-2); }
.icon-btn:active { transform: scale(.94); }
#theme-toggle .sun { display: none; }
html.light #theme-toggle .sun { display: block; }
html.light #theme-toggle .moon { display: none; }

/* ---------- layout ---------- */
.shell { position: relative; display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: calc(100vh - var(--top)); }
.sidebar {
  position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; overscroll-behavior: contain;
  padding: 22px 14px 18px 18px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.main { min-width: 0; outline: none; }
.view { max-width: 1240px; margin: 0 auto; padding: 40px 48px 20px; }

/* ---------- sidebar nav ---------- */
.nav-label { font: 700 10.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); padding: 14px 10px 8px; }
.nav-group { margin-bottom: 2px; }
.nav-head {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; border-radius: 10px;
  font-weight: 600; font-size: 14.5px; text-align: left; color: var(--text-2); transition: background .2s, color .2s;
}
.nav-head:hover { background: var(--panel-2); color: var(--text); }
.nav-head .dot { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; background: color-mix(in srgb, var(--accent, var(--brand)) 14%, transparent); color: var(--accent, var(--brand)); border: 1px solid color-mix(in srgb, var(--accent, var(--brand)) 26%, transparent); }
.nav-head .chev { margin-left: auto; width: 15px; height: 15px; color: var(--text-3); transition: transform .3s var(--ease); }
.nav-head[aria-expanded="true"] { color: var(--text); }
.nav-head[aria-expanded="true"] .chev { transform: rotate(90deg); }
.nav-items { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.nav-items > div { overflow: hidden; }
.nav-group.open .nav-items { grid-template-rows: 1fr; }
.nav-items .inner { position: relative; margin: 2px 0 8px 22px; padding-left: 12px; border-left: 1px solid var(--line); }
.nav-item {
  position: relative; display: block; padding: 6px 10px; margin: 1px 0; border-radius: 8px; font-size: 14px; color: var(--text-3);
  transition: color .2s, background .2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-item:hover { color: var(--text); background: var(--panel); }
.nav-item.active { color: var(--text); background: color-mix(in srgb, var(--accent, var(--brand)) 10%, transparent); font-weight: 600; }
.nav-item.active::before { content: ""; position: absolute; left: -13px; top: 7px; bottom: 7px; width: 2px; border-radius: 2px; background: var(--accent, var(--brand)); box-shadow: 0 0 10px var(--accent, var(--brand)); }
.nav-files summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; font-size: 13px; color: var(--text-3); }
.nav-files summary::-webkit-details-marker { display: none; }
.nav-files summary:hover { color: var(--text); background: var(--panel); }
.nav-files summary .count { margin-left: auto; font: 600 11px/1 var(--mono); padding: 3px 6px; border-radius: 6px; background: var(--panel-2); }
.nav-files summary svg { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.nav-files[open] summary svg { transform: rotate(90deg); }
.nav-files .nav-item { font: 12.5px/1.5 var(--mono); padding: 5px 10px; }
.help-card {
  margin-top: auto; display: grid; gap: 2px; padding: 16px; border-radius: 14px; font-size: 13.5px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 14%, transparent), transparent 70%), var(--panel);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line)); transition: transform .3s var(--ease), box-shadow .3s;
}
.help-card span { color: var(--brand); font-weight: 600; }
.help-card:hover { transform: translateY(-2px); box-shadow: var(--glow); }

/* ---------- page transitions ---------- */
.view.enter { animation: enter .55s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- home ---------- */
.hero { position: relative; padding: 70px 0 56px; text-align: center; }
.hero::before {
  content: ""; position: absolute; inset: -40px -48px 0; z-index: -1;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px; -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 30%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 60% 70% at 50% 30%, #000 20%, transparent 75%);
}
.hero-logo { width: 84px; height: 84px; margin: 0 auto 26px; display: grid; place-items: center; border-radius: 24px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line-2); box-shadow: 0 0 0 8px color-mix(in srgb, var(--brand) 5%, transparent), 0 20px 60px -20px color-mix(in srgb, var(--brand) 60%, transparent); animation: float 6s ease-in-out infinite; }
.hero-logo img { width: 44px; height: 44px; }
@keyframes float { 50% { transform: translateY(-6px); } }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 99px; font-size: 13px; color: var(--text-2); background: var(--panel); border: 1px solid var(--line); }
.hero-eyebrow b { font: 700 10.5px/1 var(--mono); letter-spacing: .1em; color: var(--brand-ink); background: var(--brand); padding: 4px 7px; border-radius: 99px; }
.hero h1 { font: 800 clamp(40px, 6.4vw, 74px)/1.02 var(--display); letter-spacing: -.045em; margin: 22px auto 18px; max-width: 900px; }
.hero h1 .grad { background: linear-gradient(100deg, var(--brand) 10%, var(--brand-2) 45%, #7fd3ff 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { max-width: 640px; margin: 0 auto; font-size: 18px; color: var(--text-2); }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 20px; border-radius: 13px; font-weight: 650; font-size: 15px; border: 1px solid var(--line-2); background: var(--panel); transition: transform .25s var(--ease), box-shadow .25s, background .25s; }
.btn:hover { transform: translateY(-2px); background: var(--panel-2); }
.btn.primary { color: var(--brand-ink); background: var(--brand); border-color: transparent; box-shadow: 0 10px 30px -10px var(--brand); }
.btn.primary:hover { background: var(--brand-2); box-shadow: 0 16px 40px -12px var(--brand); }
.btn kbd { background: rgba(0, 0, 0, .15); border-color: rgba(0, 0, 0, .15); color: inherit; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 54px auto 0; max-width: 820px; border-radius: var(--radius); overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.stats div { padding: 20px 16px; background: color-mix(in srgb, var(--bg) 85%, transparent); text-align: center; }
.stats strong { display: block; font: 800 30px/1.1 var(--display); letter-spacing: -.03em; }
.stats span { font-size: 13px; color: var(--text-3); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 70px 0 22px; }
.section-head h2 { margin: 0; font: 750 28px/1.2 var(--display); letter-spacing: -.03em; }
.section-head p { margin: 6px 0 0; color: var(--text-3); }
.plugins { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.plugin {
  --x: 50%; --y: 50%; position: relative; display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; isolation: isolate;
  background: var(--panel-solid); border: 1px solid var(--line); transition: transform .45s var(--ease), border-color .3s, box-shadow .45s var(--ease);
}
html:not(.light) .plugin { background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .015)); }
.plugin::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(420px circle at var(--x) var(--y), color-mix(in srgb, var(--accent) 16%, transparent), transparent 45%); }
.plugin:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--accent) 55%, transparent); }
.plugin:hover::after { opacity: 1; }
.plugin-cover { position: relative; aspect-ratio: 16 / 8.6; overflow: hidden; background: var(--bg-2); }
.plugin-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.plugin:hover .plugin-cover img { transform: scale(1.05); }
.plugin-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, color-mix(in srgb, var(--panel-solid) 92%, transparent)); }
html:not(.light) .plugin-cover::after { background: linear-gradient(180deg, transparent 40%, #0b1011 100%); }
.plugin-cover .ver { position: absolute; z-index: 1; top: 14px; right: 14px; font: 700 11.5px/1 var(--mono); padding: 6px 9px; border-radius: 99px; color: #fff; background: rgba(0, 0, 0, .45); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .18); }
.plugin-body { position: relative; z-index: 1; padding: 4px 22px 22px; margin-top: -26px; display: flex; flex-direction: column; flex: 1; }
.plugin-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; font-size: 20px; color: var(--accent); background: var(--panel-solid); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--accent) 60%, transparent); }
.plugin h3 { margin: 14px 0 4px; font: 750 21px/1.2 var(--display); letter-spacing: -.02em; }
.plugin p { margin: 0 0 18px; color: var(--text-2); font-size: 14.5px; }
.plugin-meta { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); }
.plugin-meta .chip { padding: 4px 9px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); }
.plugin-meta .go { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 650; font-size: 14px; }
.plugin-meta .go svg { transition: transform .3s var(--ease); }
.plugin:hover .go svg { transform: translateX(4px); }
.guides { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.guide { position: relative; padding: 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); transition: transform .35s var(--ease), border-color .3s, background .3s; }
.guide:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); background: var(--panel-2); }
.guide .n { font: 700 12px/1 var(--mono); color: var(--brand); }
.guide h4 { margin: 12px 0 6px; font-size: 16px; letter-spacing: -.01em; }
.guide p { margin: 0; font-size: 13.5px; color: var(--text-3); line-height: 1.55; }
.config-band { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); transition: border-color .3s, box-shadow .4s; }
.config-band:hover { border-color: color-mix(in srgb, #ff6b9a 40%, var(--line)); box-shadow: 0 30px 60px -35px rgba(255, 107, 154, .5); }
.config-band img { width: 100%; height: 100%; object-fit: cover; min-height: 240px; }
.config-band div { padding: 34px; display: flex; flex-direction: column; justify-content: center; }
.config-band h3 { margin: 10px 0 8px; font: 750 24px/1.2 var(--display); letter-spacing: -.02em; }
.config-band p { margin: 0 0 20px; color: var(--text-2); }
.tag { align-self: start; font: 700 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; padding: 5px 8px; border-radius: 7px; color: #ff8db0; background: rgba(255, 107, 154, .1); border: 1px solid rgba(255, 107, 154, .25); }

/* ---------- article ---------- */
.doc { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 56px; }
.doc.no-toc { grid-template-columns: minmax(0, 1fr); }
.article { min-width: 0; max-width: 820px; }
.doc.wide .article { max-width: none; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--text-3); }
.crumbs a:hover { color: var(--text); }
.crumbs svg { width: 13px; height: 13px; }
.crumbs .copy-link { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; font-size: 12.5px; color: var(--text-3); border-radius: 8px; border: 1px solid var(--line); background: var(--panel); transition: color .2s, border-color .2s; }
.crumbs .copy-link:hover { color: var(--text); border-color: var(--line-2); }
.crumbs .copy-link svg { width: 14px; height: 14px; }
.page-head { position: relative; margin: 22px 0 34px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.page-head .eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 700 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent, var(--brand)); }
.page-head .eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.page-head h1 { margin: 14px 0 12px; font: 800 clamp(32px, 4.4vw, 46px)/1.08 var(--display); letter-spacing: -.04em; }
.page-head .lead { margin: 0; font-size: 18.5px; line-height: 1.6; color: var(--text-2); max-width: 720px; }
.article section { margin: 0 0 40px; }
.article h2 { position: relative; margin: 46px 0 16px; font: 750 25px/1.25 var(--display); letter-spacing: -.025em; scroll-margin-top: calc(var(--top) + 24px); }
.article section:first-child > h2:first-child, .article > h2:first-child { margin-top: 0; }
.article h2 .anchor { position: absolute; left: -26px; top: 2px; opacity: 0; color: var(--text-3); font-weight: 500; transition: opacity .2s; }
.article h2:hover .anchor { opacity: 1; }
.article h3 { margin: 30px 0 10px; font: 700 19px/1.3 var(--display); letter-spacing: -.015em; }
.article p { margin: 0 0 16px; color: var(--text-2); }
.article li { color: var(--text-2); }
.article strong, .article b { color: var(--text); }
.article p a, .article li a, .article td a, .article section > a:not(.primary-link):not(.btn) {
  color: var(--brand); font-weight: 550; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .3s var(--ease);
}
.article p a:hover, .article li a:hover, .article td a:hover, .article section > a:not(.primary-link):hover { background-size: 100% 1px; }
.article ul { padding-left: 0; list-style: none; margin: 0 0 18px; }
.article ul li { position: relative; padding-left: 24px; margin: 8px 0; }
.article ul li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 6px; height: 6px; border-radius: 2px; transform: rotate(45deg); background: var(--accent, var(--brand)); opacity: .85; }
.article ol:not(.steps) { padding-left: 22px; }
.article ol:not(.steps) li { margin: 8px 0; padding-left: 4px; }
.article ol:not(.steps) li::marker { color: var(--accent, var(--brand)); font-weight: 700; }
.article code { font: 500 .86em/1.5 var(--mono); padding: .16em .45em; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); white-space: nowrap; }
.article img { border-radius: var(--radius); }
.article section > a > img, .article section > img, .article img[style] { border: 1px solid var(--line); cursor: zoom-in; transition: transform .5s var(--ease), box-shadow .5s; margin: 8px 0 16px; }
.article section > a > img:hover, .article img[style]:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* steps */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 8px 0 22px; position: relative; }
.steps li { counter-increment: s; position: relative; padding: 4px 0 18px 52px; margin: 0; color: var(--text-2); }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px;
  font: 700 13px/1 var(--mono); color: var(--accent, var(--brand)); background: color-mix(in srgb, var(--accent, var(--brand)) 10%, var(--panel)); border: 1px solid color-mix(in srgb, var(--accent, var(--brand)) 30%, var(--line));
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 15.5px; top: 36px; bottom: 2px; width: 1px; background: linear-gradient(var(--line-2), transparent); }

/* callouts */
.callout { display: flex; gap: 14px; margin: 22px 0; padding: 16px 18px; border-radius: 14px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent, var(--brand)) 9%, transparent), transparent 80%), var(--panel); border: 1px solid color-mix(in srgb, var(--accent, var(--brand)) 22%, var(--line)); }
.callout > span { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; font-size: 0; background: color-mix(in srgb, var(--accent, var(--brand)) 16%, transparent); }
.callout > span::before { content: "i"; font: 800 14px/1 var(--display); font-style: italic; color: var(--accent, var(--brand)); }
.callout > div { color: var(--text-2); font-size: 14.5px; padding-top: 2px; }

/* tables */
.table-wrap { margin: 16px 0 24px; overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table-wrap th { text-align: left; padding: 12px 16px; font: 700 11px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); background: var(--panel-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table-wrap td { padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--text-2); vertical-align: top; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap tbody tr { transition: background .2s; }
.table-wrap tbody tr:hover { background: var(--panel-2); }
.table-wrap td:first-child { font: 500 13px/1.6 var(--mono); color: var(--text); white-space: nowrap; }

/* code */
.code { position: relative; margin: 14px 0 22px; border-radius: 14px; background: var(--code-bg); border: 1px solid var(--line); overflow: hidden; }
.code pre { margin: 0; padding: 18px 20px; overflow-x: auto; }
.code code, .resource-code code { all: unset; font: 13px/1.7 var(--mono); color: #d7e7e0; white-space: pre; }
.code .copy, .copy-btn { position: absolute; top: 10px; right: 10px; padding: 5px 10px; font: 600 12px/1.2 var(--font); color: #cfe3da; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .06); opacity: 0; transition: opacity .2s, background .2s; }
.code:hover .copy, .code .copy:focus-visible { opacity: 1; }
.code .copy:hover { background: rgba(255, 255, 255, .12); }

/* quick actions & primary links */
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 26px; }
.quick-actions a, .primary-link {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 11px; font-size: 14px; font-weight: 600;
  border: 1px solid var(--line-2); background: var(--panel); transition: transform .25s var(--ease), background .25s, border-color .25s;
}
.quick-actions a:hover { transform: translateY(-2px); background: var(--panel-2); border-color: color-mix(in srgb, var(--accent, var(--brand)) 45%, var(--line)); }
.primary-link { color: var(--brand-ink) !important; background: var(--brand); border-color: transparent; box-shadow: 0 10px 30px -12px var(--brand); }
.primary-link:hover { transform: translateY(-2px); background: var(--brand-2); }

/* screenshots */
.game-shot { margin: 0 0 34px; position: relative; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); box-shadow: var(--shadow); cursor: zoom-in; }
.game-shot img { width: 100%; border-radius: 0; transition: transform .8s var(--ease); }
.game-shot:hover img { transform: scale(1.02); }
.game-shot figcaption { position: absolute; left: 14px; bottom: 14px; font-size: 12.5px; font-weight: 600; color: #fff; padding: 6px 11px; border-radius: 99px; background: rgba(0, 0, 0, .5); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .15); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin: 8px 0 30px; }
.gallery-tile { padding: 0; text-align: left; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); cursor: zoom-in; transition: transform .45s var(--ease), border-color .3s, box-shadow .45s var(--ease); }
.gallery-tile:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent, var(--brand)) 45%, var(--line)); box-shadow: 0 24px 50px -28px color-mix(in srgb, var(--accent, var(--brand)) 60%, transparent); }
.gallery-tile > div { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-2); }
.gallery-tile img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 0; transition: transform .8s var(--ease); }
.gallery-tile:hover img { transform: scale(1.05); }
.gallery-tile > span, .gallery-tile > strong { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 14px; font-size: 14px; }
.gallery-tile b, .gallery-tile > strong { font-weight: 650; color: var(--text); }
.gallery-tile small { font-size: 12.5px; color: var(--text-3); }

/* home stats from content (legacy) */
.docs-stats { display: none; }

/* resource files */
.resource-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; margin: 0 0 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.resource-intro strong { display: block; font: 750 20px/1.2 var(--display); }
.resource-intro span { font-size: 13px; color: var(--text-3); }
.file-filter, .code-find {
  width: 100%; height: 44px; padding: 0 14px 0 40px; border-radius: 12px; font: 14px var(--font); color: var(--text); outline: none;
  border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s;
  background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b8782' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 14px center / 16px no-repeat;
}
.file-filter:focus, .code-find:focus { border-color: color-mix(in srgb, var(--brand) 60%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 12%, transparent); }
.files-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin: 16px 0; }
.file-card { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .25s, background .25s; }
.file-card:hover { transform: translateY(-2px); background: var(--panel-2); border-color: color-mix(in srgb, var(--accent, var(--brand)) 40%, var(--line)); }
.file-card[hidden] { display: none; }
.file-icon { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; font: 700 12px/1 var(--mono); color: var(--accent, var(--brand)); background: color-mix(in srgb, var(--accent, var(--brand)) 11%, transparent); border: 1px solid color-mix(in srgb, var(--accent, var(--brand)) 25%, transparent); }
.file-card strong { display: block; font: 600 14px/1.4 var(--mono); color: var(--text); word-break: break-all; }
.file-card p { margin: 3px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-3); }
.file-card > span:last-child { margin-left: auto; color: var(--text-3); transition: transform .3s var(--ease), color .2s; }
.file-card:hover > span:last-child { transform: translate(2px, -2px); color: var(--accent, var(--brand)); }
.file-empty { color: var(--text-3); text-align: center; padding: 30px; }
.file-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: -12px 0 26px; }
.file-meta span { font: 600 12px/1 var(--mono); padding: 7px 10px; border-radius: 8px; color: var(--text-2); background: var(--panel); border: 1px solid var(--line); }
.file-meta span:first-child { color: var(--accent, var(--brand)); border-color: color-mix(in srgb, var(--accent, var(--brand)) 30%, var(--line)); }
.file-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; border-radius: 14px 14px 0 0; background: var(--panel-2); border: 1px solid var(--line); border-bottom: 0; }
.file-toolbar label { flex: 1 1 260px; display: flex; font-size: 0; }
.file-toolbar .code-find { height: 38px; }
.file-toolbar button, .file-toolbar a { height: 38px; display: inline-flex; align-items: center; padding: 0 13px; border-radius: 10px; font-size: 13px; font-weight: 600; border: 1px solid var(--line-2); background: var(--panel); transition: background .2s, border-color .2s; }
.file-toolbar button:hover, .file-toolbar a:hover { background: var(--panel-2); border-color: var(--text-3); }
.file-toolbar button[aria-pressed="true"] { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); }
.code-count { font: 12px var(--mono); color: var(--brand); }
.resource-code { max-height: 70vh; overflow: auto; border-radius: 0 0 14px 14px; background: var(--code-bg); border: 1px solid var(--line); scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
.resource-code pre { margin: 0; padding: 12px 0; }
.resource-code .code-line { display: block; padding: 0 20px 0 0; min-height: 1.7em; transition: background .15s; }
.resource-code .code-line::before { content: attr(data-line); display: inline-block; width: 52px; padding-right: 16px; margin-right: 16px; text-align: right; color: rgba(255, 255, 255, .22); border-right: 1px solid rgba(255, 255, 255, .06); user-select: none; }
.resource-code .code-line:hover { background: rgba(255, 255, 255, .03); }
.resource-code .code-line.match { background: rgba(0, 217, 129, .14); box-shadow: inset 2px 0 0 var(--brand); }
.resource-code.wrap code { white-space: pre-wrap; }
.resource-code .k { color: #7fe0b5; }
.resource-code .c { color: #5f716a; font-style: italic; }
.resource-code .s { color: #f5c97a; }
.resource-code .n { color: #8fc7ff; }

/* prev/next */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 56px 0 10px; padding-top: 30px; border-top: 1px solid var(--line); }
.pager a { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .25s, background .25s; }
.pager a:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent, var(--brand)) 45%, var(--line)); background: var(--panel-2); }
.pager small { font-size: 12px; color: var(--text-3); }
.pager strong { font-size: 15.5px; font-weight: 650; }
.pager .next { text-align: right; grid-column: 2; }

/* toc */
.toc { position: sticky; top: calc(var(--top) + 30px); align-self: start; max-height: calc(100vh - var(--top) - 60px); overflow-y: auto; font-size: 13.5px; }
.toc-title { font: 700 10.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; }
.toc nav { position: relative; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; color: var(--text-3); transition: color .2s; line-height: 1.45; }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--text); }
.toc .marker { position: absolute; left: -1px; width: 2px; border-radius: 2px; background: var(--accent, var(--brand)); box-shadow: 0 0 10px var(--accent, var(--brand)); transition: top .35s var(--ease), height .35s var(--ease); }
.toc-extra { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.toc-extra a { display: flex; align-items: center; gap: 8px; color: var(--text-3); }
.toc-extra a:hover { color: var(--text); }
.toc-extra svg { width: 15px; height: 15px; }

/* plugin banner on overview pages */
.plugin-banner { display: flex; align-items: center; gap: 16px; margin: 0 0 24px; padding: 14px 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.plugin-banner .plugin-icon { width: 42px; height: 42px; }
.plugin-banner div { display: flex; flex-direction: column; }
.plugin-banner strong { font-weight: 700; }
.plugin-banner span { font-size: 13px; color: var(--text-3); }
.plugin-banner .ver { margin-left: auto; font: 700 12px/1 var(--mono); padding: 7px 10px; border-radius: 99px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }

/* footer */
.footer { position: relative; z-index: 1; max-width: 1240px; margin: 30px auto 0; padding: 26px 48px 40px; display: flex; align-items: center; gap: 18px; font-size: 13.5px; color: var(--text-3); border-top: 1px solid var(--line); }
.footer-brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; }
.footer a { margin-left: auto; color: var(--brand); font-weight: 600; }

/* back to top */
.to-top { position: fixed; right: 24px; bottom: 24px; z-index: 40; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; border: 1px solid var(--line-2); background: color-mix(in srgb, var(--panel-solid) 85%, transparent); backdrop-filter: blur(10px); opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .3s, transform .4s var(--ease); }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- search palette ---------- */
dialog { color: var(--text); }
.palette { width: min(680px, calc(100vw - 24px)); max-height: min(620px, calc(100vh - 80px)); margin: 10vh auto auto; padding: 0; border-radius: 20px; border: 1px solid var(--line-2); background: color-mix(in srgb, var(--panel-solid) 94%, transparent); backdrop-filter: blur(24px); box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .8); overflow: hidden; }
html:not(.light) .palette { background: rgba(12, 17, 18, .94); }
.palette[open] { display: flex; flex-direction: column; animation: pop .3s var(--ease); }
.palette::backdrop, .viewer::backdrop { background: rgba(3, 6, 6, .6); backdrop-filter: blur(6px); animation: fade .3s; }
@keyframes pop { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
@keyframes fade { from { opacity: 0; } }
.palette-head { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); color: var(--text-3); }
.palette-head input { flex: 1; height: 62px; border: 0; outline: none; background: none; font: 17px var(--font); color: var(--text); }
.palette-head input::-webkit-search-cancel-button { display: none; }
.palette-results { flex: 1; overflow-y: auto; padding: 8px; scrollbar-width: thin; }
.palette-group { font: 700 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); padding: 14px 12px 8px; }
.result { display: flex; align-items: center; gap: 14px; padding: 11px 12px; border-radius: 12px; transition: background .15s; }
.result .ri { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--accent, var(--brand)); background: color-mix(in srgb, var(--accent, var(--brand)) 11%, transparent); border: 1px solid color-mix(in srgb, var(--accent, var(--brand)) 22%, transparent); font-size: 14px; }
.result .ri svg { width: 16px; height: 16px; }
.result div { min-width: 0; }
.result strong { display: block; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result p { margin: 1px 0 0; font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result mark { background: none; color: var(--brand); font-weight: 700; }
.result .enter { margin-left: auto; opacity: 0; color: var(--text-3); }
.result.sel { background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.result.sel .enter { opacity: 1; }
.palette-empty { padding: 40px 20px; text-align: center; color: var(--text-3); }
.palette-foot { display: flex; align-items: center; gap: 16px; padding: 10px 16px; font-size: 12px; color: var(--text-3); border-top: 1px solid var(--line); }
.palette-foot kbd { margin-right: 4px; }
.grow { flex: 1; }

/* ---------- image viewer ---------- */
.viewer { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; }
.viewer[open] { display: grid; grid-template-rows: auto 1fr; animation: fade .3s; }
.viewer-bar { display: flex; align-items: center; gap: 12px; padding: 14px 18px; color: #fff; font-size: 14px; }
.viewer-bar span { flex: 1; font-weight: 600; }
.viewer-bar a { padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 13px; color: #fff; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08); }
.viewer-bar .icon-btn { color: #fff; border-color: rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08); }
.viewer figure { margin: 0; padding: 0 80px 40px; display: grid; place-items: center; min-height: 0; overflow: auto; }
.viewer img { max-width: 100%; max-height: calc(100vh - 110px); border-radius: 14px; box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .8); animation: zoomin .4s var(--ease); }
@keyframes zoomin { from { opacity: 0; transform: scale(.96); } }
.viewer-nav { position: fixed; top: 50%; width: 48px; height: 48px; margin-top: -24px; display: grid; place-items: center; border-radius: 50%; color: #fff; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08); backdrop-filter: blur(8px); transition: background .2s, transform .2s; }
.viewer-nav:hover { background: rgba(255, 255, 255, .18); transform: scale(1.06); }
.viewer-nav.prev { left: 18px; }
.viewer-nav.next { right: 18px; }

/* toast */
#toast { position: fixed; left: 50%; bottom: 28px; z-index: 80; transform: translate(-50%, 20px); opacity: 0; padding: 10px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 600; color: var(--brand-ink); background: var(--brand); box-shadow: 0 14px 40px -12px var(--brand); transition: opacity .3s, transform .4s var(--ease); pointer-events: none; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* not found */
.notfound { text-align: center; padding: 100px 0; }
.notfound h1 { font: 800 64px/1 var(--display); letter-spacing: -.04em; margin: 0 0 10px; }
.notfound p { color: var(--text-2); margin: 0 0 26px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .doc { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .guides { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 920px) {
  :root { --top: 58px; }
  .only-mobile { display: grid !important; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 55; top: var(--top); left: 0; width: min(320px, 86vw); background: var(--bg); transform: translateX(-102%); transition: transform .4s var(--ease); box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  #scrim { position: fixed; inset: var(--top) 0 0; z-index: 54; background: rgba(0, 0, 0, .5); backdrop-filter: blur(3px); }
  .view { padding: 28px 20px 10px; }
  .footer { padding: 24px 20px 34px; flex-wrap: wrap; }
  .top-links a:not(.pill) { display: none; }
  .search-trigger { flex: 1; }
  .search-trigger kbd, .brand-name { display: none; }
  .search-trigger span:not(.mod) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand-tag { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .config-band { grid-template-columns: 1fr; }
  .article h2 .anchor { display: none; }
  .viewer figure { padding: 0 12px 30px; }
  .viewer-nav { display: none; }
}
@media (max-width: 560px) {
  .guides { grid-template-columns: 1fr; }
  .plugins { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
  .hero { padding-top: 40px; }
  .resource-intro { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
