/* VinaGen docs theme — palette taken from the toolkit's own Editor windows:
   navy surfaces, violet primary action, teal Flow, green UI Designer. */
:root {
  --vg-night: #161a27;
  --vg-panel: #1c2132;
  --vg-line: #2e3550;
  --vg-ink: #e8ebf4;
  --vg-muted: #9aa3b8;
  --vg-violet: #8f7ff5;
  --vg-violet-deep: #5b4ba3;
  --vg-teal: #3fb6c8;
  --vg-green: #46c08a;
  --vg-amber: #e0a24a;
  --vg-cyan: #59c8f2;

  --base-font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --code-font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --base-line-height: 1.7;
  --heading-h1-font-size: 2.1rem;
  --heading-h2-font-size: 1.4rem;
  --heading-h1-font-weight: 800;
  --content-max-width: 1080px;
  --sidebar-width: 264px;
  --sidebar-padding: 18px 12px 10px;
  --sidebar-transition-duration: 280ms;
  --sidebar-nav-link-padding: 7px 12px;
  --sidebar-nav-link-border-color--active: var(--vg-violet);
  --sidebar-nav-margin: 0;
  --sidebar-nav-link-margin: 0;
  --sidebar-nav-link-border-width: 0;
  --sidebar-nav-strong-margin: 0;
  --sidebar-nav-strong-border-width: 0;
  --sidebar-nav-strong-text-transform: none;
  --sidebar-nav-pagelink-background: none;
  --sidebar-nav-pagelink-background--active: #28223f;
  --sidebar-nav-link-background--active: #28223f;
  --sidebar-nav-pagelink-background--loaded: none;
  --sidebar-nav-pagelink-background--collapse: none;
  --sidebar-nav-pagelink-padding: 7px 10px;
}

