.stage {
  position: relative;
  padding-top: 30px;
  padding-bottom: 88px;
  overflow: hidden;
  background: var(--bg-panel-2);
  color: var(--text);
}
.glyphs { position: absolute; inset: 0; font-family: var(--font-mono); font-size: 12px; line-height: 24px; letter-spacing: .14em; pointer-events: none; user-select: none; }
.glyphs p { margin: 0; white-space: pre; }
.glyph-col { position: absolute; top: 2px; }
.glyph-col--l { left: 14px; text-align: left; }
.glyph-col--r { right: 14px; text-align: right; }
.glyph-top { position: absolute; top: 3px; left: 16%; right: 16%; display: flex; justify-content: space-between; }
.g1 { color: var(--glyph-1); }
.g2 { color: var(--glyph-2); }
.g3 { color: var(--glyph-3); }
.g4 { color: var(--glyph-4); }
.win {
  position: relative;
  z-index: 1;
  width: 92%;
  max-width: 1240px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-win);
  background: var(--bg-panel);
  color: var(--text);
  box-shadow: var(--shadow-win);
  text-align: left;
}
.win-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 40px; padding-inline: 16px; border-bottom: 1px solid var(--border); background: var(--chrome-bg); color: var(--text-muted); }
.win-dots { display: flex; gap: 7px; }
.win-dots i { display: block; width: 11px; height: 11px; flex: none; border-radius: var(--r-round); background: var(--chrome-dot); }
.win-title { color: var(--text-muted); font-size: 12.5px; letter-spacing: .01em; }
.win-body { display: grid; grid-template-columns: 216px minmax(0, 1fr) 372px; height: 560px; }
.win-side { padding: 16px 10px; border-right: 1px solid var(--border); background: var(--surface-muted); color: var(--text-muted); }
.side-head { display: flex; align-items: baseline; gap: 8px; padding: 2px 10px 10px; font-size: 13.5px; font-weight: 500; color: var(--text); }
.side-head small { color: var(--text-faint); font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; }
.side-label { padding: 12px 10px 6px; color: var(--text-faint); font-size: 11.5px; letter-spacing: .04em; }
.side-item { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 6px 10px; border-radius: var(--r-ctl); color: var(--text-muted); font-size: 13.5px; }
.side-item svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.side-item.is-current { background: var(--surface-active); color: var(--text); }
.win-main { padding: 18px 26px; }
.main-head { display: flex; align-items: baseline; justify-content: space-between; padding-inline: 12px; font-size: 16px; font-weight: 500; letter-spacing: -.01em; }
.main-head small { color: var(--text-faint); font-family: var(--font-mono); font-size: 10.5px; font-weight: 400; letter-spacing: .14em; }
.set-label { margin: 16px 0 4px; padding-inline: 12px; color: var(--text-faint); font-size: 11.5px; letter-spacing: .06em; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 50px; padding: 7px 12px; border-bottom: 1px solid var(--border-soft); }
.set-row.is-selected { border-bottom-color: var(--clear); border-radius: var(--r-ctl); background: var(--accent-wash); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent); }
.set-t { color: var(--text); font-size: 13.5px; line-height: 1.4; }
.set-s { margin-top: 1px; color: var(--text-muted); font-size: 12px; line-height: 1.4; }
.tg { position: relative; flex: none; width: 32px; height: 18px; border-radius: var(--r-pill); background: var(--surface-active); box-shadow: inset 0 0 0 1px var(--border); }
.tg::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: var(--r-round); background: var(--bg-panel); box-shadow: var(--shadow-knob); }
.tg.is-on { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); box-shadow: none; }
.tg.is-on::after { transform: translateX(14px); }
.seg { display: inline-flex; flex: none; gap: 2px; padding: 2px; border: 1px solid var(--border); border-radius: var(--r-ctl); background: var(--surface-muted); color: var(--text-muted); }
.seg span { padding: 4px 11px; border-radius: var(--r-segment); color: var(--text-muted); font-size: 12.5px; }
.seg .is-on { background: var(--bg-panel); color: var(--accent-dark); box-shadow: 0 0 0 1px var(--accent-ring); }
.win-route { padding: 18px 22px; border-left: 1px solid var(--border); background: var(--bg-panel); color: var(--text); }
.route-head { display: flex; align-items: baseline; justify-content: space-between; font-size: 14px; font-weight: 500; }
.route-head small { color: var(--text-faint); font-family: var(--font-mono); font-size: 10.5px; font-weight: 400; letter-spacing: .1em; }
.field-label { margin: 16px 0 6px; color: var(--text-muted); font-size: 12px; }
.field { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--r-ctl); background: var(--surface-muted); color: var(--text); font-family: var(--font-mono); font-size: 12.5px; }
.field .k { color: var(--text-muted); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 18px 0 8px; color: var(--text-muted); font-size: 11.5px; }
.legend-title { margin-right: auto; font-size: 12px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.dot { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: var(--r-round); }
.dot--direct { background: var(--success); box-shadow: 0 0 0 3px var(--success-ring); }
.dot--proxy { background: var(--accent); box-shadow: 0 0 0 3px var(--proxy-ring); }
.dot--block { background: var(--error); box-shadow: 0 0 0 3px var(--error-ring); }
.rules { margin: 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: var(--r-ctl); }
.rule { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 10px 12px; border-top: 1px solid var(--border-soft); color: var(--text); font-family: var(--font-mono); font-size: 12.5px; }
.rule:first-child { border-top: 0; }
.rule-tag { margin-left: auto; color: var(--text-muted); font-size: 11.5px; letter-spacing: .04em; }
.route-note { margin: 12px 0 0; color: var(--text-muted); font-size: 12px; line-height: 1.55; }

[role="tablist"] { display: flex; flex-wrap: wrap; gap: 8px; }
[role="tab"] {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-ctl);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
}
[role="tab"][aria-selected="true"] { border-color: var(--accent); background: var(--bg-panel-2); color: var(--accent-dark); }
[role="tabpanel"] { min-width: 0; margin-top: 24px; }
.feature-band { overflow-x: clip; padding-top: var(--section-space); padding-bottom: var(--section-space); background: var(--bg-panel-2); color: var(--text); }
.feature-desk { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; }
.feature-index[role="tablist"] { flex-direction: column; gap: 4px; }
.feature-index [role="tab"] { position: relative; width: 100%; padding: 18px 20px; text-align: left; border: 0; border-radius: 0; background: var(--clear); color: var(--text-muted); }
.feature-index [role="tab"][aria-selected="true"] { background: var(--bg-panel-2); color: var(--accent-dark); }
.feature-index [role="tab"][aria-selected="true"]::before { content: ""; position: absolute; inset-block: 14px; left: 0; width: 2px; background: var(--accent); }
.tab-caption { display: block; margin-top: 6px; color: var(--text-muted); font-family: var(--font-body); font-size: 14px; }
.feature-window { width: 100%; }
.feature-window [role="tabpanel"] { margin: 0; }
.feature-content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding: 40px; }
.feature-content p { color: var(--text-muted); line-height: 1.9; }

