
:root {
  color-scheme: light;
  --accent: #F2A93B;
  --accent-hover: #F6B754;
  --accent-pressed: #D98F1E;
  --on-accent: #1d1305;
  --page: #fcfbf8;
  --canvas: #f4f2ed;
  --inset: #ffffff;
  --surface: #ffffff;
  --chrome: #f4f2ed;
  --tab-active: #ffffff;
  --text: #1d1c1a;
  --muted: #5d5a54;
  --text3: #8f8b83;
  --line: #e6e3dc;
  --guide: #ebe8e1;
  --hover: rgba(60, 50, 30, .055);
  --press: rgba(60, 50, 30, .10);
  --fill: rgba(60, 50, 30, .06);
  --glass: rgba(252, 251, 248, .80);
  --glass-edge: rgba(60, 50, 30, .10);
  --glass-spec: rgba(255, 255, 255, .90);
  --accent-ink: #9a5c07;
  --accent-soft: rgba(242, 169, 59, .18);
  --accent-edge: rgba(242, 169, 59, .50);
  --added: #2f9e44;
  --modified: #2f7fd6;
  --deleted: #d9443a;
  --warning: #b26a00;
  --shadow-card: 0 1px 3px rgba(30, 24, 14, .07), 0 1px 2px rgba(30, 24, 14, .04);
  --shadow-lift: 0 22px 56px rgba(30, 24, 14, .14), 0 4px 14px rgba(30, 24, 14, .07);
  --nav-shadow: 0 4px 20px rgba(30, 24, 14, .06);
  --aura-a: rgba(242, 169, 59, .18);
  --aura-b: rgba(234, 88, 12, .08);
  --aura-c: rgba(154, 92, 7, .07);

  /* Demo workbench defaults (Light palette from internal/theme/theme.go) */
  --w-base: #fcfbf8;
  --w-chrome: #f4f2ed;
  --w-elev: #ffffff;
  --w-line: #e6e3dc;
  --w-text: #1d1c1a;
  --w-text2: #5d5a54;
  --w-text3: #8f8b83;
  --w-accent: #F2A93B;
  --w-accent-text: #9a5c07;
  --w-kw: #b5650b;
  --w-fn: #1f6fd1;
  --w-ty: #0e8a7e;
  --w-str: #3c7f2a;
  --w-num: #c2412d;
  --w-cm: #8a8d93;

  /* Radii & Spacing from internal/theme/theme.go */
  --r-xs: 3px;
  --r-small: 5px;
  --r-control: 7px;
  --r-card: 12px;
  --r-sheet: 16px;
  --r-capsule: 999px;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px;
  --s8: 32px; --s10: 40px; --s12: 48px; --s16: 64px; --s20: 80px; --s24: 96px;

  --gutter: 16px;
  --max: 1200px;
  --nav-h: 60px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.22, 1, .36, 1);

  --latin: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI";
  --tail: system-ui, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font: var(--latin), Ubuntu, Cantarell, var(--tail);
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, "Cascadia Code", Consolas, monospace;
  --lh: 1.6;
  --lh-head: 1.1;
  --track-head: -0.024em;
  --track-title: -0.036em;
  --w-head: 700;
}
:root:lang(zh-Hans) {
  --font: var(--latin), "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Source Han Sans SC", "Noto Sans CJK SC", var(--tail);
}
:root:lang(zh-Hant) {
  --font: var(--latin), "PingFang TC", "PingFang HK", "Microsoft JhengHei UI", "Source Han Sans TC", "Noto Sans CJK TC", var(--tail);
}
:root:is(:lang(zh-Hans), :lang(zh-Hant)) {
  --lh: 1.75;
  --lh-head: 1.26;
  --track-head: 0;
  --track-title: -0.012em;
  --w-head: 650;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  color-scheme: dark;
  --page: #0f1012;
  --canvas: #141517;
  --inset: #1d1f22;
  --surface: #24272c;
  --chrome: #0f1012;
  --tab-active: #272a30;
  --text: #e5e3de;
  --muted: #a4a19a;
  --text3: #6f6c66;
  --line: #25282c;
  --guide: #212428;
  --hover: rgba(255, 255, 255, .055);
  --press: rgba(255, 255, 255, .10);
  --fill: rgba(255, 255, 255, .065);
  --glass: rgba(24, 26, 30, .78);
  --glass-edge: rgba(255, 255, 255, .09);
  --glass-spec: rgba(255, 255, 255, .11);
  --accent-ink: #f5b957;
  --accent-soft: rgba(242, 169, 59, .18);
  --accent-edge: rgba(242, 169, 59, .48);
  --added: #4cbb5c;
  --modified: #5a9ff0;
  --deleted: #ef5f55;
  --warning: #f0b24a;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, .42);
  --shadow-lift: 0 24px 60px rgba(0, 0, 0, .58), 0 4px 14px rgba(0, 0, 0, .35);
  --nav-shadow: 0 6px 24px rgba(0, 0, 0, .34);
  --aura-a: rgba(242, 169, 59, .18);
  --aura-b: rgba(245, 138, 84, .10);
  --aura-c: rgba(90, 159, 240, .09);

  /* Demo workbench defaults (Dark palette from internal/theme/theme.go) */
  --w-base: #141517;
  --w-chrome: #0f1012;
  --w-elev: #1d1f22;
  --w-line: #25282c;
  --w-text: #e5e3de;
  --w-text2: #a4a19a;
  --w-text3: #6f6c66;
  --w-accent: #F2A93B;
  --w-accent-text: #f5b957;
  --w-kw: #f0a848;
  --w-fn: #7cb7ff;
  --w-ty: #5fd0c0;
  --w-str: #a5d68a;
  --w-num: #f38b7a;
  --w-cm: #6b6e75;

  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0f1012;
  --canvas: #141517;
  --inset: #1d1f22;
  --surface: #24272c;
  --chrome: #0f1012;
  --tab-active: #272a30;
  --text: #e5e3de;
  --muted: #a4a19a;
  --text3: #6f6c66;
  --line: #25282c;
  --guide: #212428;
  --hover: rgba(255, 255, 255, .055);
  --press: rgba(255, 255, 255, .10);
  --fill: rgba(255, 255, 255, .065);
  --glass: rgba(24, 26, 30, .78);
  --glass-edge: rgba(255, 255, 255, .09);
  --glass-spec: rgba(255, 255, 255, .11);
  --accent-ink: #f5b957;
  --accent-soft: rgba(242, 169, 59, .18);
  --accent-edge: rgba(242, 169, 59, .48);
  --added: #4cbb5c;
  --modified: #5a9ff0;
  --deleted: #ef5f55;
  --warning: #f0b24a;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, .42);
  --shadow-lift: 0 24px 60px rgba(0, 0, 0, .58), 0 4px 14px rgba(0, 0, 0, .35);
  --nav-shadow: 0 6px 24px rgba(0, 0, 0, .34);
  --aura-a: rgba(242, 169, 59, .18);
  --aura-b: rgba(245, 138, 84, .10);
  --aura-c: rgba(90, 159, 240, .09);

  /* Demo workbench defaults (Dark palette from internal/theme/theme.go) */
  --w-base: #141517;
  --w-chrome: #0f1012;
  --w-elev: #1d1f22;
  --w-line: #25282c;
  --w-text: #e5e3de;
  --w-text2: #a4a19a;
  --w-text3: #6f6c66;
  --w-accent: #F2A93B;
  --w-accent-text: #f5b957;
  --w-kw: #f0a848;
  --w-fn: #7cb7ff;
  --w-ty: #5fd0c0;
  --w-str: #a5d68a;
  --w-num: #f38b7a;
  --w-cm: #6b6e75;

}
@media (min-width: 720px) { :root { --gutter: 24px; --nav-h: 64px; } }

/* ---------------------------------------------------------------- boot veil */

