/* Reference layout uses the shared VGA theme in /style.css. */
.zscripter-page .nav-bar { flex-wrap: wrap; height: auto; min-height: 36px; }
.reference-languages { display: flex; flex-wrap: wrap; gap: 4px; }
.reference-languages a[aria-current="page"] { background: var(--vga-blue); color: var(--vga-white); }
.reference-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 4px; align-items: start; }
.reference-sidebar { position: sticky; top: 4px; }
.reference-sidebar .btn { display: block; white-space: normal; line-height: 1.22; }
.reference-article { min-width: 0; }
.reference-topic { scroll-margin-top: 4px; }
.reference-topic h4, .reference-topic h5, .reference-topic h6 { margin: 14px 0 8px; color: var(--vga-white); font: inherit; }
.reference-section + .reference-section { margin-top: 14px; }
.reference-subtitle { color: var(--vga-white); }
.reference-beta { margin: 12px 0; padding: 8px 10px; background: var(--vga-black); color: var(--vga-success); }
.reference-table-wrap { margin: 8px 0 12px; }
.reference-table { min-width: 0; table-layout: auto; }
.reference-code { margin: 12px 0; }
.reference-code figcaption { margin-bottom: 8px; color: var(--vga-white); }
.reference-code pre { margin: 0; padding: 10px; overflow: auto; border: 2px solid var(--vga-blue); background: var(--vga-black); color: var(--vga-success); line-height: 1.22; }
.reference-screenshot { margin: 14px 0; }
.reference-screenshot img { display: block; width: min(100%, 440px); height: auto; border: 2px solid var(--vga-blue); }
.reference-screenshot figcaption { margin-top: 8px; }
.reference-screenshot figcaption a { display: block; margin-top: 4px; }
.reference-back { margin-top: 10px; }
.license-detail { margin: 10px 12px; overflow-wrap: anywhere; }
.license-resources { margin: 12px 0 24px; padding-left: 24px; }
.license-resources a { overflow-wrap: anywhere; }
.zscripter-screenshots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 14px; padding: 12px; }
.zscripter-screenshots figure { margin: 0; min-width: 0; }
.zscripter-screenshots a { display: block; }
.zscripter-screenshots a:focus-visible { outline: 2px dashed var(--vga-blue); outline-offset: 4px; }
.zscripter-screenshots img { display: block; width: 100%; height: auto; }
.zscripter-screenshots figcaption { margin-top: 8px; text-align: center; line-height: 1.22; }
@media (max-width: 720px) {
  .reference-layout { grid-template-columns: 1fr; }
  .reference-sidebar { position: static; }
  .reference-sidebar nav { display: flex; flex-wrap: wrap; gap: 4px; }
}
@media print {
  .nav-bar, .reference-sidebar, .reference-back, .reference-languages { display: none; }
  .reference-layout { display: block; }
  .reference-topic { break-before: page; }
  .reference-screenshot img { max-height: 500px; width: auto; max-width: 100%; }
}

.reference-heading .zscripter-callout { width: fit-content; max-width: 100%; box-sizing: border-box; }
