/* The settings-window hero */
.vg-hero {
  position: relative;
  height: 800px;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
}
.vg-wash { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.vg-ws-0 { stop-color: var(--accent); stop-opacity: .075; }
.vg-ws-1 { stop-color: var(--accent); stop-opacity: .045; }
.vg-ws-2 { stop-color: var(--accent); stop-opacity: .015; }
.vg-wg-0 { stop-color: var(--accent); stop-opacity: .10; }
.vg-wg-1 { stop-color: var(--accent); stop-opacity: 0; }
.vg-star { position: absolute; z-index: 1; width: 22px; height: 22px; color: var(--accent); opacity: .45; pointer-events: none; }
.vg-star--a { top: 56px; left: 47%; }
.vg-star--b { bottom: 96px; left: 41%; width: 16px; height: 16px; opacity: .35; }

.vg-hero-grid {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 44fr) minmax(0, 56fr);
  column-gap: 48px;
  align-items: center;
  padding-left: var(--gutter);
}
.vg-copy { max-width: 560px; padding-bottom: 12px; }
.vg-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 11px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
}
.vg-badge i, .status-dot { width: 8px; height: 8px; flex: none; border-radius: var(--r-dot); background: var(--success); }
.vg-badge i { box-shadow: 0 0 0 4px var(--success-a20); }
.vg-h1 { margin-top: 28px; letter-spacing: var(--track-hero); text-wrap: wrap; }
.vg-h1-line { display: block; }
.vg-h1 em { position: relative; z-index: 0; font-style: normal; color: var(--accent); }
.vg-h1 em::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto -.08em .06em -.06em;
  height: .3em;
  background: var(--accent-a16);
  border-radius: var(--r-edge);
  transform-origin: left center;
}
.vg-lead { margin: 22px 0 0; max-width: 520px; font-size: 17px; line-height: 1.75; color: var(--text-muted); }
.vg-lead strong { color: var(--text); font-weight: 700; }
.vg-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.vg-meta { margin-top: 36px; display: grid; gap: 16px; }
.vg-meta-row { display: flex; align-items: center; gap: 18px; min-width: 0; }
.vg-meta-k { flex: none; width: 64px; font: 500 12px var(--font-mono); color: var(--text-muted); letter-spacing: .02em; }
.vg-plat { min-width: 0; }
.vg-plat ul, .vg-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.vg-plat ul { gap: 10px 24px; }
.vg-plat a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: color var(--ease-ui);
}
.vg-plat a svg { width: 17px; height: 17px; flex: none; color: var(--text-muted); transition: color var(--ease-ui); }
.vg-plat a:hover, .vg-plat a:hover svg { color: var(--accent); }
.vg-chips { gap: 8px; }
.vg-chips li {
  padding: 5px 12px;
  font: 500 12.5px var(--font-mono);
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
}

.vg-stage { position: relative; margin: 8px 0 0; }
.vg-win {
  position: relative;
  width: calc(100% + 64px);
  max-width: 940px;
  background: var(--bg);
  color: var(--text);
  border-radius: var(--r-float);
  box-shadow: var(--shadow-float);
  overflow: hidden;
}
.vg-win-top { position: relative; height: 40px; background: var(--accent-soft); color: var(--text); }
.vg-win-tab {
  position: absolute;
  left: 22px;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 176px;
  height: 28px;
  padding: 0 12px;
  font: 11.5px var(--font-mono);
  color: var(--text-muted);
  background: var(--bg-panel);
  border-radius: var(--r-tab) var(--r-tab) 0 0;
}
.vg-win-tab i { width: 8px; height: 8px; flex: none; border-radius: var(--r-line); background: var(--accent); }
.vg-win-chrome {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 46px;
  padding: 0 18px;
  background: var(--bg-panel);
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.vg-dots { display: flex; gap: 7px; flex: none; }
.vg-dots i { width: 11px; height: 11px; border-radius: var(--r-dot); }
.vg-dots i:nth-child(1) { background: var(--accent); }
.vg-dots i:nth-child(2) { background: var(--success); }
.vg-dots i:nth-child(3) { background: var(--border-strong); }
.vg-addr {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 14px;
  font: 12px var(--font-mono);
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
}
.vg-win-body { display: grid; grid-template-columns: 192px minmax(0, 1fr); }
.vg-side { display: flex; flex-direction: column; padding-block: 16px; border-right: 1px solid var(--border); }
.vg-side-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 18px 14px;
  font: var(--weight-heavy) 14px var(--font-display);
  letter-spacing: -.01em;
}
.vg-side-mark { position: relative; width: 18px; height: 18px; flex: none; border-radius: var(--r-mark); background: var(--accent); }
.vg-side-mark::after { content: ""; position: absolute; inset: 6px; border-radius: var(--r-dot); background: var(--on-accent); }
.vg-menu { list-style: none; margin: 0; padding: 0; }
.vg-menu li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}
.vg-menu svg { width: 16px; height: 16px; flex: none; }
.vg-menu .is-on { color: var(--accent-dark); font-weight: 700; background: var(--accent-wash); }
.vg-menu .is-on::before {
  content: "";
  position: absolute;
  inset: 6px auto 6px 0;
  width: 3px;
  background: var(--accent);
  border-radius: 0 var(--r-edge) var(--r-edge) 0;
}
.vg-side-foot { margin-top: auto; padding: 14px 18px 0; font-size: 11.5px; font-weight: 700; color: var(--accent); border-top: 1px solid var(--border); }