.boot-veil {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  place-items: center;
  background: var(--canvas);
  opacity: 1;
  transition: opacity .42s var(--spring), transform .42s var(--spring);
}
html.booting .boot-veil { display: grid; }
html.boot-done .boot-veil { opacity: 0; transform: scale(1.03); pointer-events: none; }
.boot-card {
  display: grid; justify-items: center; gap: var(--s3);
  padding: var(--s8);
  animation: bootPop .4s var(--spring) both;
}
@keyframes bootPop { from { opacity: 0; transform: translateY(10px) scale(.95); } }
.boot-mark { position: relative; display: grid; place-items: center; width: 88px; height: 88px; }
.boot-mark img { border-radius: 15px; box-shadow: 0 10px 28px rgba(242, 169, 59, .32); }
.boot-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.boot-track { stroke: var(--line); }
.boot-arc {
  stroke: var(--accent);
  stroke-dasharray: 252;
  stroke-dashoffset: 184;
  transform-origin: center;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.boot-name { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.boot-bar { width: 148px; height: 3px; border-radius: var(--r-capsule); background: var(--fill); overflow: hidden; }
.boot-bar i {
  display: block; width: 45%; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #f8cb7a);
  animation: bootSlide .85s var(--ease) infinite;
}
@keyframes bootSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
.boot-status { font-size: 12px; color: var(--muted); }

/* ---------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + var(--s4));
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: var(--lh);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3 {
  margin: 0;
  font-weight: var(--w-head);
  line-height: var(--lh-head);
  letter-spacing: var(--track-head);
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .2em; }
img { max-width: 100%; height: auto; }
code, pre, .mono { font-family: var(--mono); font-size: .92em; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-small); }
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.fi { width: 15px; height: 15px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip {
  position: fixed; left: var(--s4); top: -100px; z-index: 100;
  padding: var(--s2) var(--s4); border-radius: var(--r-capsule);
  background: var(--accent); color: var(--on-accent); font-weight: 600;
}
.skip:focus { top: var(--s3); }
.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.narrow { max-width: calc(880px + 2 * var(--gutter)); }

/* ---------------------------------------------------------------- controls */

.btn {
  --h: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: var(--h);
  padding: 0 var(--s5);
  border: 0; border-radius: var(--r-capsule);
  font-size: 15px; font-weight: 600; line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none !important;
  transition: background-color .18s, color .18s, box-shadow .22s var(--ease), transform .18s var(--spring);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn-sm { --h: 32px; padding: 0 var(--s4); font-size: 14px; }
.btn-lg { --h: 48px; padding: 0 var(--s6); font-size: 16px; }
.btn-primary {
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 3px 14px rgba(242, 169, 59, .32), inset 0 1px 0 rgba(255, 255, 255, .36);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 8px 26px rgba(242, 169, 59, .44), inset 0 1px 0 rgba(255, 255, 255, .42);
}
.btn-primary:active { background: var(--accent-pressed); }
.btn-quiet {
  background: var(--glass); color: var(--text);
  box-shadow: inset 0 0 0 .5px var(--glass-edge), var(--shadow-card);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.btn-quiet:hover { background: var(--inset); box-shadow: inset 0 0 0 .5px var(--accent-edge), var(--shadow-card); }
.btn-cta-dark {
  background: #141517; color: #f5b957;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.btn-cta-dark:hover { background: #1e2024; color: #ffcf7d; }
.btn-ghost { background: rgba(20, 21, 23, .14); color: #1d1305; box-shadow: inset 0 0 0 1.2px rgba(29, 19, 5, .28); }
.btn-ghost:hover { background: rgba(20, 21, 23, .22); }
.btn .size { font-weight: 500; opacity: .75; font-size: .88em; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s1);
  min-width: 36px; height: 36px; padding: 0 var(--s2);
  border: 0; border-radius: var(--r-control);
  background: transparent; color: var(--muted);
  cursor: pointer; list-style: none;
  transition: background-color .15s, color .15s, transform .15s var(--ease);
}
.icon-btn::-webkit-details-marker { display: none; }
.icon-btn:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.icon-btn:active { background: var(--press); transform: scale(.96); }
.icon-btn .i { width: 19px; height: 19px; }

/* Segmented control with sliding pill */
.seg {
  position: relative;
  display: inline-flex; gap: 2px; padding: 3px;
  border-radius: var(--r-capsule);
  background: var(--fill);
  box-shadow: inset 0 0 0 .5px var(--line);
}
.seg.has-pill::before {
  content: "";
  position: absolute; top: 3px; bottom: 3px; left: 0;
  width: var(--pw, 0px);
  transform: translateX(var(--px, 0px));
  border-radius: var(--r-capsule);
  background: var(--tab-active);
  box-shadow: var(--shadow-card), inset 0 .5px 0 var(--glass-spec), inset 0 0 0 .5px var(--glass-edge);
  transition: transform .32s var(--spring), width .32s var(--spring);
  pointer-events: none; z-index: 0;
}
.seg > * {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  position: relative; z-index: 1;
  min-height: 30px; padding: 0 var(--s3);
  border: 0; border-radius: var(--r-capsule);
  background: transparent; color: var(--muted);
  font-size: 14px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: color .2s;
}
.seg > *:hover { color: var(--text); text-decoration: none; }
.seg:not(.has-pill) > [aria-checked="true"],
.seg:not(.has-pill) > [aria-selected="true"],
.seg:not(.has-pill) > [aria-current] {
  background: var(--tab-active); color: var(--text);
  box-shadow: var(--shadow-card), inset 0 0 0 .5px var(--glass-edge);
}
.seg.has-pill > [aria-checked="true"],
.seg.has-pill > [aria-selected="true"],
.seg.has-pill > [aria-current] { color: var(--text); }
.seg-lg > * { min-height: 36px; padding: 0 var(--s4); font-size: 15px; }
.theme-switch > * { padding: 0; width: 30px; }
.theme-switch .i { width: 15px; height: 15px; }

.card {
  background: var(--inset);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card), inset 0 .5px 0 var(--glass-spec), inset 0 0 0 .5px var(--glass-edge);
}
.spot { position: relative; overflow: hidden; }
.spot::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  opacity: 0; transition: opacity .35s var(--ease);
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), var(--accent-soft), transparent 68%);
}
.spot:hover::before { opacity: 1; }

.pill {
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: var(--s1) var(--s3) var(--s1) var(--s2);
  border-radius: var(--r-capsule);
  background: var(--glass);
  -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
  box-shadow: inset 0 .5px 0 var(--glass-spec), inset 0 0 0 1px var(--glass-edge), var(--shadow-card);
  color: var(--text); font-size: 14px;
  text-decoration: none !important;
  transition: background-color .2s, box-shadow .2s, transform .2s var(--spring);
}
.pill:hover { background: var(--inset); box-shadow: inset 0 0 0 1px var(--accent-edge), var(--shadow-card); transform: translateY(-1px); }
.pill .i { color: var(--muted); transition: transform .2s var(--spring); }
.pill:hover .i { transform: translateX(2px); color: var(--accent); }
.pill-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  animation: pulseDot 2.2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 2px rgba(242, 169, 59, .30); }
  50% { box-shadow: 0 0 0 6px rgba(242, 169, 59, .08); }
}
.pill-tag {
  padding: 2px var(--s3); border-radius: var(--r-capsule);
  background: var(--accent-soft); color: var(--accent-ink);
  font-weight: 600; font-size: 13px;
}

/* ---------------------------------------------------------------- nav */

.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--nav-h); }
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--canvas) 74%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 .5px 0 var(--glass-edge), var(--nav-shadow);
  opacity: var(--nav-glass, 0); pointer-events: none;
}
.nav:not(.scrolled)::before { opacity: 0; visibility: hidden; }
.nav-progress {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 2px;
  background: linear-gradient(90deg, var(--accent), #f58a54);
  transform-origin: left center; transform: scaleX(var(--scroll-p, 0));
  opacity: calc(var(--nav-glass, 0) * .9); pointer-events: none;
}
.nav-in { position: relative; z-index: 1; display: flex; align-items: center; gap: var(--s4); height: 100%; }
.brand {
  display: inline-flex; align-items: center; gap: var(--s2);
  color: var(--text); font-weight: 700; font-size: 17px; letter-spacing: -0.015em;
  text-decoration: none !important;
}
.brand img { border-radius: 7px; transition: transform .25s var(--spring); }
.brand:hover img { transform: scale(1.07) rotate(-3deg); }
.nav-links { display: none; gap: var(--s1); margin-inline-start: var(--s4); }
.nav-links a {
  padding: var(--s2) var(--s3); border-radius: var(--r-capsule);
  color: color-mix(in srgb, var(--text) 76%, transparent); font-size: 14px; font-weight: 500;
  text-decoration: none; transition: color .18s, background-color .18s;
}
.nav-links a:hover, .nav-links a[aria-current], .nav-links a.spy { color: var(--text); background: var(--hover); }
.nav-links a.spy { color: var(--accent-ink); background: var(--accent-soft); }
.nav-tools { display: flex; align-items: center; gap: var(--s1); margin-inline-start: auto; }
.nav-tools > .theme-switch, .nav-tools > .lang-nav { display: none; }
.nav-cta { display: none; margin-inline-start: var(--s2); }
@media (min-width: 640px) { .nav-cta { display: inline-flex; } }
@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .nav-tools > .theme-switch, .nav-tools > .lang-nav { display: inline-flex; }
  .nav-tools > .menu { display: none; }
}

