.vlm-topbar--solid {
  background: rgba(11, 16, 32, .96);
  border-bottom-color: rgba(255, 255, 255, .08);
  box-shadow: 0 8px 30px rgba(3, 8, 16, .35);
}

.vlm-doc-head {
  background: var(--hero-bg);
  color: var(--hero-ink);
  padding: 44px 0 0;
  position: relative;
  overflow: hidden;
}
.vlm-doc-head::after {
  content: "";
  position: absolute;
  right: -180px;
  top: -220px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: inset 0 0 0 60px rgba(255, 255, 255, .02);
  pointer-events: none;
}
.vlm-doc-head-body { position: relative; z-index: 1; max-width: 780px; }
.vlm-doc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  letter-spacing: .8px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--hero-eyebrow);
  margin-bottom: 14px;
}
.vlm-doc-title {
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -.02em;
  margin-bottom: 14px;
}
.vlm-doc-lede { color: var(--hero-muted); font-size: 16px; line-height: 1.62; max-width: 66ch; }
.vlm-doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--hero-soft);
}
.vlm-doc-meta b { color: var(--hero-ink); font-weight: 600; }
.vlm-doc-meta a { color: var(--hero-link); font-weight: 600; }
.vlm-doc-meta a:hover { color: #fff; }

.vlm-doc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 30px;
  position: relative;
  z-index: 1;
}
.vlm-doc-tab {
  padding: 11px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: #c9d4e3;
  text-decoration: none;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  transition: background .15s ease, color .15s ease;
}
.vlm-doc-tab:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.vlm-doc-tab[aria-current="page"] {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--line);
  font-weight: 700;
}
.vlm-doc-tab[aria-current="page"]:hover { background: var(--bg); color: var(--ink); }

.vlm-doc-notice {
  background: var(--amber-soft);
  border: 1px solid #e8cf94;
  border-left: 4px solid var(--warning);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 32px 0 0;
  font-size: 13.5px;
  line-height: 1.62;
  color: #5d3f10;
}
.vlm-doc-notice b { color: #4a3208; }
.vlm-doc-note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--slate);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin: 32px 0 0;
  font-size: 13.5px;
  line-height: 1.62;
  color: var(--muted);
}
.vlm-doc-note p { margin: 0; }
.vlm-doc-note p + p { margin-top: 6px; }
.vlm-doc-note a { color: var(--brand-dark); font-weight: 600; }
.vlm-doc-note b { color: var(--ink); font-weight: 700; }
.vlm-doc-notice a { color: #4a3208; font-weight: 600; }

.vlm-doc-layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding: 36px 0 64px;
}

.vlm-toc { position: sticky; top: calc(var(--topbar-h) + 24px); }
.vlm-toc-title {
  font-size: 10.5px;
  letter-spacing: .8px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}
.vlm-toc-list { display: flex; flex-direction: column; max-height: calc(100vh - var(--topbar-h) - 120px); overflow-y: auto; }
.vlm-toc-list a {
  display: block;
  padding: 6px 10px 6px 12px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.vlm-toc-list a:hover { color: var(--ink); background: var(--surface-soft); }
.vlm-toc-list a.is-active {
  color: var(--brand-dark);
  border-left-color: var(--electric);
  background: var(--accent-soft);
  font-weight: 600;
}

.vlm-doc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  padding: 44px 52px 52px;
  max-width: 78ch;
}
.vlm-doc-section { scroll-margin-top: calc(var(--topbar-h) + 24px); }
.vlm-doc-section + .vlm-doc-section { margin-top: 38px; padding-top: 34px; border-top: 1px solid var(--line); }
.vlm-doc h2 {
  font-size: 19px;
  letter-spacing: -.01em;
  margin-bottom: 14px;
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.vlm-doc-num {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--electric);
  flex: none;
  padding-top: 2px;
}
.vlm-doc h3 {
  font-size: 15px;
  margin: 26px 0 10px;
  color: var(--ink);
}
.vlm-doc p { font-size: 15px; line-height: 1.75; color: #2b3640; }
.vlm-doc p + p { margin-top: 14px; }
.vlm-doc .vlm-doc-lead-in { font-weight: 600; color: var(--ink); }
.vlm-doc strong { font-weight: 700; color: var(--ink); }
.vlm-doc a { text-decoration-thickness: 1px; text-underline-offset: 2px; }

.vlm-doc-list { margin: 14px 0 0; display: flex; flex-direction: column; gap: 10px; }
.vlm-doc-list > li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.7;
  color: #2b3640;
}
.vlm-doc-list > li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}
.vlm-doc-list--plain > li { padding-left: 0; }
.vlm-doc-list--plain > li::before { display: none; }