.vg-main { padding: 20px 80px 22px 24px; min-width: 0; }
.vg-main-title { margin: 0 0 14px; font: var(--weight-heavy) 16px var(--font-display); letter-spacing: -.01em; }
.vg-group { margin: 0 0 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: var(--text-muted); }
.vg-rows { border: 1px solid var(--border); border-radius: var(--r-card); }
.vg-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 16px; }
.vg-row + .vg-row { border-top: 1px solid var(--border); }
.vg-row b { display: block; font-size: 13px; font-weight: 700; color: var(--text); }
.vg-row small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--text-muted); }
.vg-sw {
  position: relative;
  flex: none;
  width: 34px;
  height: 20px;
  border-radius: var(--r-pill);
  background: var(--bg-panel-2);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
.vg-sw::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: var(--r-dot);
  background: var(--bg);
  box-shadow: var(--shadow-knob);
}
.vg-sw.is-on { background: var(--accent); box-shadow: none; }
.vg-sw.is-on::after { left: 17px; }
.vg-select {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  min-height: 28px;
  padding: 0 10px 0 12px;
  font: 12px var(--font-mono);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-ctl);
}
.vg-select svg { width: 10px; height: 10px; color: var(--text-muted); flex: none; }
.vg-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  margin-top: 14px;
  padding: 5px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--on-accent);
  background: var(--accent-dark);
  border-radius: var(--r-ctl);
}
.vg-notice svg { width: 14px; height: 14px; flex: none; }
.vg-auth {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 14px;
  padding: 20px 20px 22px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
.vg-auth svg { width: 40px; height: 40px; color: var(--accent); }
.vg-shield-fill { fill: var(--accent-wash); }
.vg-auth p { margin: 10px 0 0; font-size: 13px; font-weight: 700; color: var(--text); }
.vg-auth small { margin-top: 4px; font-size: 11.5px; color: var(--text-muted); }
.vg-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 200px);
  height: 32px;
  margin-top: 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: var(--r-ctl);
}
.vg-next { background: var(--bg-panel); color: var(--text); }
.vg-next-in { padding: 88px var(--gutter) 96px; }
.vg-next h2 { margin-top: 8px; font-size: 30px; }

@media (prefers-reduced-motion: no-preference) {
  .vg-h1-line { animation: vg-rise .62s cubic-bezier(.2, .7, .2, 1) .04s both; }
  .vg-h1-line + .vg-h1-line { animation-delay: .2s; }
  .vg-h1 em::after { animation: vg-sweep .42s cubic-bezier(.3, .7, .2, 1) .7s both; }
}
@keyframes vg-rise { from { opacity: 0; transform: translateY(.42em); } }
@keyframes vg-sweep { from { transform: scaleX(0); } }