.lang { position: relative; }
.lang summary { color: color-mix(in srgb, var(--text) 76%, transparent); font-size: 14px; font-weight: 500; }
.lang summary .i:last-child { width: 14px; height: 14px; transition: transform .2s; }
.lang[open] summary .i:last-child { transform: rotate(180deg); }
.lang-cur { display: none; }
@media (min-width: 1200px) { .lang-cur { display: inline; } }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + var(--s2));
  min-width: 170px; margin: 0; padding: var(--s1); list-style: none;
  background: color-mix(in srgb, var(--inset) 88%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-lift), inset 0 0 0 .5px var(--glass-edge);
  animation: pop .18s var(--ease);
}
.menu-pop a {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  padding: var(--s2) var(--s3); border-radius: var(--r-small);
  color: var(--text); font-size: 14px; text-decoration: none;
}
.menu-pop a:hover { background: var(--hover); }
.menu-pop a[aria-current] { color: var(--accent-ink); font-weight: 600; }
.menu-pop .i { width: 15px; height: 15px; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

.menu summary .i:last-child { display: none; }
.menu[open] summary .i:first-child { display: none; }
.menu[open] summary .i:last-child { display: block; }
.menu-panel {
  position: fixed; left: var(--s2); right: var(--s2); top: calc(var(--nav-h) + var(--s1));
  max-height: calc(100dvh - var(--nav-h) - var(--s4)); overflow: auto;
  padding: var(--s3);
  background: color-mix(in srgb, var(--inset) 90%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px);
  border-radius: var(--r-sheet);
  box-shadow: var(--shadow-lift), inset 0 0 0 .5px var(--glass-edge);
  animation: pop .2s var(--ease);
}
.menu-panel nav { display: grid; }
.menu-panel nav a { padding: var(--s3); border-radius: var(--r-control); color: var(--text); font-size: 17px; font-weight: 500; text-decoration: none; }
.menu-panel nav a:hover { background: var(--hover); }
.menu-row { display: flex; justify-content: center; padding: var(--s3) 0; border-top: .5px solid var(--line); margin-top: var(--s2); }
.menu-row .theme-switch > * { width: auto; padding: 0 var(--s4); }
.menu-langs { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s1); padding-top: var(--s3); border-top: .5px solid var(--line); }
.menu-langs a { padding: var(--s1) var(--s3); border-radius: var(--r-capsule); color: var(--muted); font-size: 14px; }
.menu-langs a[aria-current] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(38px, 7vw, 84px));
  overflow: clip;
  isolation: isolate;
}
.hero-field {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 72%, transparent 100%);
}
.hero-aura {
  position: absolute; inset: -120px 0 auto; height: 780px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(640px 380px at 50% 18%, var(--aura-a), transparent 70%),
    radial-gradient(480px 360px at 22% 42%, var(--aura-b), transparent 72%),
    radial-gradient(500px 380px at 78% 40%, var(--aura-c), transparent 72%);
  filter: blur(22px);
}
.hero-in { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-title {
  margin-top: 0;
  font-size: clamp(36px, 6.8vw, 76px);
  letter-spacing: var(--track-title);
  line-height: 1.06;
}
:root:is(:lang(zh-Hans), :lang(zh-Hant)) .hero-title { font-size: clamp(32px, 5.8vw, 66px); line-height: 1.22; }
.hero-title span { display: block; }
.hero-title span:last-child {
  background: linear-gradient(110deg, #F2A93B 0%, #f58a54 55%, var(--accent-ink) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-origin {
  margin-top: var(--s4);
  font-size: clamp(14.5px, 1.6vw, 16.5px);
  color: var(--accent-ink);
  opacity: .92;
}
.hero-origin em { font-style: italic; }
.hero-lead { max-width: 700px; margin-top: var(--s4); color: var(--muted); font-size: clamp(16px, 2vw, 19.5px); }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s3); margin-top: var(--s8); }
.hero-note { margin-top: var(--s4); color: var(--muted); font-size: 13px; }
.dl-meta:not(:empty)::after { content: " · "; }
.demo-wrap { margin-top: clamp(34px, 5.5vw, 60px); padding-bottom: clamp(40px, 6vw, 72px); }

/* ---------------------------------------------------------------- interactive Huncrow workbench demo */

.demo { --tilt: 0; --win-h: 620px; width: 100%; perspective: 2200px; }
@media (min-width: 1080px) { .demo { --win-h: 650px; } }
@media (max-width: 759px) { .demo { --win-h: 620px; } }
.demo [hidden] { display: none !important; }
.win {
  position: relative;
  display: flex; flex-direction: column;
  width: 100%; height: var(--win-h);
  border-radius: var(--r-sheet);
  background: var(--w-base);
  color: var(--w-text);
  border: 1px solid var(--w-line);
  box-shadow:
    var(--shadow-lift),
    0 32px 90px -24px rgba(242, 169, 59, .24),
    inset 0 1px 0 rgba(255, 255, 255, .07);
  overflow: hidden;
  font-size: 13px; line-height: 1.45;
  text-align: start;
  transform: rotateX(calc(var(--tilt) * 10deg)) scale(calc(1 - var(--tilt) * .03));
  transform-origin: 50% 0;
  transition: background-color .28s var(--ease), color .28s var(--ease), border-color .28s var(--ease);
}

.wbtn {
  display: inline-grid; place-items: center; flex: none;
  width: 26px; height: 26px; padding: 0;
  border: 0; border-radius: var(--r-small);
  background: transparent; color: var(--w-text2);
  cursor: pointer; transition: background-color .14s, color .14s, transform .14s;
}
.wbtn-xs { width: 22px; height: 22px; }
.wbtn .i { width: 15px; height: 15px; vertical-align: 0; }
.wbtn-xs .i { width: 13.5px; height: 13.5px; }
.wbtn:hover { background: var(--hover); color: var(--w-text); }
.wbtn.on { color: var(--w-accent-text); }

/* Title Bar (40px, internal/app/titlebar.go) */
.win-bar {
  position: relative; z-index: 8;
  display: flex; align-items: center; gap: 8px; flex: none;
  height: 40px; padding: 0 12px;
  background: var(--w-chrome);
  border-bottom: 1px solid var(--w-line);
}
.win-lead { display: flex; align-items: center; gap: 4px; flex: none; min-width: 0; }
.lights { display: flex; gap: 7px; margin-inline-end: 8px; }
.lights i { width: 11.5px; height: 11.5px; border-radius: 50%; background: #FF5F57; }
.lights i:nth-child(2) { background: #FEBC2E; }
.lights i:nth-child(3) { background: #28C840; }
.switcher {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 7px; border: 0; border-radius: var(--r-small);
  background: transparent; color: var(--w-text);
  font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background-color .14s;
}
.switcher:hover { background: var(--hover); }
.switcher img { border-radius: 3.5px; }
.switcher .i { width: 13px; height: 13px; color: var(--w-text3); }
.bar-sep { color: var(--w-text3); font-size: 12px; }
.dirty-star { color: var(--w-accent-text); font-weight: 700; margin-inline-start: 1px; }
.branch-wrap { position: relative; }
.win-pop {
  position: absolute; top: calc(100% + 5px); left: 0; z-index: 25;
  min-width: 185px; padding: 4px; border-radius: 9px;
  background: var(--w-elev); border: 1px solid var(--w-line);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .28);
  animation: pop .15s var(--ease);
}
.pop-row {
  display: flex; align-items: center; gap: 7px; width: 100%;
  padding: 6px 8px; border: 0; border-radius: var(--r-small);
  background: transparent; color: var(--w-text); font-size: 12.5px;
  text-align: start; cursor: pointer;
}
.pop-row:hover { background: var(--hover); }
.pop-row .i { width: 13.5px; height: 13.5px; color: var(--w-text3); }
.pop-row.on { color: var(--w-accent-text); font-weight: 600; }
.pop-row.on .i:last-child { margin-inline-start: auto; color: var(--w-accent-text); }

.win-center-bar { flex: 1; display: flex; justify-content: center; min-width: 0; padding: 0 8px; }
.omnibar-btn {
  display: flex; align-items: center; gap: 7px;
  width: 100%; max-width: 390px; height: 26px; padding: 0 6px 0 10px;
  border: 1px solid var(--w-line); border-radius: var(--r-control);
  background: var(--w-base); color: var(--w-text3);
  font-size: 12px; cursor: pointer; transition: border-color .15s, background-color .15s;
}
.omnibar-btn:hover { border-color: var(--w-accent); color: var(--w-text2); }
.omnibar-btn .i { width: 13.5px; height: 13.5px; }
.omnibar-btn span { flex: 1; text-align: start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.omnibar-btn kbd {
  padding: 1px 5px; border-radius: 4px;
  background: var(--w-chrome); border: 1px solid var(--w-line);
  font-family: var(--mono); font-size: 10.5px; color: var(--w-text2);
}
.win-actions { display: flex; align-items: center; gap: 3px; flex: none; }
@media (max-width: 680px) {
  .lights, .bar-sep, .branch-wrap { display: none; }
  .win-center-bar { padding: 0 4px; }
}

/* Omnibar Overlay */
.omni-overlay {
  position: absolute; inset: 0; z-index: 30;
  display: flex; justify-content: center; align-items: flex-start;
  padding-top: 46px;
  background: rgba(0, 0, 0, .28);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.omni-box {
  width: min(500px, calc(100% - 24px));
  border-radius: 10px; overflow: hidden;
  background: var(--w-elev); border: 1px solid var(--w-line);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .38);
  animation: pop .16s var(--spring);
}
.omni-input-row {
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 12px; border-bottom: 1px solid var(--w-line);
  color: var(--w-text3);
}
.omni-input-row input {
  flex: 1; min-width: 0; border: 0; outline: 0;
  background: transparent; color: var(--w-text); font: inherit; font-size: 13.5px;
}
.omni-input-row kbd {
  padding: 1px 6px; border-radius: 4px; background: var(--w-chrome);
  border: 1px solid var(--w-line); font-family: var(--mono); font-size: 10.5px; color: var(--w-text2);
}
.omni-prefixes {
  display: flex; gap: 4px; padding: 6px 10px;
  border-bottom: 1px solid var(--w-line); background: var(--w-chrome);
}
.omni-prefixes button {
  padding: 2px 8px; border: 1px solid var(--w-line); border-radius: var(--r-capsule);
  background: var(--w-base); color: var(--w-text2); font-size: 11px; font-family: var(--mono);
  cursor: pointer; transition: border-color .14s, color .14s;
}
.omni-prefixes button:hover, .omni-prefixes button.on {
  border-color: var(--w-accent); color: var(--w-accent-text);
}
.omni-list {
  margin: 0; padding: 6px; list-style: none;
  max-height: 240px; overflow-y: auto; display: grid; gap: 2px;
}
.omni-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 9px;
  border-radius: var(--r-small); cursor: pointer; font-size: 12.5px; color: var(--w-text);
}
.omni-row:hover, .omni-row.sel { background: color-mix(in srgb, var(--w-accent) 18%, transparent); }
.omni-row .omni-detail { margin-inline-start: auto; font-size: 11px; color: var(--w-text3); font-family: var(--mono); }
.omni-foot {
  padding: 6px 12px; border-top: 1px solid var(--w-line);
  background: var(--w-chrome); color: var(--w-text3); font-size: 11px;
}

/* Workbench Body */
.win-body { display: flex; flex: 1 1 0; min-height: 0; overflow: hidden; }

/* Activity Rail (36px, Huncrow design rule: active icon highlighted in accent, no background fill) */
.win-rail {
  display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none;
  width: 38px; padding: 8px 0;
  background: var(--w-chrome); border-right: 1px solid var(--w-line);
}
.rail-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--r-small);
  background: transparent; color: var(--w-text3); cursor: pointer;
  transition: color .15s, background-color .15s;
}
.rail-btn .i { width: 16px; height: 16px; }
.rail-btn:hover { background: var(--hover); color: var(--w-text); }
.rail-btn.on { color: var(--w-accent-text); }
.rail-btn.on::before {
  content: ""; position: absolute; left: -5px; top: 6px; bottom: 6px;
  width: 2.5px; border-radius: 2px; background: var(--w-accent);
}
.rail-badge {
  position: absolute; top: 1px; right: 0; min-width: 13px; height: 13px; padding: 0 3px;
  border-radius: var(--r-capsule); background: var(--w-accent); color: #1d1305;
  font-size: 9px; font-weight: 700; display: inline-grid; place-items: center; line-height: 1;
}
.rail-spacer { flex: 1; }