.vlm-doc-defs { margin: 16px 0 0; display: flex; flex-direction: column; gap: 14px; }
.vlm-doc-defs > div {
  border-left: 2px solid var(--line-strong);
  padding-left: 16px;
}
.vlm-doc-defs dt { font-weight: 700; font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.vlm-doc-defs dd { margin: 0; font-size: 14.5px; line-height: 1.7; color: #2b3640; }

.vlm-doc-caps {
  font-size: 13.5px;
  line-height: 1.7;
  letter-spacing: .01em;
  color: #2b3640;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.vlm-doc-caps + .vlm-doc-caps { margin-top: 12px; }

.vlm-doc-callout {
  border: 1px solid var(--line);
  border-left: 3px solid var(--electric);
  background: var(--surface-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.7;
  color: #2b3640;
}
.vlm-doc-callout--ai { border-left-color: var(--ai-mid); background: var(--ai-soft); border-color: var(--ai-line); }

.vlm-doc-table-wrap { margin-top: 18px; overflow-x: auto; }
.vlm-doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.55;
  min-width: 520px;
}
.vlm-doc-table th {
  text-align: left;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 0 14px 10px 0;
  border-bottom: 1px solid var(--line-strong);
  vertical-align: bottom;
}
.vlm-doc-table td {
  padding: 12px 14px 12px 0;
  border-bottom: 1px solid var(--line);
  color: #2b3640;
  vertical-align: top;
}
.vlm-doc-table tr:last-child td { border-bottom: 0; }
.vlm-doc-table td:first-child { font-weight: 600; color: var(--ink); }
.vlm-doc-table td:first-child, .vlm-doc-table td:last-child { white-space: nowrap; }
.vlm-doc-table .vlm-doc-td-wrap { white-space: normal; }
.vlm-doc-table--stack { min-width: 0; }
.vlm-doc-table--stack th:nth-child(1) { width: 30%; }
.vlm-doc-table--stack th:nth-child(2) { width: 27%; }
.vlm-doc-table--stack td:first-child, .vlm-doc-table--stack td:last-child { white-space: normal; }

.vlm-doc-foot {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.vlm-doc-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 26px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand-dark);
  text-decoration: none;
}
.vlm-doc-back:hover { text-decoration: underline; }

.vlm-totop {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 30;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(11, 16, 32, .62);
  color: #fff;
  box-shadow: 0 10px 28px rgba(3, 8, 16, .22);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(.92);
  transition: opacity .6s cubic-bezier(.2, .8, .2, 1), transform .6s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .6s, background .2s ease, color .2s ease;
}
.vlm-totop.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity .6s cubic-bezier(.2, .8, .2, 1), transform .6s cubic-bezier(.2, .8, .2, 1), visibility 0s, background .2s ease, color .2s ease; }
.vlm-totop svg { display: block; transition: transform .2s ease; }
.vlm-totop:focus-visible { outline: 2px solid var(--electric); outline-offset: 3px; border-radius: 999px; }
@media (hover: hover) {
  .vlm-totop:hover { background: var(--electric); color: #061018; }
  .vlm-totop:hover svg { transform: translateY(-2px); }
}
@media (max-width: 760px) {
  .vlm-totop { width: 44px; height: 44px; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); }
  body:has(> .vlm-langnote) .vlm-totop { opacity: 0; visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .vlm-totop, .vlm-totop.is-visible { transform: none; transition: opacity .2s linear, visibility 0s; }
}

@media (max-width: 960px) {
  .vlm-doc-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 28px; }
  .vlm-toc {
    position: static;
    margin-bottom: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px 20px;
  }
  .vlm-toc-list { max-height: none; }
  .vlm-doc { padding: 30px 24px 36px; max-width: none; }
  .vlm-doc-head { padding-top: 32px; }
}

@media (max-width: 700px) {
  .vlm-doc-tabs {
    gap: 8px;
    margin-top: 24px;
    padding-bottom: 22px;
  }
  .vlm-doc-tab {
    padding: 8px 14px;
    font-size: 12.5px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-bottom: 1px solid rgba(255, 255, 255, .22);
  }
  .vlm-doc-tab[aria-current="page"] {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .38);
    color: #fff;
  }
  .vlm-doc-tab[aria-current="page"]:hover { background: rgba(255, 255, 255, .16); color: #fff; }
}

@media (max-width: 700px) {
  .vlm-doc-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .vlm-doc-table--stack, .vlm-doc-table--stack tbody, .vlm-doc-table--stack tr, .vlm-doc-table--stack td { display: block; width: auto; }
  .vlm-doc-table--stack tr { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .vlm-doc-table--stack tr:first-child { padding-top: 4px; }
  .vlm-doc-table--stack tr:last-child { border-bottom: 0; }
  .vlm-doc-table--stack td { padding: 0; border-bottom: 0; }
  .vlm-doc-table--stack td:first-child { font-size: 14.5px; margin-bottom: 10px; }
  .vlm-doc-table--stack td + td { margin-top: 8px; }
  .vlm-doc-table--stack td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-family: var(--font-display); font-size: 10.5px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
}

@media (max-width: 560px) {
  .vlm-doc h2 { display: block; }
  .vlm-doc-num { display: block; padding: 0 0 4px; }
}

@media print {
  .vlm-totop { display: none; }
  .vlm-topbar, .vlm-toc, .vlm-doc-tabs, .vlm-footer, .vlm-doc-back { display: none; }
  .vlm-doc-head { background: none; color: #000; padding: 0; }
  .vlm-doc-head::after { display: none; }
  .vlm-doc-title, .vlm-doc-meta b { color: #000; }
  .vlm-doc-lede, .vlm-doc-meta { color: #333; }
  .vlm-doc-eyebrow { color: #555; }
  .vlm-doc-layout { display: block; padding: 0; }
  .vlm-doc { border: 0; box-shadow: none; padding: 0; max-width: none; }
  .vlm-doc-section + .vlm-doc-section { break-before: auto; }
  .vlm-doc h2 { break-after: avoid; }
  .vlm-doc-notice, .vlm-doc-note { background: none; border: 1px solid #999; color: #000; }
}