@media (max-width: 1180px) {
  .vg-win-body { grid-template-columns: 156px minmax(0, 1fr); }
}
@media (max-width: 1080px) {
  .vg-hero { height: auto; }
  .vg-hero-grid { grid-template-columns: minmax(0, 1fr); row-gap: 48px; padding: 56px var(--gutter) 80px; }
  .vg-win { width: 100%; max-width: none; }
  .vg-main { padding-right: 24px; }
  .vg-star--a, .vg-star--b { display: none; }
}
@media (max-width: 640px) {
  .vg-h1 { letter-spacing: var(--track-title); }
  .vg-lead { font-size: 16px; }
  .vg-cta { gap: 10px; margin-top: 24px; }
  .vg-cta .vg-btn { padding-inline: 12px; }
  .vg-meta { margin-top: 26px; }
  .vg-meta-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .vg-chips { align-self: stretch; justify-content: center; }
  .vg-plat ul { gap: 10px 16px; }
  .vg-win-body { grid-template-columns: minmax(0, 1fr); }
  .vg-side { display: none; }
  .vg-main { padding: 16px; }
  .vg-row { gap: 8px; padding-inline: 10px; }
  .vg-select { gap: 4px; padding-inline: 5px; }
  .vg-next h2 { font-size: 24px; }
}

/* Tabs: underline strip and the settings drawer */
.tabs [role="tablist"], .tab-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.tabs [role="tab"], .tab-strip [role="tab"] {
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: var(--bg);
  color: var(--text);
  font-weight: 700;
  text-align: start;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.tabs [role="tab"]:hover, .tab-strip [role="tab"]:hover { color: var(--accent-dark); background: var(--accent-wash); }
.tabs [role="tab"][aria-selected="true"], .tab-strip [role="tab"][aria-selected="true"] {
  border-bottom-color: var(--accent);
  color: var(--accent-dark);
}
[role="tabpanel"] { min-width: 0; }

.settings-deck {
  display: grid;
  grid-template-columns: minmax(200px, .9fr) minmax(0, 3fr);
  align-items: start;
  gap: 14px;
}
.settings-deck > * { min-width: 0; }
.settings-deck .settings-tabs {
  display: grid;
  gap: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg);
  color: var(--text);
}
.settings-deck .settings-tabs [role="tab"] {
  position: relative;
  min-height: 76px;
  padding: 12px 16px;
  border: 0;
  border-inline-start: 3px solid transparent;
  border-radius: var(--r-ctl);
}
.settings-deck .settings-tabs [role="tab"] + [role="tab"] { border-top: 1px solid var(--border); }
.settings-deck .settings-tabs [role="tab"][aria-selected="true"] {
  border-inline-start-color: var(--accent);
  background: var(--accent-wash);
  color: var(--accent-dark);
}
.settings-tabs [role="tab"]::before {
  content: "";
  display: block;
  width: 16px;
  height: 3px;
  margin-bottom: 6px;
  border-radius: var(--r-line);
  background: var(--success);
}
.tab-label { display: block; font: 500 11px var(--font-mono); color: var(--text-muted); }
.tab-name { display: block; margin-top: 4px; font: var(--weight-heavy) 16px/1.3 var(--font-display); }
.settings-panel { padding: clamp(18px, 4vw, 48px); }
.settings-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 305px;
}
.settings-detail > * { min-width: 0; }
.settings-copy p { line-height: 1.8; }
.setting-path { display: block; margin-top: 20px; font-size: 13px; line-height: 1.7; }
.settings-art { display: block; width: min(100%, 360px); margin-inline: auto; color: var(--accent-dark); }
.art-blob { fill: var(--accent-soft); }
.art-paper { fill: var(--bg); }
.art-ink { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.art-dashes { stroke-dasharray: 2 5; opacity: .55; }

/* Long-form navigation, disclosure and editorial blocks */
.toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin-block: 18px 28px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg);
  color: var(--text);
}
.toc--sticky { position: sticky; top: 0; z-index: 2; }
.toc a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 6px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg);
  color: var(--text);
}
.faq-item + .faq-item { margin-top: 10px; }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 12px 18px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex: none; color: var(--accent-dark); font-family: var(--font-mono); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { margin-inline: 18px; padding-block: 12px 18px; border-top: 1px solid var(--border); line-height: 1.75; }
.faq-answer > :first-child { margin-top: 0; }
.faq-answer > :last-child { margin-bottom: 0; }
.callout {
  margin: 1.4rem 0;
  padding: 16px 18px;
  border-inline-start: 3px solid var(--accent);
  border-radius: 0 var(--r-ctl) var(--r-ctl) 0;
  background: var(--accent-wash);
  color: var(--text);
  line-height: 1.75;
}
.callout p { margin: .4em 0 0; }