/* Left Sidebar */
.win-side {
  display: flex; flex-direction: column; flex: none;
  width: 224px; min-height: 0;
  background: var(--w-base); border-right: 1px solid var(--w-line);
  overflow: hidden;
}
@media (max-width: 820px) {
  .win-side { width: 184px; }
}
@media (max-width: 620px) {
  .win-side { display: none; }
  .win.side-open .win-side {
    display: flex; position: absolute; left: 38px; top: 40px; bottom: 26px; z-index: 20;
    width: 230px; box-shadow: 12px 0 36px rgba(0, 0, 0, .35);
  }
}
.side-pane { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.side-head {
  display: flex; align-items: center; justify-content: space-between; flex: none;
  height: 36px; padding: 0 8px 0 12px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--w-text2);
  border-bottom: 1px solid var(--w-line);
}
.side-note { padding: 8px 12px 4px; font-size: 11.5px; color: var(--w-text3); }
.side-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; scrollbar-width: thin; }

.tree-item {
  display: flex; align-items: center; gap: 6px; width: 100%;
  height: 25px; padding: 0 8px; border: 0; border-radius: var(--r-small);
  background: transparent; color: var(--w-text2); font-size: 12.5px;
  text-align: start; cursor: pointer; transition: background-color .12s, color .12s;
}
.tree-item.file { padding-inline-start: 22px; }
.tree-item.root-file { padding-inline-start: 10px; }
.tree-item:hover { background: var(--hover); color: var(--w-text); }
.tree-item.on { background: color-mix(in srgb, var(--w-accent) 18%, transparent); color: var(--w-text); font-weight: 500; }
.tree-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-item .i { width: 13px; height: 13px; color: var(--w-text3); }
.git-dot { width: 6px; height: 6px; border-radius: 50%; margin-inline-start: auto; flex: none; }
.git-dot.mod { background: var(--modified); }
.git-dot.add { background: var(--added); }

/* Search Sidebar */
.search-controls { padding: 8px; border-bottom: 1px solid var(--w-line); display: grid; gap: 6px; }
.search-box {
  display: flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px 0 8px;
  border-radius: var(--r-control); background: var(--w-elev); border: 1px solid var(--w-line);
}
.search-box:focus-within { border-color: var(--w-accent); }
.search-box .i { width: 13px; height: 13px; color: var(--w-text3); }
.search-box input {
  flex: 1; min-width: 0; border: 0; outline: 0;
  background: transparent; color: var(--w-text); font: inherit; font-size: 12px;
}
.stog {
  height: 20px; min-width: 22px; padding: 0 4px; border: 0; border-radius: 4px;
  background: transparent; color: var(--w-text3); font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  cursor: pointer;
}
.stog:hover { background: var(--hover); color: var(--w-text); }
.stog.on { background: color-mix(in srgb, var(--w-accent) 24%, transparent); color: var(--w-accent-text); }
.search-meta { font-size: 11px; color: var(--w-text3); }
.sr-file { font-size: 11.5px; font-weight: 600; color: var(--w-text); padding: 6px 6px 2px; display: flex; align-items: center; gap: 5px; }
.sr-hit {
  display: flex; gap: 6px; width: 100%; padding: 3px 6px; border: 0; border-radius: 4px;
  background: transparent; color: var(--w-text2); font-family: var(--mono); font-size: 11px;
  text-align: start; cursor: pointer; overflow: hidden;
}
.sr-hit:hover { background: var(--hover); color: var(--w-text); }
.sr-hit .sr-ln { color: var(--w-text3); min-width: 22px; text-align: end; flex: none; }
.sr-hit .sr-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-hit mark { background: color-mix(in srgb, var(--w-accent) 32%, transparent); color: var(--w-text); border-radius: 2px; padding: 0 1px; }

/* Git Sidebar + SVG Graph */
.git-commit-box { padding: 8px; border-bottom: 1px solid var(--w-line); display: grid; gap: 6px; }
.git-commit-box input {
  height: 30px; padding: 0 8px; border-radius: var(--r-control);
  border: 1px solid var(--w-line); background: var(--w-elev); color: var(--w-text);
  font: inherit; font-size: 12px; outline: 0;
}
.git-commit-box input:focus { border-color: var(--w-accent); }
.btn-mini {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 28px; padding: 0 10px; border: 0; border-radius: var(--r-control);
  background: var(--w-accent); color: #1d1305; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: filter .15s, transform .14s;
}
.btn-mini:hover { filter: brightness(1.06); }
.btn-mini:active { transform: scale(.97); }
.btn-mini .i { width: 14px; height: 14px; }
.git-group-lbl { font-size: 10.5px; font-weight: 600; color: var(--w-text3); padding: 6px 6px 3px; text-transform: uppercase; letter-spacing: .04em; }
.git-row {
  display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: var(--r-small);
  font-size: 12px; color: var(--w-text2); cursor: pointer;
}
.git-row:hover { background: var(--hover); color: var(--w-text); }
.git-chk {
  width: 14px; height: 14px; border-radius: 3.5px; border: 1.5px solid var(--w-text3);
  display: inline-grid; place-items: center; flex: none; background: transparent; cursor: pointer; padding: 0;
}
.git-chk.on { background: var(--w-accent); border-color: var(--w-accent); color: #1d1305; }
.git-chk .i { width: 10px; height: 10px; }
.git-row .git-fn { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.git-st { font-family: var(--mono); font-size: 11px; font-weight: 700; }
.git-st.M { color: var(--modified); }
.git-st.A { color: var(--added); }
.git-graph-head {
  display: flex; align-items: center; gap: 5px;
  margin-top: 10px; padding: 8px 6px 4px; border-top: 1px solid var(--w-line);
  font-size: 11px; font-weight: 600; color: var(--w-text2);
}
.git-graph-head .i { width: 13px; height: 13px; color: var(--w-accent-text); }
.git-graph { display: grid; gap: 2px; }
.gg-row { display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 4px; border-radius: 4px; font-size: 11.5px; }
.gg-row:hover { background: var(--hover); }
.gg-svg { width: 34px; height: 24px; flex: none; }
.gg-msg { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--w-text); }
.gg-ref {
  padding: 0 5px; border-radius: 4px; font-family: var(--mono); font-size: 9.5px; font-weight: 600;
  background: color-mix(in srgb, var(--w-accent) 20%, transparent); color: var(--w-accent-text);
}

/* Themes Sidebar */
.theme-pick-list { display: grid; gap: 4px; align-content: start; }
.tp-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 6px 8px; border: 1px solid transparent; border-radius: var(--r-control);
  background: transparent; color: var(--w-text); font-size: 12px; cursor: pointer; text-align: start;
}
.tp-item:hover { background: var(--hover); }
.tp-item.on { border-color: var(--w-accent); background: color-mix(in srgb, var(--w-accent) 12%, transparent); font-weight: 600; }
.tp-dots { display: inline-flex; gap: 3px; }
.tp-dots i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid rgba(128, 128, 128, .25); }