.toc {
  position: sticky;
  top: 16px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 16px 20px;
  margin-bottom: 40px;
  border: 1px solid var(--border);
  border-radius: var(--r-ctl);
  background: var(--bg);
  color: var(--text);
}
.toc a { padding-block: 6px; color: var(--text-muted); font-size: 13px; text-decoration: none; }
.toc a:hover, .toc a[aria-current] { color: var(--accent-dark); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { position: relative; padding: 24px 40px 24px 0; list-style: none; color: var(--text); font-size: 17px; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 8px; top: 24px; color: var(--accent-dark); font-family: var(--font-mono); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { max-width: 780px; padding-bottom: 24px; color: var(--text-muted); line-height: 1.85; }
.faq-answer p:last-child { margin-bottom: 0; }
.term-card { padding: 28px 0; border-top: 1px solid var(--border); }
.term-card h3 { margin-bottom: 12px; }
.term-category { display: block; margin-bottom: 10px; color: var(--text-muted); font-family: var(--font-mono); font-size: 12px; }
.term-card p { color: var(--text-muted); line-height: 1.8; }
.client-card { position: relative; padding: 32px; border: 1px solid var(--border); border-radius: var(--r-win); background: var(--bg-panel); color: var(--text); }
.client-head { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.client-head h3 { margin: 0; }
.app-icon { width: 56px; height: 56px; flex-shrink: 0; }
.client-detail { color: var(--text-muted); line-height: 1.8; }
.client-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 24px; }
.badge, .tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: var(--r-ctl);
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.badge--primary { border-color: var(--accent-ring); background: var(--bg-panel-2); color: var(--accent-dark); }
.badge--recommended { background: var(--bg-panel); color: var(--text); }
.badge--retired { background: var(--surface-active); color: var(--text-muted); }
.article-card { display: flex; flex-direction: column; padding-block: 28px; border-top: 1px solid var(--border); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 20px; color: var(--text-muted); font-family: var(--font-mono); font-size: 12px; }
.article-card h3 { margin-bottom: 16px; font-size: 23px; line-height: 1.5; }
.article-card h3 a { color: var(--text); text-decoration: none; }
.article-card h3 a:hover { color: var(--accent-dark); }
.article-card p { color: var(--text-muted); line-height: 1.8; }
.article-card > .btn-text { align-self: flex-start; margin-top: auto; }
.callout { margin: 32px 0; padding: 22px 24px; border: 1px solid var(--border); border-left: 2px solid var(--accent); border-radius: var(--r-ctl); background: var(--bg-panel-2); color: var(--text); line-height: 1.85; }
.callout p:last-child { margin-bottom: 0; }
.callout-title { display: block; margin-bottom: 8px; font-weight: 500; }
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
.data-table th, .data-table td, .prose th, .prose td {
  min-width: 7em;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  overflow-wrap: normal;
  word-break: normal;
  vertical-align: top;
}
.data-table th, .prose th { background: var(--surface-muted); color: var(--text); font-weight: 500; }
.data-table td, .prose td { background: var(--bg-panel); color: var(--text-muted); }
.prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; min-width: 0; border-collapse: collapse; }
.data-table code, .prose table code { overflow-wrap: anywhere; }
.download-guide { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin-top: 56px; padding: 28px; border: 1px solid var(--border); border-radius: var(--r-win); background: var(--bg-panel-2); color: var(--text); }
.download-guide h3 { margin-bottom: 8px; }
.download-guide p { margin-bottom: 0; color: var(--text-muted); }
.dl-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 40px);
  min-height: 48px;
  padding: 14px 18px;
  border: 1px solid var(--text);
  border-radius: var(--r-ctl);
  background: var(--text);
  color: var(--bg-panel);
  font-family: var(--font-mono);
  font-size: 12px;
  text-decoration: none;
}
.dl-fab:hover { background: var(--button-hover); color: var(--bg-panel); }
.has-dl-fab .site-footer { padding-bottom: 100px; }