.term-card { border-block-start: 2px solid var(--accent); }
.term-card h3 { margin-block: 10px 0; }
.client-card { display: grid; gap: 16px; align-content: start; }
.client-card > * { min-width: 0; margin-block: 0; }
.client-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.client-head > div { min-width: 0; }
.client-icon { width: 56px; height: 56px; flex-shrink: 0; }
.client-actions, .tag-row, .button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tag {
  display: inline-block;
  max-width: 100%;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  background: var(--bg-panel-2);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.tag--primary { background: var(--accent-dark); color: var(--on-accent); }
.tag--recommended { background: var(--accent-wash); color: var(--accent-dark); }
.tag--retired { background: var(--bg-panel); color: var(--text-muted); border: 1px solid var(--border-strong); }
.post-card h3 { margin-top: 12px; }
.post-card h3 a { color: var(--text); text-decoration: none; }
.post-card h3 a:hover { color: var(--accent-dark); text-decoration: underline; }
.post-meta { color: var(--text-muted); font: 500 12px var(--font-mono); }
.download-note { border-inline-start: 3px solid var(--accent); }
.download-note h2 { font-size: var(--size-h3); }
.download-note .button { margin-top: 8px; }

.dl-fab {
  position: fixed;
  z-index: var(--z-fab);
  inset: auto max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  max-width: calc(100% - 40px);
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: var(--r-ctl);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.dl-fab svg { width: 18px; height: 18px; flex-shrink: 0; }
.dl-fab:hover { background: var(--accent-dark); color: var(--on-accent); }
.has-dl-fab .site-foot { padding-bottom: max(84px, calc(68px + env(safe-area-inset-bottom))); }

.table-scroll, .prose table, .article-body table, .doc-body table {
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}
.prose table, .article-body table, .doc-body table { display: block; }
.table-scroll > table { display: table; overflow: visible; max-width: none; }
.data-table, .prose table, .article-body table, .doc-body table { border-collapse: collapse; width: 100%; }
:is(.data-table, .prose table, .article-body table, .doc-body table) :is(th, td) {
  min-width: 7em;
  padding: 11px 14px;
  text-align: start;
  vertical-align: top;
  border: 1px solid var(--border);
  overflow-wrap: normal;
  word-break: normal;
}
:is(.data-table, .prose table, .article-body table, .doc-body table) th { background: var(--bg-panel-2); color: var(--text); }
:is(.data-table, .prose table, .article-body table, .doc-body table) td { background: var(--bg); color: var(--text); }
.data-table caption { text-align: start; padding-bottom: 8px; font-weight: 700; }

@media (max-width: 768px) {
  .settings-deck, .settings-detail { grid-template-columns: minmax(0, 1fr); }
  .settings-detail { min-height: 0; }
  .settings-art { max-width: 290px; }
  .toc--sticky { position: static; }
}
@media (max-width: 640px) {
  .tag-row { justify-content: flex-start; }
}

/* Static preview only */
.preview-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 146px), 1fr));
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.preview-swatches li { min-width: 0; font-size: 13px; }
.preview-swatch {
  display: block;
  min-height: 48px;
  margin-bottom: 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-ctl);
  background: var(--sample);
  color: var(--text);
}
.sw-bg { --sample: var(--bg); }
.sw-panel { --sample: var(--bg-panel); }
.sw-panel2 { --sample: var(--bg-panel-2); }
.sw-border { --sample: var(--border); }
.sw-strong { --sample: var(--border-strong); }
.sw-accent { --sample: var(--accent); }
.sw-dark { --sample: var(--accent-dark); }
.sw-soft { --sample: var(--accent-soft); }
.sw-wash { --sample: var(--accent-wash); }
.sw-a10 { --sample: var(--accent-a10); }
.sw-a16 { --sample: var(--accent-a16); }
.sw-text { --sample: var(--text); }
.sw-muted { --sample: var(--text-muted); }
.sw-faint { --sample: var(--text-faint); }
.sw-success { --sample: var(--success); }
.sw-s20 { --sample: var(--success-a20); }
.sw-warn { --sample: var(--warn); }
.sw-error { --sample: var(--error); }
.sw-on { --sample: var(--on-accent); }
.sw-veil { --sample: var(--veil); }
.preview-display { font: var(--weight-heavy) var(--size-h1)/1.2 var(--font-display); letter-spacing: var(--track-title); }
.preview-type > * { margin-block: 12px; }
.preview-type > :first-child { margin-top: 0; }