/* Center Workspace */
.win-center { display: flex; flex-direction: column; flex: 1 1 0; min-width: 0; min-height: 0; }
.tab-bar {
  display: flex; align-items: center; gap: 6px; flex: none;
  height: 38px; padding: 0 8px;
  background: var(--w-chrome); border-bottom: 1px solid var(--w-line);
}
.tabs-scroll { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs-scroll::-webkit-scrollbar { display: none; }
.ctab {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 27px; padding: 0 8px 0 9px; border-radius: var(--r-control);
  border: 1px solid transparent; background: transparent; color: var(--w-text2);
  font-size: 12px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background-color .14s, color .14s, border-color .14s;
}
.ctab:hover { background: var(--hover); color: var(--w-text); }
.ctab.on {
  background: var(--w-elev); color: var(--w-text); font-weight: 600;
  border-color: var(--w-line); box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.ctab-x {
  display: inline-grid; place-items: center; width: 16px; height: 16px;
  border: 0; border-radius: 4px; background: transparent; color: var(--w-text3);
  cursor: pointer; padding: 0; opacity: .55;
}
.ctab-x:hover { background: var(--hover); color: var(--w-text); opacity: 1; }
.ctab-x .i { width: 11px; height: 11px; }
.tab-tools { display: flex; align-items: center; gap: 2px; flex: none; }

.path-bar {
  display: flex; align-items: center; gap: 4px; flex: none;
  height: 26px; padding: 0 12px;
  background: var(--w-base); border-bottom: 1px solid var(--w-line);
  font-size: 11.5px; color: var(--w-text3); overflow: hidden; white-space: nowrap;
}
.path-bar strong { color: var(--w-text2); font-weight: 500; }
.path-bar .i { width: 12px; height: 12px; opacity: .65; }

/* Editor Stage */
.editor-stage { display: flex; flex: 1 1 0; min-height: 0; overflow: hidden; position: relative; }
.editor-pane { position: relative; flex: 1 1 0; min-width: 0; min-height: 0; overflow: auto; scrollbar-width: thin; background: var(--w-base); }
.editor-pane.secondary { border-left: 1px solid var(--w-line); }
.code-view { padding: 10px 0 24px; font-family: var(--mono); font-size: 12.5px; line-height: 1.65; }
.code-view.wrap .lc { white-space: pre-wrap; word-break: break-word; }
.code-line {
  display: flex; align-items: baseline; padding: 0 14px 0 0; min-height: 21px;
  cursor: text; border-left: 2.5px solid transparent; transition: background-color .1s;
}
.code-line:hover { background: var(--hover); }
.code-line.active {
  background: color-mix(in srgb, var(--w-accent) 9%, transparent);
  border-left-color: var(--w-accent);
}
.code-line.diff-add { background: color-mix(in srgb, var(--added) 14%, transparent); border-left-color: var(--added); }
.code-line.diff-del { background: color-mix(in srgb, var(--deleted) 14%, transparent); border-left-color: var(--deleted); opacity: .88; }
.ln {
  width: 44px; padding-inline-end: 12px; flex: none; text-align: end;
  color: var(--w-text3); user-select: none; font-variant-numeric: tabular-nums; font-size: 11.5px;
}
.code-line.active .ln { color: var(--w-accent-text); font-weight: 600; }
.blame-tag {
  display: none; flex: none; width: 138px; padding-inline-end: 10px;
  font-size: 10.5px; color: var(--w-text3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  user-select: none; border-right: 1px solid var(--w-line); margin-inline-end: 10px;
}
.code-view.show-blame .blame-tag { display: inline-block; }
.lc { flex: 1; white-space: pre; color: var(--w-text); }
.sk { color: var(--w-kw); }
.sf { color: var(--w-fn); }
.st { color: var(--w-ty); }
.ss { color: var(--w-str); }
.sn { color: var(--w-num); }
.sc { color: var(--w-cm); font-style: italic; }
.diag-warn {
  text-decoration: underline wavy var(--warning);
  text-underline-offset: 3px; cursor: help;
}
.sym-hover { cursor: pointer; border-bottom: 1px dotted color-mix(in srgb, var(--w-accent) 60%, transparent); }

/* Inline LSP Hover Card */
.lsp-hover {
  position: absolute; top: 56px; left: 68px; z-index: 12;
  max-width: min(380px, calc(100% - 80px));
  padding: 10px 12px; border-radius: 9px;
  background: var(--w-elev); border: 1px solid var(--w-line);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
  font-size: 12px; animation: pop .15s var(--ease);
}
.lsp-hover code { display: block; font-size: 11.5px; color: var(--w-fn); margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--w-line); }
.lsp-hover p { color: var(--w-text2); font-size: 12px; line-height: 1.5; }
.lsp-hover .lsp-badge { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 10.5px; color: var(--added); font-family: var(--mono); }

/* Markdown Native Split Preview */
.md-preview { padding: 18px 22px; color: var(--w-text); font-size: 13.5px; line-height: 1.65; }
.md-preview h1 { font-size: 20px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--w-line); }
.md-preview h2 { font-size: 15px; margin: 16px 0 8px; color: var(--w-accent-text); }
.md-preview p { margin: 8px 0; color: var(--w-text2); }
.md-preview blockquote {
  margin: 12px 0; padding: 8px 12px; border-left: 3px solid var(--w-accent);
  background: color-mix(in srgb, var(--w-accent) 8%, transparent); border-radius: 0 6px 6px 0;
  color: var(--w-text); font-style: italic;
}
.md-preview pre {
  margin: 10px 0; padding: 10px 12px; border-radius: var(--r-control);
  background: var(--w-chrome); border: 1px solid var(--w-line); overflow-x: auto; font-size: 12px;
}
.md-preview table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 12px; }
.md-preview th, .md-preview td { padding: 6px 8px; border: 1px solid var(--w-line); text-align: start; }
.md-preview th { background: var(--w-chrome); font-weight: 600; }

/* Bottom Panel (Terminal / Problems / Output) */
.bottom-panel {
  display: flex; flex-direction: column; flex: none;
  height: 185px; background: var(--w-base); border-top: 1px solid var(--w-line);
}
.bottom-head {
  display: flex; align-items: center; justify-content: space-between; flex: none;
  height: 32px; padding: 0 8px;
  background: var(--w-chrome); border-bottom: 1px solid var(--w-line);
}
.bottom-pills { display: flex; align-items: center; gap: 4px; }
.bpill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 9px; border: 0; border-radius: var(--r-capsule);
  background: transparent; color: var(--w-text2); font-size: 11.5px; font-weight: 500; cursor: pointer;
}
.bpill:hover { background: var(--hover); color: var(--w-text); }
.bpill.on { background: color-mix(in srgb, var(--w-accent) 20%, transparent); color: var(--w-accent-text); font-weight: 600; }
.bpill .i { width: 12.5px; height: 12.5px; }
.pcount { font-style: normal; padding: 0 5px; border-radius: var(--r-capsule); background: var(--warning); color: #1d1305; font-size: 10px; font-weight: 700; }
.bottom-body {
  flex: 1; min-height: 0; overflow-y: auto; padding: 8px 12px;
  font-family: var(--mono); font-size: 12px; line-height: 1.55; scrollbar-width: thin;
}
.term-log { display: grid; gap: 2px; margin-bottom: 6px; white-space: pre-wrap; }
.tl-dim { color: var(--w-text3); }
.tl-ok { color: var(--added); }
.tl-amber { color: var(--w-accent-text); }
.tl-blue { color: var(--w-fn); }
.term-prompt { display: flex; align-items: center; gap: 6px; }
.tp-user { color: var(--w-accent-text); font-weight: 700; }
.tp-path { color: var(--w-fn); }
.tp-sym { color: var(--w-text3); }
.term-prompt input {
  flex: 1; min-width: 0; border: 0; outline: 0;
  background: transparent; color: var(--w-text); font: inherit;
}
.prob-row {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 5px 8px; border: 0; border-radius: var(--r-small);
  background: transparent; color: var(--w-text); font-family: var(--font); font-size: 12px;
  cursor: pointer; text-align: start;
}
.prob-row:hover { background: var(--hover); }
.prob-row .i { color: var(--warning); width: 14px; height: 14px; }
.prob-row .prob-loc { margin-inline-start: auto; font-family: var(--mono); font-size: 11px; color: var(--w-text3); }

/* Status Bar (26px, internal/app/statusbar.go) */
.win-status {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: none;
  height: 26px; padding: 0 8px;
  background: var(--w-chrome); border-top: 1px solid var(--w-line);
  font-size: 11.5px; color: var(--w-text2);
}
.st-left, .st-right { display: flex; align-items: center; gap: 4px; min-width: 0; }
.st-btn, .st-item {
  display: inline-flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 6px; border: 0; border-radius: 4px;
  background: transparent; color: var(--w-text2); font-size: 11px; white-space: nowrap;
}
.st-btn { cursor: pointer; }
.st-btn:hover { background: var(--hover); color: var(--w-text); }
.st-err .i { color: var(--deleted); width: 12px; height: 12px; }
.st-warn .i { color: var(--warning); width: 12px; height: 12px; margin-inline-start: 4px; }
.st-lsp .i { color: var(--added); width: 12px; height: 12px; }
.st-swatch { width: 9px; height: 9px; border-radius: 50%; background: var(--w-accent); }
.hide-sm { display: inline-flex; }
@media (max-width: 680px) { .hide-sm { display: none; } }

.win-toast {
  position: absolute; right: 12px; bottom: 36px; z-index: 28;
  padding: 6px 12px; border-radius: var(--r-capsule);
  background: var(--w-elev); color: var(--w-text); border: 1px solid var(--w-accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3); font-size: 12px; font-weight: 500;
  animation: pop .18s var(--spring);
}

/* Demo Presets & Hint */
.demo-presets {
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2);
  margin-top: var(--s5);
}
.preset-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px; border: 0; border-radius: var(--r-capsule);
  background: var(--glass); color: var(--muted);
  box-shadow: inset 0 0 0 .5px var(--glass-edge), var(--shadow-card);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background-color .18s, color .18s, box-shadow .2s, transform .18s var(--spring);
}
.preset-pill .i { width: 14.5px; height: 14.5px; }
.preset-pill:hover { color: var(--text); transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--accent-edge), var(--shadow-card); }
.preset-pill.on {
  background: var(--accent); color: var(--on-accent); font-weight: 600;
  box-shadow: 0 4px 16px rgba(242, 169, 59, .35);
}
.demo-hint {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: var(--s4); text-align: center; color: var(--muted); font-size: 13px;
}
.demo-hint .i { width: 15px; height: 15px; color: var(--accent-ink); }