.swatch-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.swatch { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--r-ctl); overflow: hidden; }
.swatch-sample { display: block; height: 64px; border-bottom: 1px solid var(--border); }
.swatch code { padding: 10px; font-size: 11px; }
.swatch--bg { background: var(--bg); color: var(--text); }
.swatch--panel { background: var(--bg-panel); color: var(--text); }
.swatch--panel2 { background: var(--bg-panel-2); color: var(--text); }
.swatch--border { background: var(--border); color: var(--text); }
.swatch--soft { background: var(--border-soft); color: var(--text); }
.swatch--accent { background: var(--accent); color: var(--text); }
.swatch--accent-dark { background: var(--accent-dark); color: var(--bg-panel); }
.swatch--text { background: var(--text); color: var(--bg-panel); }
.swatch--muted { background: var(--text-muted); color: var(--bg-panel); }
.swatch--faint { background: var(--text-faint); color: var(--text); }
.swatch--success { background: var(--success); color: var(--text); }
.swatch--warn { background: var(--warn); color: var(--text); }
.swatch--error { background: var(--error); color: var(--text); }
.swatch--surface { background: var(--surface-muted); color: var(--text); }
.swatch--active { background: var(--surface-active); color: var(--text); }
.swatch--dot { background: var(--chrome-dot); color: var(--text); }
.preview-title { margin-bottom: 40px; }
.preview-group { margin-top: 40px; }
.preview-type { max-width: 840px; }
.preview-type h2 { font-size: 40px; }
.preview-type h3 { font-size: 24px; }

@media (max-width: 1100px) {
  .win-body { grid-template-columns: 200px minmax(0, 1fr); }
  .win-route { display: none; }
  .feature-desk { gap: 28px; grid-template-columns: 200px minmax(0, 1fr); }
  .feature-content { grid-template-columns: minmax(0, 1fr); padding: 28px; gap: 20px; }
}
@media (max-width: 760px) {
  .glyphs { display: none; }
  .win { width: 100%; }
  .win-body { grid-template-columns: minmax(0, 1fr); height: 480px; }
  .win-side { display: none; }
  .win-main { padding: 16px 12px; }
  .feature-desk { grid-template-columns: minmax(0, 1fr); }
  .feature-index[role="tablist"] { flex-direction: row; }
  .feature-index [role="tab"] { width: auto; flex: 1 1 130px; }
  .feature-window { width: 100%; }
  .swatch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toc { position: static; }
  .client-card { padding: 22px; }
}
@media (max-width: 400px) {
  .set-row { gap: 10px; padding-inline: 8px; }
  .seg span { padding-inline: 6px; font-size: 11px; }
  .set-t { font-size: 12.5px; }
  .dl-fab { right: 20px; bottom: 16px; }
}