/* Quiet documentation chrome; the demos carry the visual emphasis. */
@media (max-width: 767px) {
  body .sidebar + .content { margin-left: 0 !important; left: 0 !important; width: 100%; transform: none !important; min-width: 0; }
  body .markdown-section { width: 100%; min-width: 0; }
}
.markdown-section { padding: 52px 48px 32px; }
.markdown-section > h1 { margin-top: 0; padding-right: 80px; }
.markdown-section h2 { margin-top: 2.4rem; border-bottom: 1px solid var(--vg-line); padding-bottom: 12px; }
body .sidebar { padding: var(--sidebar-padding); height: 100dvh; }
.sidebar .app-name { margin: 0 0 16px; text-align: left; padding: 0 8px; }
.sidebar .search { padding: 0; margin: 0 0 16px; border: 0; }
.sidebar .search .input-wrap { min-height: 36px; margin: 0; padding: 8px 10px 8px 32px; border-color: #2b3246; border-radius: 8px; background: #191e2d !important; transition: border-color 160ms ease, box-shadow 160ms ease; }
.sidebar .search .input-wrap::before { content: ""; left: 11px; width: 14px; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23818ca6' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='7'/%3E%3Cpath d='m15 15 6 6'/%3E%3C/svg%3E") center / contain no-repeat; }
.sidebar .search input[type="search"] { margin: 0; padding: 0; border: 0 !important; background: transparent !important; font-size: 11px; line-height: 1.5; }
.sidebar-nav { margin: 0; padding: 0; font-size: 12px; }
.sidebar-nav > ul { margin: 0; padding: 0; }
.sidebar-nav > ul > li { margin: 16px 0 0; }
.sidebar-nav > ul > li:first-child { margin-top: 0; }
.sidebar-nav > ul > li > p { margin: 0 0 4px; }
.sidebar-nav > ul > li > strong,
.sidebar-nav > ul > li > p > strong { display: block; margin: 0 0 5px; padding: 0 10px; border: 0; color: #818ca6; font-size: 10px; font-weight: 600; }
.sidebar-nav > ul > li > ul { margin: 0; padding: 0; }
.sidebar-nav > ul > li > ul > li { margin: 1px 0; }
.sidebar-nav > ul > li > ul > li > a { display: flex; align-items: center; gap: 9px; min-height: 34px; margin: 0; padding: 7px 10px; border: 0; background-image: none; color: #bcc5d7; font-weight: 500; white-space: normal; }
.sidebar-nav li a { line-height: 1.45; border-radius: 7px; text-decoration: none; transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease !important; }
.sidebar-nav > ul > li > ul > li > a::before { content: none; }
.sidebar-nav li a:hover { color: #fff; background-color: #1c2132; text-decoration: none; }
.sidebar-nav li[aria-current="page"] > a,
.sidebar-nav li.active > a { border: 0; color: #c0b4ff !important; background-color: #28223f; box-shadow: inset 2px 0 #8f7ff5; }
.sidebar-nav li.active > a { font-weight: 600; }
.vg-nav-label { min-width: 0; }
.sidebar-nav .vg-designer-variants { display: block !important; margin: 2px 0 6px 18px; padding: 0 0 0 7px; border-left: 1px solid var(--vg-line); }
.sidebar-nav .vg-designer-variants > li { margin: 1px 0; }
.sidebar-nav .vg-designer-variants > li > a { display: flex; align-items: center; gap: 7px; min-height: 31px; margin: 0; padding: 6px 8px; font-size: 11px; white-space: normal; }
.sidebar-nav .vg-designer-variants > li > a::before { content: none; }
.vg-designer-variants .vg-nav-icon { flex-basis: 14px; width: 14px; height: 14px; }
.sidebar-nav .vg-designer-group > a > .vg-nav-icon { color: var(--vg-green); }
.vg-nav-icon { flex: 0 0 17px; width: 17px; height: 17px; color: #818ca6; }
.sidebar-nav > ul > li:nth-child(2) .vg-nav-icon { color: #65aab7; }
.sidebar-nav > ul > li:nth-child(3) .vg-nav-icon { color: #c59c63; }
.sidebar-nav > ul > li:nth-child(4) .vg-nav-icon { color: #a397dc; }
.sidebar-nav li[aria-current="page"] > a .vg-nav-icon { color: #c0b4ff; }
.vg-nav-toc { margin: 4px 0 6px 27px; border-left: 1px solid var(--vg-line); }
.vg-nav-toc summary { padding: 4px 10px; color: var(--vg-muted); font-size: 11px; cursor: pointer; }
.vg-nav-toc summary:hover { color: var(--vg-ink); }
.vg-nav-toc summary { list-style: none; display: flex; align-items: center; gap: 6px; }
.vg-nav-toc summary::-webkit-details-marker { display: none; }
.vg-nav-toc summary::before { content: ""; width: 5px; height: 5px; border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(-45deg); transition: transform 180ms ease; }
.vg-nav-toc[open] summary::before { transform: rotate(45deg); }
.sidebar-nav .vg-nav-toc .app-sub-sidebar { margin: 0; padding: 0 0 3px 10px; font-size: 12px; }
.sidebar-nav .vg-nav-toc .app-sub-sidebar li { margin: 0; }
.sidebar-nav .vg-nav-toc .app-sub-sidebar a { margin: 0; padding: 5px 8px; border: 0; }
.sidebar-nav hr { margin: 18px 0 12px; border-color: var(--vg-line); }
/* Keep community links visible while only the documentation menu scrolls. */
.sidebar { overflow: hidden; }
.sidebar > .search,
.sidebar > .app-name { flex: 0 0 auto; }
.sidebar .sidebar-nav { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; overflow: hidden; }
.sidebar-nav > ul { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding-right: 3px; }
.sidebar .vg-sidebar-actions { flex: 0 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--vg-line); background: var(--sidebar-background); }
.vg-sidebar-actions .vg-sidebar-action { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; margin: 0; padding: 7px; border: 1px solid #383e69; border-radius: 7px; color: var(--vg-ink); font-size: 11px; font-weight: 500; text-decoration: none; }
.vg-sidebar-actions .vg-sidebar-store { border-color: var(--vg-amber); }
.vg-sidebar-actions .vg-sidebar-action:hover { background: var(--vg-panel); color: #fff; text-decoration: none; }
.vg-sidebar-actions .vg-sidebar-action:focus-visible { outline: 2px solid var(--vg-violet); outline-offset: 3px; }
.vg-sidebar-action svg { flex: 0 0 18px; width: 18px; height: 18px; }
.sidebar-nav > ul > li > ul > li.active > a[href] { background: #28223f; font-weight: 600; }
.sidebar-nav .vg-text-variants { display: block !important; margin: 2px 0 6px 18px; padding: 0 0 0 7px; border-left: 1px solid var(--vg-line); }
.sidebar-nav .vg-text-variants > li { margin: 2px 0; }
.sidebar-nav .vg-text-variants > li > a { display: flex; align-items: center; gap: 8px; min-height: 33px; margin: 0; padding: 7px 9px; font-size: 11px; white-space: normal; }
.sidebar-nav .vg-text-variants > li > a::before { content: none; }
.vg-text-variants .vg-nav-icon { flex: 0 0 16px; width: 16px; height: 16px; color: #a99ae9; }
.sidebar-nav .vg-text-group:has(.vg-text-variants > li.active) > a,
.sidebar-nav .vg-text-group:has(.vg-text-variants > li[aria-current="page"]) > a { color: #bcc5d7 !important; background: transparent; box-shadow: none; font-weight: 500; }
.vg-text-variants .vg-nav-toc { margin: 3px 0 4px 16px; }

/* Move only the drawer; delay visibility until its closing motion finishes. */
.sidebar { transition: transform 280ms cubic-bezier(.22, 1, .36, 1), visibility 0s 280ms; }
.sidebar-toggle { position: fixed; top: 18px; left: 12px; bottom: auto; width: 32px; height: 32px; max-width: 32px; transition: transform 280ms cubic-bezier(.22, 1, .36, 1); }
.sidebar-toggle .sidebar-toggle-button { top: 0; left: 0; width: 32px; height: 32px; border: 1px solid #2b3246; border-radius: 8px; background: #191e2d; }
.sidebar-toggle:hover .sidebar-toggle-button { background: #262c40; }
.sidebar-toggle span { transition: transform 180ms ease, opacity 180ms ease; }
.sidebar + .content { transition: transform 280ms cubic-bezier(.22, 1, .36, 1), margin-left 280ms cubic-bezier(.22, 1, .36, 1); }
@media (min-width: 48em) {
  body:not(.close) .sidebar { transition-delay: 0s; }
  body:not(.close) .sidebar-toggle { transform: translateX(calc(var(--sidebar-width) - 56px)); }
}
@media (max-width: 47.99em) {
  body.close .sidebar { transition-delay: 0s; box-shadow: 12px 0 36px #0003; }
  body.close .sidebar-toggle { width: 32px; max-width: 32px; transform: translateX(calc(var(--sidebar-width) - 56px)); }
  body.close .sidebar + .content { transform: none; }
}
@supports (interpolate-size: allow-keywords) {
  .vg-nav-toc { interpolate-size: allow-keywords; }
  .vg-nav-toc::details-content { height: 0; overflow: clip; transition: height 220ms cubic-bezier(.22, 1, .36, 1), content-visibility 220ms; transition-behavior: allow-discrete; }
  .vg-nav-toc[open]::details-content { height: auto; }
}

/* Static samples exported from the editor, including its original SVG strokes. */
.markdown-section img.vg-editor-icon { display: inline-block; width: 34px; height: 34px; max-width: none; margin: 0 5px 0 0; border: 0; border-radius: 0; object-fit: contain; vertical-align: middle; }
.markdown-section img.vg-editor-icon--small { width: 28px; height: 28px; }
.markdown-section .vg-icon-table td:first-child { width: 82px; white-space: nowrap; }
.markdown-section .vg-icon-table td:nth-child(2) { width: 29%; }
.markdown-section .vg-icon-table th { text-align: left; }
.markdown-section .vg-icon-table th,
.markdown-section .vg-icon-table td { padding: 10px 12px; }
.vg-icon-caption { color: var(--vg-muted); font-size: 12px; }
.markdown-section .vg-designer-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0 24px; padding-bottom: 12px; border-bottom: 1px solid var(--vg-line); }
.markdown-section .vg-designer-nav a { padding: 7px 12px; border-radius: 7px; color: var(--vg-muted); font-size: 13px; text-decoration: none; transition: color 150ms ease, background-color 150ms ease; }
.markdown-section .vg-designer-nav a:hover { color: var(--vg-ink); background: var(--vg-panel); }
.markdown-section .vg-designer-nav a[aria-current="page"] { color: #8ce0b8; background: #183e36; }
.vg-designer-launch { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 24px 0; padding: 24px; border: 1px solid #3d8b75; border-radius: 12px; background: linear-gradient(110deg, #164e3d 0%, #183b42 55%, #2d2850 100%); }
.vg-designer-launch strong { color: #f1fff8; font-size: 17px; }
.markdown-section .vg-designer-launch p { margin: 7px 0 0; color: #c4e2da; font-size: 13px; }
.markdown-section .vg-designer-open { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 12px 18px; border-radius: 8px; background: linear-gradient(115deg, #8ae9b7 0%, #48cda8 50%, #46bdcf 100%); color: #10251b; font-size: 13px; font-weight: 700; text-decoration: none; transition: filter 150ms ease, box-shadow 150ms ease; }
.markdown-section .vg-designer-open:hover { filter: brightness(1.08); color: #10251b; box-shadow: 0 3px 12px #0002; }
.markdown-section .vg-designer-open:focus-visible { outline-color: #8ce0b8; outline-offset: 4px; }
@media (max-width: 760px) {
  .vg-designer-launch { flex-direction: column; align-items: stretch; gap: 18px; padding: 20px; }
  .markdown-section .vg-icon-table { font-size: 12px; }
  .markdown-section .vg-icon-table th,
  .markdown-section .vg-icon-table td { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar, .sidebar-toggle, .sidebar-toggle span, .sidebar + .content,
  .sidebar-nav li a, .vg-nav-toc summary::before, .vg-nav-toc::details-content,
  .vg-lang::before, .vg-lang button { transition: none !important; }
}
.markdown-section > details { margin: 12px 0 24px; padding: 12px 16px; border: 1px solid var(--vg-line); border-radius: 8px; }
.markdown-section img[width][height]:not(.vg-editor-icon) { height: auto; }
.markdown-section > details > summary { cursor: pointer; color: var(--vg-ink); font-weight: 600; }
.markdown-section > details > summary:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.markdown-section > details[open] > summary { margin-bottom: 16px; }
.markdown-section table { border-radius: 10px; overflow: hidden; font-size: 14px; }
.markdown-section table th, .markdown-section table td { border-color: var(--vg-line); }
/* Stacked mobile tables need room for long Settings labels and asset names. */
@media (max-width: 30em) {
  .markdown-section .table-wrapper tbody td {
    width: auto !important;
    padding: 10px 12px !important;
    overflow-wrap: anywhere;
  }
  .markdown-section .table-wrapper tbody td::before {
    display: block !important;
    float: none !important;
    width: auto !important;
    margin: 0 0 4px !important;
  }
  .markdown-section .table-wrapper code { white-space: normal; overflow-wrap: anywhere; }
}
.markdown-section .vg-benchmark {
  max-width: 100%;
  overflow-x: auto;
  margin: 24px 0 14px;
  border: 1px solid var(--vg-line);
  border-radius: 10px;
}
.vg-benchmark:focus-visible { outline: 2px solid var(--vg-violet); outline-offset: 4px; }
.markdown-section .vg-benchmark table { min-width: 810px; margin: 0; border-radius: 0; font-size: 13px; }
.markdown-section .vg-benchmark th,
.markdown-section .vg-benchmark td { padding: 12px 14px; border-width: 0 0 1px; text-align: right; font-variant-numeric: tabular-nums; }
.markdown-section .vg-benchmark thead th { text-align: center; color: #c1c9dc !important; font-size: 12px; line-height: 1.6; }
.markdown-section .vg-benchmark th:first-child { width: 180px; text-align: left; }
.markdown-section .vg-benchmark tbody th { background: transparent !important; color: var(--vg-ink) !important; font-weight: 500; }
.markdown-section .vg-benchmark :is(th, td):last-child { background: rgba(70, 192, 138, .08) !important; color: #8ce0b8 !important; font-weight: 600; }
.markdown-section .vg-benchmark tbody tr:last-child :is(th, td) { border-bottom: 0; }
.markdown-section pre { max-width: 100%; }

body,
.markdown-section,
.sidebar {
  font-family: var(--base-font-family);
}

.markdown-section code,
.markdown-section pre {
  font-family: var(--code-font-family);
}

.markdown-section h1 {
  letter-spacing: -0.02em;
}

.markdown-section h2 {
  letter-spacing: -0.01em;
  padding-top: 0.4em;
}

.markdown-section img {
  border-radius: 10px;
  border: 1px solid var(--vg-line);
}

:focus-visible {
  outline: 2px solid var(--vg-violet);
  outline-offset: 2px;
}

/* ===== Sidebar brand ===== */
.vg-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--vg-ink);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.vg-brand img {
  width: 36px;
  height: 36px;
  border: 0 !important;
}

.vg-brand small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--vg-muted);
}

/* ===== Language switch (EN / VI) ===== */
.vg-lang {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 40;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border: 1px solid var(--vg-line);
  border-radius: 999px;
  background: rgba(22, 26, 39, 0.92);
  backdrop-filter: blur(6px);
}

.vg-lang::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: var(--vg-violet-deep);
  box-shadow: inset 0 0 0 1px rgba(143, 127, 245, 0.55);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.vg-lang[data-lang="vi"]::before {
  transform: translateX(100%);
}

.vg-lang button {
  position: relative;
  min-width: 42px;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--vg-muted);
  font: 600 13px/1 var(--base-font-family);
  cursor: pointer;
  transition: color 220ms ease;
}

.vg-lang button[aria-pressed="true"] {
  color: #fff;
}

.vg-lang button:hover {
  color: var(--vg-ink);
}

/* ===== Home hero: the page's one orchestrated moment ===== */
.vg-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  margin: 8px 0 26px;
}

.markdown-section .vg-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4.2vw, 2.9rem);
  line-height: 1.12;
}

.vg-hero p {
  margin: 0;
  max-width: 34em;
  font-size: 1.08rem;
  color: var(--vg-muted);
}

.markdown-section .vg-hero-robot {
  width: 132px;
  height: 132px;
  border: 0;
  border-radius: 0;
  filter: drop-shadow(0 0 0 rgba(89, 200, 242, 0));
}

/* Direct launch links stay above the first introduction screenshot. */
.vg-quick-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 28px;
}
.markdown-section a.vg-quick-link {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--launch-color);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--launch-tint), var(--vg-panel));
  color: var(--vg-ink);
  text-decoration: none;
}
.vg-quick-link--designer { --launch-color: var(--vg-green); --launch-tint: #183e36; }
.vg-quick-link--particle { --launch-color: var(--vg-amber); --launch-tint: #403326; }
.vg-quick-link--text { --launch-color: #ac9aff; --launch-tint: #30264c; }
.vg-quick-link--bones { --launch-color: #62dcca; --launch-tint: #193e3c; }
.markdown-section .vg-quick-link img.vg-editor-icon { width: 28px; height: 28px; flex: 0 0 28px; margin: 0; }
.vg-quick-link > span { min-width: 0; overflow-wrap: anywhere; }
.vg-quick-link svg { width: 28px; height: 28px; flex: 0 0 28px; color: var(--launch-color); }
.vg-quick-link strong { display: block; font-size: 1.1rem; line-height: 1.45; }
.vg-quick-link small { display: block; margin-top: 7px; color: #c0c8d8; font-size: .86rem; line-height: 1.65; }
.markdown-section a.vg-quick-link:hover { background: var(--launch-tint); text-decoration: none; }
.markdown-section a.vg-quick-link:focus-visible { outline: 3px solid var(--launch-color); outline-offset: 4px; }
@media (min-width: 761px) and (max-width: 1100px) {
  .vg-quick-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .vg-quick-links { grid-template-columns: 1fr; }
}

.vg-hero-shot {
  position: relative;
  margin: 0 0 30px;
}

.markdown-section .vg-hero-shot img {
  display: block;
  width: 100%;
  border-radius: 12px;
}

.vg-hero-shot figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--vg-muted);
}

@media (prefers-reduced-motion: no-preference) {
  .vg-hero-robot {
    animation: vg-robot-in 600ms cubic-bezier(.22, 1, .36, 1) both;
  }

  .vg-hero h1 {
    --vg-text-x: -14px;
    --vg-text-y: 18px;
    animation: vg-text-glide 820ms 60ms cubic-bezier(.16, 1, .3, 1) both;
  }

  .vg-hero p {
    --vg-text-x: -8px;
    --vg-text-y: 16px;
    animation: vg-text-glide 860ms 180ms cubic-bezier(.16, 1, .3, 1) both;
  }

  .vg-quick-link strong,
  .vg-quick-link small,
  .vg-quick-link .vg-free-badge {
    --vg-text-x: 0px;
    --vg-text-y: 12px;
    animation: vg-text-glide 760ms cubic-bezier(.16, 1, .3, 1) both;
  }

  .vg-quick-link strong { animation-delay: 260ms; }
  .vg-quick-link .vg-free-badge { animation-delay: 320ms; }
  .vg-quick-link small { animation-delay: 380ms; }
  .vg-quick-link:nth-child(2) strong { animation-delay: 320ms; }
  .vg-quick-link:nth-child(2) small { animation-delay: 440ms; }

  /* Text enters independently so the whole article does not fade or move twice. */
  .vg-route-enter > h1 {
    --vg-text-x: -10px;
    --vg-text-y: 14px;
    animation: vg-text-glide 720ms cubic-bezier(.16, 1, .3, 1) both;
  }

  .vg-route-enter:not(:has(.vg-hero)) > p:not(:has(.vg-free-badge)):nth-of-type(-n+2) {
    --vg-text-x: -6px;
    --vg-text-y: 12px;
    animation: vg-text-glide 760ms 100ms cubic-bezier(.16, 1, .3, 1) both;
  }

  .markdown-section img.vg-image-pending {
    opacity: 0;
    clip-path: inset(0 0 100% 0 round 10px);
  }

  .markdown-section img.vg-image-reveal {
    animation: vg-image-wipe 1200ms cubic-bezier(.4, 0, .2, 1) both;
  }
  .vg-hero-shot img.vg-image-reveal { animation-delay: 160ms; }

  .vg-hero-shot figcaption {
    animation: vg-rise 450ms 300ms ease-out both;
  }

}

@keyframes vg-robot-in {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes vg-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes vg-image-wipe {
  from { opacity: .2; clip-path: inset(0 0 100% 0 round 10px); }
  to { opacity: 1; clip-path: inset(0 0 0 0 round 10px); }
}

@keyframes vg-text-glide {
  from { opacity: 0; transform: translate3d(var(--vg-text-x, 0px), var(--vg-text-y, 16px), 0); }
  to { opacity: 1; transform: none; }
}

/* ===== Workspace index: mirrors the toolkit's "Choose your workspace" rows ===== */
.vg-workspaces {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 30px;
}

.markdown-section a.vg-ws {
  display: block;
  padding: 14px 16px 14px 18px;
  border: 1px solid var(--vg-line);
  border-left: 3px solid var(--ws, var(--vg-violet));
  border-radius: 10px;
  background: var(--vg-panel);
  color: var(--vg-ink);
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.markdown-section a.vg-ws:hover {
  text-decoration: none;
  border-color: var(--ws, var(--vg-violet));
  background: #20263a;
}

.vg-ws strong {
  display: block;
  font-size: 1.02rem;
  color: var(--vg-ink);
}

.vg-ws span {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  color: var(--vg-muted);
}

.vg-ws--chat { --ws: var(--vg-violet); }
.vg-ws--flow { --ws: var(--vg-teal); }
.vg-ws--ui { --ws: var(--vg-green); }
.vg-ws--text { --ws: #c58cf0; }
.vg-ws--bones { --ws: #62dcca; }
.vg-ws--fx { --ws: var(--vg-amber); }
.vg-ws--bridge { --ws: var(--vg-cyan); }

/* Narrow screenshots (Editor windows) sit side by side. */
.vg-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  align-items: start;
  margin: 12px 0 22px;
}

.vg-pair figure {
  margin: 0;
}

.vg-pair figcaption {
  margin-top: 6px;
  font-size: 13px;
  color: var(--vg-muted);
}

/* ===== Particle playground embed ===== */
.vg-particle-intro { margin: 0 0 34px; }
.markdown-section .vg-particle-intro h1 { margin: 0 0 14px; padding-right: 50px; font-size: clamp(1.8rem, 3.5vw, 2.75rem); line-height: 1.2; }
.vg-particle-intro > p { max-width: 650px; margin: 0; color: var(--vg-muted); font-size: 16px; }
.vg-particle-facts { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 22px; color: var(--vg-muted); font-size: 13px; }
.vg-particle-facts strong { margin-right: 4px; font-size: 17px; }

.vg-fx {
  margin: 22px 0 24px;
  padding: 20px;
  border: 1px solid var(--vg-line);
  border-radius: 16px;
  background: #111522;
}

.vg-fx-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; color: var(--vg-ink); font-size: 14px; font-weight: 600; }
.vg-fx-badge { color: var(--vg-green); font-size: 12px; font-weight: 500; }
.vg-fx-badge::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: currentColor; }

.vg-fx-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.vg-fx-picker button {
  position: relative;
  min-width: 0;
  padding: 12px 12px 12px 26px;
  border: 1px solid var(--vg-line);
  border-radius: 8px;
  background: #191e2d;
  color: var(--vg-ink);
  font: 500 13px/1.4 var(--base-font-family);
  text-align: left;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.vg-fx-picker button::before { content: ''; position: absolute; top: 18px; left: 12px; width: 5px; height: 5px; border-radius: 50%; background: var(--fx-color, var(--vg-amber)); }
.vg-fx-picker button[data-fx="lightning_strike"] { --fx-color: #82b6ff; }
.vg-fx-picker button[data-fx="portal"] { --fx-color: #b6a2ff; }
.vg-fx-picker button[data-fx="toon_heal_burst"] { --fx-color: #66d9a0; }
.vg-fx-picker button[data-fx="toon_slash"] { --fx-color: #f3d6ac; }
.vg-fx-picker button[data-fx="toon_shield_hit"] { --fx-color: #6bd8ed; }
.vg-fx-picker button[data-fx="toon_smoke_burst"] { --fx-color: #b0b8ca; }
.vg-fx-picker button[data-fx="rain_2d"] { --fx-color: #789fce; }
.vg-fx-picker button span, .vg-fx-picker button small { display: block; }
.vg-fx-picker button small { margin-top: 4px; color: var(--vg-muted); font-size: 11px; font-weight: 400; }

.vg-fx-picker button:hover {
  color: var(--vg-ink);
  border-color: var(--vg-amber);
}

.vg-fx-picker button[aria-pressed="true"] {
  color: #fff;
  border-color: var(--vg-amber);
  background: rgba(224, 162, 74, 0.1);
}

.vg-fx-frame {
  display: block;
  width: 100%;
  height: 500px;
  border: 1px solid var(--vg-line);
  border-radius: 8px;
  background: #080b12;
}

.vg-fx-note {
  margin: 10px 0 0 !important;
  font-size: 12px;
  color: var(--vg-muted);
}

.vg-fx-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 14px; font-size: 12px; color: var(--vg-muted); }
.vg-fx-footer a { flex-shrink: 0; color: var(--vg-ink); }
.markdown-section .vg-fx-guide { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; margin: 24px 0 38px; padding: 0; list-style: none; counter-reset: fx-step; }
.vg-fx-guide li { position: relative; padding-left: 32px; counter-increment: fx-step; }
.vg-fx-guide li::before { content: counter(fx-step); position: absolute; left: 0; top: 0; color: var(--vg-amber); font-size: 16px; }
.vg-fx-guide strong, .vg-fx-guide span { display: block; font-size: 13px; }
.vg-fx-guide span { margin-top: 5px; color: var(--vg-muted); font-size: 12px; }
.vg-texture-sheet { margin: 22px 0; }
.vg-texture-sheet img { display: block; width: 100%; }
.vg-texture-sheet figcaption { margin-top: 8px; color: var(--vg-muted); font-size: 12px; }

@media (min-width: 769px) and (max-width: 1100px) {
  .markdown-section { padding: 48px 28px 28px; }
  .vg-fx-picker { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .vg-fx-frame { height: 720px; }
  .markdown-section .vg-fx-guide { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 760px) {
  .markdown-section { padding: 66px 20px 24px; }
  .vg-fx { padding: 12px; border-radius: 12px; }
  .vg-fx-picker { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .vg-fx-picker button { padding-left: 24px; font-size: 12px; }
  .markdown-section .vg-fx-guide { grid-template-columns: 1fr; gap: 16px; }
  .vg-fx-frame {
    height: 740px;
  }
}

@media (max-width: 760px) {
  .vg-hero {
    grid-template-columns: 1fr;
  }

  .vg-hero-robot {
    order: -1;
    width: 92px !important;
    height: 92px !important;
  }

  .vg-workspaces {
    grid-template-columns: 1fr;
  }

  .vg-lang {
    top: 10px;
    right: 12px;
  }
}