/* ---------------------------------------------------------------- sections */

.section { padding-block: clamp(56px, 8vw, 108px); background: var(--page); }
.section.alt { background: var(--canvas); }
.section-tight { padding-top: clamp(28px, 4vw, 48px); }
.sec-head { max-width: 720px; margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }
.kicker {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: var(--s3); padding: 4px 12px; border-radius: var(--r-capsule);
  background: var(--accent-soft); color: var(--accent-ink);
  font-size: 12.5px; font-weight: 600;
}
.kicker .i { width: 14px; height: 14px; }
.sec-head h2 { font-size: clamp(28px, 4.4vw, 46px); letter-spacing: var(--track-title); }
.sec-head p { margin-top: var(--s4); color: var(--muted); font-size: clamp(16px, 1.8vw, 18.5px); }

/* ---------------------------------------------------------------- flowing lyrics stage (许嵩《乌鸦》) */

.lyrics-sec { padding-block: clamp(24px, 4vw, 48px) clamp(56px, 8vw, 96px); background: var(--canvas); }
.lyrics-stage {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 22px;
  background:
    radial-gradient(640px 320px at 14% 12%, rgba(242, 169, 59, .22), transparent 64%),
    radial-gradient(560px 360px at 88% 88%, rgba(245, 138, 84, .16), transparent 68%),
    linear-gradient(150deg, #141517 0%, #0f1012 58%, #181410 100%);
  color: #e5e3de;
  border: 1px solid rgba(242, 169, 59, .24);
  box-shadow: 0 28px 72px -18px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.lyrics-embers { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* Dual continuous kinetic marquee behind the lyrics */
.lyrics-marquee {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 26px 0; pointer-events: none; opacity: .10;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marqueeScroll 36s linear infinite; }
.marquee-track.reverse { animation-direction: reverse; animation-duration: 44s; }
.lyrics-stage.paused .marquee-track { animation-play-state: paused; }
.marquee-group {
  display: flex; align-items: center; gap: 28px; padding-inline-end: 28px;
  font-size: clamp(26px, 4vw, 44px); font-weight: 700; white-space: nowrap; color: #f5b957;
}
.marquee-group i { font-style: normal; opacity: .55; font-size: .6em; }
@keyframes marqueeScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.lyrics-inner {
  position: relative; z-index: 2;
  padding: clamp(26px, 4.5vw, 48px);
  display: grid; gap: clamp(20px, 3vw, 32px);
}
.lyrics-top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3);
}
.lyrics-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 13px; border-radius: var(--r-capsule);
  background: rgba(242, 169, 59, .16); color: #f5b957;
  border: 1px solid rgba(242, 169, 59, .34);
  font-size: 12.5px; font-weight: 600;
}
.lyrics-badge .i { width: 15px; height: 15px; }
.lyrics-controls { display: inline-flex; align-items: center; gap: var(--s2); }
.lyrics-credit {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--r-capsule);
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .10);
  color: #c8c4bc; font-size: 13px;
}
.lyrics-credit strong { color: #f5b957; }
.lyrics-credit .i { width: 14px; height: 14px; color: #F2A93B; }
.lyrics-toggle {
  background: rgba(255, 255, 255, .07); color: #e5e3de;
  border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--r-capsule);
}
.lyrics-toggle:hover { background: rgba(242, 169, 59, .22); color: #f5b957; }
.lyrics-toggle .i:last-child { display: none; }
.lyrics-stage.paused .lyrics-toggle .i:first-child { display: none; }
.lyrics-stage.paused .lyrics-toggle .i:last-child { display: block; }

.lyrics-lines {
  margin: 0; padding: 0; list-style: none;
  display: grid; gap: 8px;
}
.lyric-line {
  position: relative;
  display: grid; grid-template-columns: 32px 1fr; align-items: center; gap: 14px;
  padding: 12px 16px; border-radius: var(--r-card);
  background: rgba(255, 255, 255, .025);
  border: 1px solid rgba(255, 255, 255, .04);
  cursor: pointer;
  opacity: .52;
  transform: translateX(0);
  transition: opacity .45s var(--ease), transform .45s var(--spring), background-color .4s, border-color .4s, box-shadow .4s;
}
.lyric-line:hover { opacity: .82; background: rgba(255, 255, 255, .05); }
.lyric-line.active {
  opacity: 1;
  transform: translateX(6px);
  background: linear-gradient(95deg, rgba(242, 169, 59, .16), rgba(242, 169, 59, .04));
  border-color: rgba(242, 169, 59, .42);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
}
.lyric-idx { font-size: 11.5px; color: #8f8b83; }
.lyric-line.active .lyric-idx { color: #F2A93B; font-weight: 700; }
.lyric-copy { display: grid; gap: 2px; min-width: 0; }
.lyric-main {
  font-size: clamp(18px, 2.6vw, 28px); font-weight: 650; line-height: 1.35;
  color: #e5e3de; transition: color .35s;
}
.lyric-line.active .lyric-main {
  background: linear-gradient(95deg, #ffffff 0%, #f5b957 62%, #F2A93B 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lyric-sub { font-size: 12.5px; color: #8f8b83; font-style: italic; }
.lyric-line.active .lyric-sub { color: #c7c1b6; }
.lyric-bar {
  position: absolute; left: 16px; right: 16px; bottom: 0; height: 2px;
  border-radius: 2px; overflow: hidden; opacity: 0;
}
.lyric-line.active .lyric-bar { opacity: 1; }
.lyric-bar i {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, #F2A93B, #ffd27d);
  transform-origin: left center; transform: scaleX(0);
}
.lyric-line.active .lyric-bar i { animation: lyricFill 3.2s linear forwards; }
.lyrics-stage.paused .lyric-line.active .lyric-bar i { animation-play-state: paused; }
@keyframes lyricFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.lyrics-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3);
  padding-top: var(--s4); border-top: 1px solid rgba(255, 255, 255, .09);
}
.lyrics-tagline { color: #a4a19a; font-size: 14.5px; max-width: 600px; }
.lyrics-sig { font-size: 14px; font-weight: 600; color: #f5b957; white-space: nowrap; }

/* ---------------------------------------------------------------- speed & memory section */

.stat-grid { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card { padding: var(--s6); display: flex; flex-direction: column; gap: var(--s2); }
.stat-icon {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: var(--r-card); background: var(--accent-soft); color: var(--accent-ink);
  margin-bottom: var(--s2); transition: transform .25s var(--spring);
}
.stat-card:hover .stat-icon { transform: scale(1.08) rotate(-4deg); }
.stat-val { display: flex; align-items: baseline; gap: 4px; }
.stat-num { font-size: clamp(34px, 4vw, 44px); font-weight: 750; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--text); }
.stat-unit { font-size: 15px; font-weight: 650; color: var(--accent-ink); }
.stat-card h3 { font-size: 16.5px; margin-top: 2px; }
.stat-card p { color: var(--muted); font-size: 14px; }

/* Benchmark Race Card */
.race-card { margin-top: var(--s6); padding: clamp(20px, 3.5vw, 32px); display: grid; gap: var(--s6); }
.race-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4); }
.race-head h3 { font-size: 20px; }
.race-head p { margin-top: 4px; font-size: 14px; }
.race-cols { display: grid; gap: var(--s8); }
@media (min-width: 860px) { .race-cols { grid-template-columns: 1fr 1fr; } }
.race-group { display: grid; gap: var(--s4); }
.race-group-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 650; color: var(--muted);
  padding-bottom: var(--s2); border-bottom: 1px solid var(--line);
}
.race-group-title .i { width: 15px; height: 15px; color: var(--accent-ink); }
.race-row { display: grid; gap: 6px; }
.race-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.race-name { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.race-name img { border-radius: 4px; }
.race-name em { font-style: normal; font-size: 12px; color: var(--muted); display: none; }
@media (min-width: 520px) { .race-name em { display: inline; } }
.race-readout { font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--muted); }
.race-row.winner .race-readout { color: var(--accent-ink); }
.race-track { height: 12px; border-radius: var(--r-capsule); background: var(--fill); overflow: hidden; }
.race-fill {
  height: 100%; width: var(--pct, 10%); min-width: 10px;
  border-radius: inherit; transition: width .08s linear;
}
.race-fill.huncrow {
  background: linear-gradient(90deg, #F2A93B, #ffd07a);
  box-shadow: 0 0 14px rgba(242, 169, 59, .55);
}
.race-fill.heavy { background: color-mix(in srgb, var(--muted) 45%, transparent); }
.race-fill.heavier { background: color-mix(in srgb, var(--deleted) 55%, transparent); }

/* ---------------------------------------------------------------- features */

.feat-filters { display: flex; width: max-content; max-width: 100%; margin: 0 auto var(--s8); overflow-x: auto; scrollbar-width: none; }
.feat-filters::-webkit-scrollbar { display: none; }
.feat-grid { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
@media (min-width: 760px) { .feat-grid { grid-template-columns: repeat(2, 1fr); } }
.feat { padding: var(--s6); display: flex; flex-direction: column; }
.feat-lg { padding: var(--s8); }
.feat.is-hidden { display: none; }
.feat.pop-in { animation: featIn .35s var(--spring) both; }
@keyframes featIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.feat-icon {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; margin-bottom: var(--s5);
  border-radius: var(--r-card);
  background: linear-gradient(145deg, var(--accent-hover), var(--accent));
  color: var(--on-accent);
  box-shadow: 0 6px 20px rgba(242, 169, 59, .30), inset 0 1px 0 rgba(255, 255, 255, .36);
  transition: transform .25s var(--spring);
}
.feat:hover .feat-icon { transform: scale(1.07) rotate(-3deg); }
.feat-icon .i { width: 22px; height: 22px; }
.feat h3 { font-size: 20px; }
.feat-lg h3 { font-size: 22px; }
.feat > p { margin-top: var(--s2); color: var(--muted); }
.ticks { margin: var(--s5) 0 0; padding: 0; list-style: none; display: grid; gap: var(--s2); }
.ticks li { display: flex; gap: var(--s2); align-items: flex-start; font-size: 14.5px; }
.ticks .i { margin-top: .22em; color: var(--accent-ink); width: 17px; height: 17px; }

/* ---------------------------------------------------------------- theme gallery */

.theme-gallery { display: grid; gap: var(--s4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .theme-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .theme-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.theme-card {
  display: grid; gap: 10px; padding: 12px; border: 1.5px solid var(--line);
  border-radius: var(--r-card); background: var(--inset);
  text-align: start; cursor: pointer;
  transition: transform .22s var(--spring), border-color .2s, box-shadow .22s;
}
.theme-card:hover { transform: translateY(-3px); border-color: var(--accent-edge); box-shadow: var(--shadow-lift); }
.theme-card.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow-card); }
.tc-preview { border-radius: 8px; border: 1px solid; overflow: hidden; height: 74px; display: flex; flex-direction: column; }
.tc-bar { height: 16px; padding: 0 7px; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid; }
.tc-bar i { width: 6px; height: 6px; border-radius: 50%; display: block; }
.tc-bar span { width: 34px; height: 4px; border-radius: 2px; opacity: .45; }
.tc-body { flex: 1; display: flex; }
.tc-rail { width: 16px; border-right: 1px solid; padding: 6px 4px; display: grid; gap: 5px; align-content: start; }
.tc-rail i { width: 7px; height: 7px; border-radius: 2px; display: block; }
.tc-code { flex: 1; padding: 8px 10px; display: grid; gap: 7px; align-content: center; }
.tc-row { display: flex; gap: 6px; }
.tc-row i { height: 4.5px; border-radius: 2px; display: block; }
.tc-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.tc-meta strong { font-size: 14px; color: var(--text); }
.tc-tag { font-size: 11px; color: var(--muted); padding: 1px 7px; border-radius: var(--r-capsule); background: var(--fill); }
.tc-swatches { display: flex; gap: 5px; }
.tc-swatches i { width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(128, 128, 128, .25); }

/* ---------------------------------------------------------------- at a glance */

.spec { margin: 0; padding: var(--s2) var(--s6); display: grid; }
@media (min-width: 720px) { .spec { grid-template-columns: 1fr 1fr; column-gap: var(--s10); } }
.spec > div {
  display: grid; grid-template-columns: 7.5em 1fr; gap: var(--s4);
  padding: var(--s4) var(--s2); border-bottom: .5px solid var(--line);
  border-radius: var(--r-small); transition: background-color .15s;
}
.spec > div:hover { background: var(--hover); }
@media (min-width: 720px) { .spec > div:nth-last-child(-n + 2) { border-bottom: 0; } }
@media (max-width: 719px) { .spec > div:last-child { border-bottom: 0; } }
.spec dt { color: var(--muted); font-size: 14px; }
.spec dd { margin: 0; font-weight: 500; font-size: 15px; }

/* ---------------------------------------------------------------- downloads */

.dl-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
@media (min-width: 860px) { .dl-grid { grid-template-columns: repeat(3, 1fr); } }
.dl-card { padding: var(--s8) var(--s6) var(--s6); display: flex; flex-direction: column; align-items: flex-start; transition: box-shadow .25s, transform .25s var(--spring); }
.dl-icon {
  display: inline-grid; place-items: center; flex: none;
  width: 48px; height: 48px; border-radius: var(--r-card);
  background: var(--canvas); color: var(--text);
  box-shadow: inset 0 0 0 .5px var(--glass-edge);
  transition: transform .25s var(--spring), color .2s;
}
.dl-card:hover .dl-icon { transform: scale(1.06); color: var(--accent-ink); }
.dl-icon .i { width: 25px; height: 25px; }
.dl-card h3 { margin-top: var(--s4); font-size: 24px; }
.dl-card .muted { margin-top: var(--s1); font-size: 14px; }
.dl-files { display: grid; gap: var(--s2); width: 100%; margin-top: var(--s6); }
.dl-files .btn { justify-content: flex-start; }
.dl-files .size { margin-inline-start: auto; }
.more { display: inline-flex; align-items: center; gap: var(--s1); margin-top: var(--s5); font-size: 14px; font-weight: 500; }
.dl-rec {
  display: none; align-items: center; gap: var(--s1);
  padding: 2px var(--s3) 2px var(--s2); border-radius: var(--r-capsule);
  background: var(--accent-soft); color: var(--accent-ink);
  font-size: 12px; font-weight: 600;
}
.dl-rec .i { width: 14px; height: 14px; }
.dl-card .dl-rec { position: absolute; top: var(--s5); right: var(--s5); }
html[data-os="macos"] [data-platform="macos"],
html[data-os="windows"] [data-platform="windows"],
html[data-os="linux"] [data-platform="linux"] { box-shadow: var(--shadow-card), inset 0 0 0 1.5px var(--accent-edge); }
html[data-os="macos"] [data-platform="macos"] .dl-rec,
html[data-os="windows"] [data-platform="windows"] .dl-rec,
html[data-os="linux"] [data-platform="linux"] .dl-rec { display: inline-flex; }
.dl-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2) var(--s6); margin-top: var(--s8); font-size: 15px; font-weight: 500; }
.dl-links a { display: inline-flex; align-items: center; gap: 3px; }
.dl-links .i { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- FAQ */

.faq { display: grid; gap: var(--s2); }
.qa { border-radius: var(--r-card); background: var(--canvas); box-shadow: inset 0 0 0 .5px var(--glass-edge); transition: background-color .2s, box-shadow .2s; }
.qa:hover { box-shadow: inset 0 0 0 .5px var(--accent-edge); }
.qa[open] { background: var(--inset); box-shadow: var(--shadow-card), inset 0 0 0 .5px var(--glass-edge); }
.qa summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s5) var(--s6); cursor: pointer; list-style: none; border-radius: var(--r-card); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary h3 { font-size: 17px; letter-spacing: 0; }
.qa summary .i { width: 19px; height: 19px; color: var(--muted); transition: transform .25s var(--spring), color .2s; }
.qa[open] summary .i { transform: rotate(45deg); color: var(--accent-ink); }
.qa-a { padding: 0 var(--s6) var(--s6); color: var(--muted); }
.qa[open] .qa-a { animation: fade .3s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }

/* ---------------------------------------------------------------- CTA band */

.cta-band { padding: 0 0 clamp(64px, 10vw, 112px); background: var(--page); }
.cta-in {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(44px, 7vw, 80px) var(--s6);
  border-radius: 24px;
  background:
    radial-gradient(640px 320px at 20% 0%, rgba(255, 240, 200, .45), transparent 65%),
    radial-gradient(560px 340px at 85% 100%, rgba(180, 96, 12, .45), transparent 68%),
    linear-gradient(135deg, #F5B84B 0%, #F2A93B 52%, #DE8D1E 100%);
  color: #1d1305;
  box-shadow: 0 24px 64px -16px rgba(242, 169, 59, .45), inset 0 1px 0 rgba(255, 255, 255, .40);
}
.cta-dots {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(rgba(29, 19, 5, .14) 1px, transparent 1px) 0 0 / 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, #000 35%, transparent 100%);
}
.cta-in img { border-radius: 17px; box-shadow: 0 12px 32px rgba(29, 19, 5, .28); transition: transform .3s var(--spring); }
.cta-in:hover img { transform: scale(1.05) translateY(-3px); }
.cta-in h2 { margin-top: var(--s6); font-size: clamp(28px, 4.4vw, 44px); letter-spacing: var(--track-title); color: #1d1305; }
.cta-in p { margin-top: var(--s3); color: rgba(29, 19, 5, .82); font-size: 18px; }

/* ---------------------------------------------------------------- download page & 404 */

.page-head { padding-top: calc(var(--nav-h) + clamp(32px, 6vw, 72px)); text-align: center; }
.page-head h1 { font-size: clamp(32px, 5.4vw, 56px); letter-spacing: var(--track-title); }
.page-head .lead { max-width: 640px; margin-inline: auto; margin-top: var(--s3); color: var(--muted); }
.crumbs { margin-bottom: var(--s5); font-size: 14px; }
.crumbs ol { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2); margin: 0; padding: 0; list-style: none; }
.crumbs li + li::before { content: "/"; margin-inline-end: var(--s2); color: var(--muted); opacity: .6; }
.crumbs [aria-current] { color: var(--muted); }
.platform-tabs { margin-top: var(--s8); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.platform-tabs .i { width: 16px; height: 16px; }
.dl-blocks { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); max-width: calc(920px + 2 * var(--gutter)); }
.dl-block { padding: var(--s6); }
@media (min-width: 720px) { .dl-block { padding: var(--s8); } }
.dl-block-head { display: flex; align-items: flex-start; gap: var(--s4); flex-wrap: wrap; }
.dl-block-head > div { flex: 1; min-width: 200px; }
.dl-block-head h2 { font-size: 26px; }
.dl-block-head .muted { margin-top: var(--s1); }
.dl-block h3 { margin-top: var(--s8); font-size: 18px; }
.files { width: 100%; margin-top: var(--s6); border-collapse: collapse; font-size: 15px; }
.files th { padding: var(--s2) 0; text-align: start; color: var(--muted); font-size: 13px; font-weight: 500; border-bottom: .5px solid var(--line); }
.files td { padding: var(--s4) var(--s3) var(--s4) 0; border-bottom: .5px solid var(--line); vertical-align: middle; }
.files tr:last-child td { border-bottom: 0; }
.files td strong { display: block; font-weight: 600; }
.files td code { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; word-break: break-all; }
.files .num { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.files .act { text-align: end; padding-right: 0; }
@media (max-width: 519px) {
  .files, .files tbody { display: block; }
  .files thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .files tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s2) var(--s3); padding: var(--s4) 0; border-bottom: .5px solid var(--line); }
  .files tr:last-child { border-bottom: 0; }
  .files td { padding: 0; border: 0; }
  .files td:first-child { grid-column: 1 / -1; }
}
.steps { margin: var(--s3) 0 0; padding-inline-start: 1.3em; display: grid; gap: var(--s2); color: var(--muted); }
.steps li::marker { color: var(--accent-ink); font-weight: 600; }
.code {
  display: flex; align-items: center; gap: var(--s2);
  margin-top: var(--s3); padding: var(--s1) var(--s1) var(--s1) var(--s4);
  border-radius: var(--r-control);
  background: var(--w-base); color: var(--w-text);
  border: 1px solid var(--line);
}
.code code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; padding-block: var(--s2); font-size: 13px; }
.code-label { margin-top: var(--s5); font-size: 13px; font-weight: 600; color: var(--muted); }
.copy .i:last-child { display: none; color: var(--added); }
.copy.done .i:first-child { display: none; }
.copy.done .i:last-child { display: block; }
.dl-block .dl-links { justify-content: flex-start; margin-top: var(--s6); }

.notfound { padding-block: calc(var(--nav-h) + clamp(80px, 14vw, 160px)) clamp(80px, 14vw, 160px); text-align: center; }
.nf-code { font-size: clamp(64px, 12vw, 120px); font-weight: 700; line-height: 1; color: var(--accent); letter-spacing: -0.04em; }
.notfound h1 { margin-top: var(--s4); font-size: clamp(28px, 4vw, 40px); }
.notfound .lead { margin: var(--s3) auto var(--s8); color: var(--muted); max-width: 520px; }

/* ---------------------------------------------------------------- footer */

.foot { background: var(--canvas); border-top: .5px solid var(--line); font-size: 14px; }
.foot-in { display: grid; gap: var(--s8); padding-block: var(--s12) var(--s8); grid-template-columns: repeat(2, 1fr); }
.foot-brand { grid-column: 1 / -1; }
.foot-brand p { margin-top: var(--s3); max-width: 340px; color: var(--muted); }
@media (min-width: 860px) { .foot-in { grid-template-columns: 2fr repeat(3, 1fr); } .foot-brand { grid-column: auto; } }
.foot-col { display: grid; gap: var(--s2); align-content: start; }
.foot-col h2 { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: var(--s1); }
.foot-col a { color: var(--muted); }
.foot-col a:hover, .foot-col a[aria-current] { color: var(--text); }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2); padding-block: var(--s5) var(--s8); border-top: .5px solid var(--line); color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------------- command palette */

.pal-btn { width: auto; gap: var(--s2); padding-inline: var(--s2); }
.pal-btn kbd { display: none; padding: 1px var(--s1); border-radius: var(--r-small); background: var(--fill); color: var(--muted); font-family: inherit; font-size: 11px; font-weight: 600; }
@media (min-width: 1080px) { .pal-btn kbd { display: inline-block; } .pal-btn .i { display: none; } }
.palette {
  width: min(560px, calc(100vw - 2 * var(--gutter)));
  max-height: min(500px, calc(100vh - 140px));
  margin: 11vh auto auto; padding: 0;
  border: 0; border-radius: var(--r-sheet);
  background: var(--inset); color: var(--text);
  box-shadow: var(--shadow-lift), inset 0 .5px 0 var(--glass-spec), inset 0 0 0 .5px var(--glass-edge);
  overflow: hidden;
}
.palette[open] { display: flex; flex-direction: column; animation: pop .18s var(--spring); }
.palette::backdrop { background: rgba(0, 0, 0, .42); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pal-search { display: flex; align-items: center; gap: var(--s3); flex: none; height: 52px; padding: 0 var(--s4); border-bottom: .5px solid var(--line); color: var(--muted); }
.pal-search .i { width: 18px; height: 18px; }
.pal-search input { flex: 1; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; }
.pal-search kbd { padding: 1px var(--s2); border-radius: var(--r-small); background: var(--fill); font-size: 11px; font-weight: 600; }
.pal-list { flex: 1; min-height: 0; overflow-y: auto; margin: 0; padding: var(--s2); list-style: none; }
.pal-group { padding: var(--s3) var(--s3) var(--s1); color: var(--muted); font-size: 12px; font-weight: 600; }
.pal-list [role="option"] { display: flex; align-items: center; gap: var(--s3); min-height: 36px; padding: 0 var(--s3); border-radius: var(--r-control); font-size: 14px; cursor: pointer; }
.pal-list [role="option"] .i { width: 16px; height: 16px; flex: none; color: var(--muted); }
.pal-list [role="option"][aria-selected="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.pal-list [role="option"][aria-selected="true"] .i { color: var(--on-accent); }
.pal-list [hidden] { display: none; }
.pal-empty { margin: 0; padding: var(--s8) var(--s4); text-align: center; color: var(--muted); }
.pal-foot { padding: 7px var(--s4); border-top: .5px solid var(--line); background: var(--canvas); color: var(--muted); font-size: 11.5px; text-align: end; }

/* ---------------------------------------------------------------- back-top, toasts & lang banner */

.back-top {
  position: fixed; right: max(var(--s4), env(safe-area-inset-right)); bottom: max(var(--s5), env(safe-area-inset-bottom)); z-index: 55;
  display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  background: var(--glass); color: var(--text);
  -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
  box-shadow: var(--shadow-lift), inset 0 .5px 0 var(--glass-spec), inset 0 0 0 .5px var(--glass-edge);
  cursor: pointer; transition: transform .22s var(--spring), background-color .18s;
}
.back-top:hover { background: var(--inset); transform: translateY(-2px); color: var(--accent-ink); }
.back-top[hidden] { display: none; }

.toast-stack { position: fixed; right: var(--s4); top: calc(var(--nav-h) + var(--s3)); z-index: 80; display: grid; gap: var(--s2); pointer-events: none; }
.toast-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: var(--r-capsule);
  background: var(--glass); color: var(--text);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--shadow-lift), inset 0 .5px 0 var(--glass-spec), inset 0 0 0 .5px var(--glass-edge);
  font-size: 13px; font-weight: 500; animation: pop .22s var(--spring);
}
.toast-item.out { opacity: 0; transform: translateY(-6px); transition: opacity .22s, transform .22s; }
.toast-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.langbanner {
  position: fixed; left: 50%; bottom: max(var(--s4), env(safe-area-inset-bottom)); z-index: 60;
  display: flex; align-items: center; gap: var(--s3);
  width: max-content; max-width: calc(100vw - 2 * var(--gutter));
  padding: var(--s2) var(--s2) var(--s2) var(--s5);
  border-radius: var(--r-capsule); background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--shadow-lift), inset 0 0 0 .5px var(--glass-edge);
  transform: translateX(-50%); font-size: 14px; animation: rise .4s var(--ease);
}
.langbanner[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 12px); } }

/* ---------------------------------------------------------------- motion */

.js .reveal { opacity: 0; transform: translateY(16px); }
.js .reveal.in {
  opacity: 1; transform: none;
  transition: opacity .65s var(--spring), transform .65s var(--spring);
  transition-delay: calc(var(--i, 0) * 60ms);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .boot-veil { display: none !important; }
}
@media print {
  .nav, .langbanner, .demo-wrap, .cta-band, .palette, .boot-veil, .back-top, .toast-stack { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
