.stage { position: relative; justify-self: end; width: 100%; max-width: 660px; min-width: 0; }
.stage::before {
  content: "";
  position: absolute;
  right: -9%;
  bottom: -16%;
  width: 72%;
  height: 62%;
  background: radial-gradient(closest-side,var(--glow) 0%,var(--glow-2) 55%,var(--clear) 100%);
  color: var(--term-text);
  filter: blur(26px);
  z-index: 0;
  pointer-events: none;
}
.term { position: relative; z-index: 1; min-height: 460px; background: var(--panel-2); color: var(--term-text); border: 1px solid var(--term-border); border-radius: var(--r-xl); box-shadow: var(--shadow-float); overflow: hidden; min-width: 0; }
.term-bar { height: 44px; display: grid; grid-template-columns: 72px minmax(0,1fr) 72px; align-items: center; padding: 0 16px; background: linear-gradient(180deg,var(--chrome-top),var(--chrome-bottom)); color: var(--muted); border-bottom: 1px solid var(--chrome-line); }
.dots { display: flex; gap: 8px; }
.dots i { width: 12px; height: 12px; flex-shrink: 0; border-radius: var(--r-circle); display: block; }
.dots i:nth-child(1) { background: var(--error); color: var(--text); }
.dots i:nth-child(2) { background: var(--warn); color: var(--text); }
.dots i:nth-child(3) { background: var(--success); color: var(--text); }
.term-title { text-align: center; font: var(--weight-medium) 13px/1.3 var(--font-body); color: var(--muted); letter-spacing: .01em; }
.term-body { padding: 20px 26px 24px; font-family: var(--font-mono); font-size: 13px; line-height: 22px; color: var(--term-text); white-space: pre; overflow-x: auto; max-width: 100%; }
.ln { display: block; min-height: 22px; animation: packet-line .5s ease-out both; }
.ln-sep { min-height: 0; height: 0; margin: 11px 0; border-top: 1px dashed var(--term-line); }
.t-prompt { color: var(--term-success); }
.t-cmd, .t-addr { color: var(--term-text); }
.t-muted, .t-com { color: var(--term-readable-muted); }
.t-com { font-style: italic; }
.t-key, .t-kw { color: var(--term-accent); }
.chip {
  display: inline-block;
  max-width: 100%;
  padding: 0 6px;
  border: 1px solid var(--clear);
  border-radius: var(--r-xs);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: var(--weight-strong);
  line-height: 16px;
  letter-spacing: .04em;
  vertical-align: 1px;
  overflow-wrap: anywhere;
}
.chip-info { background: var(--chip-info-bg); border-color: var(--chip-info-bd); color: var(--term-accent); margin-right: 10px; }
.chip-direct { background: var(--chip-direct-bg); border-color: var(--chip-direct-bd); color: var(--chip-direct-tx); }
.chip-proxy { background: var(--chip-proxy-bg); border-color: var(--chip-proxy-bd); color: var(--chip-proxy-tx); }
.chip-reject { background: var(--chip-reject-bg); border-color: var(--chip-reject-bd); color: var(--chip-reject-tx); }
.cursor { display: inline-block; width: 8px; height: 16px; margin-left: 2px; vertical-align: -3px; background: var(--term-cursor); color: var(--panel-2); animation: packet-cursor 1.1s steps(1,end) infinite; }
.term-body > .ln:nth-child(1) { animation-delay: .10s; }
.term-body > .ln:nth-child(2) { animation-delay: .22s; }
.term-body > .ln:nth-child(3) { animation-delay: .34s; }
.term-body > .ln:nth-child(4) { animation-delay: .46s; }
.term-body > .ln:nth-child(5) { animation-delay: .58s; }
.term-body > .ln:nth-child(6) { animation-delay: .70s; }
.term-body > .ln:nth-child(7) { animation-delay: .82s; }
.term-body > .ln:nth-child(8) { animation-delay: .92s; }
.term-body > .ln:nth-child(9) { animation-delay: 1.02s; }
.term-body > .ln:nth-child(10) { animation-delay: 1.12s; }
.term-body > .ln:nth-child(11) { animation-delay: 1.22s; }
.term-body > .ln:nth-child(12) { animation-delay: 1.32s; }
.term-body > .ln:nth-child(13) { animation-delay: 1.42s; }
.term-body > .ln:nth-child(14) { animation-delay: 1.52s; }
.term-body > .ln:nth-child(15) { animation-delay: 1.62s; }
.term-body > .ln:nth-child(16) { animation-delay: 1.72s; }
.term-body > .ln:nth-child(17) { animation-delay: 1.84s; }
@keyframes packet-line { from { opacity: 0; } to { opacity: 1; } }
@keyframes packet-cursor { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
.tabs { min-width: 0; }
.tabs [role="tablist"] { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tabs [role="tab"] {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--panel);
  color: var(--muted);
  font-size: 14px;
}
.tabs [role="tab"]:hover { border-color: var(--accent-ring); color: var(--accent-dark); }
.tabs [role="tab"][aria-selected="true"] { background: var(--accent-soft); border-color: var(--accent-ring); color: var(--accent-dark); }
.tabs [role="tabpanel"] { min-width: 0; }
.feature-workbench { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border: 1px solid var(--border); border-radius: var(--r-2xl); background: var(--panel); color: var(--text); box-shadow: var(--shadow-card); overflow: hidden; }
.feature-workbench > * { min-width: 0; }
.feature-picker { padding: 40px; }
.feature-picker h2 { margin: 10px 0 28px; font-size: 26px; font-weight: var(--weight-body); }
.feature-picker [role="tablist"] { flex-direction: column; align-items: stretch; gap: 0; margin: 0; }
.feature-picker [role="tab"] { display: flex; justify-content: flex-start; min-height: 60px; width: 100%; padding: 18px 20px; border: 0; border-radius: 0; background: var(--panel); color: var(--muted); text-align: left; }
.feature-picker [role="tab"][aria-selected="true"] { background: var(--panel); color: var(--accent-dark); }
.feature-picker [role="tab"][aria-selected="true"]::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; background: var(--accent); color: var(--on-accent); }
.tab-progress { position: absolute; left: 20px; right: 20px; bottom: 0; height: 2px; background: var(--accent-soft-2); color: var(--accent-dark); }
.tab-progress::after { content: ""; display: block; height: 100%; width: 100%; background: var(--accent); color: var(--on-accent); transform-origin: left; transform: scaleX(0); }
.tabs.is-autoplay [role="tab"][aria-selected="true"] .tab-progress::after { animation: packet-tab-progress 8s linear forwards; }
@keyframes packet-tab-progress { to { transform: scaleX(1); } }
.feature-detail { padding: 40px; background: var(--panel-2); color: var(--term-text); }
.feature-detail h3 { margin-top: 0; color: var(--on-accent); font-weight: var(--weight-body); }
.feature-detail p { font-size: 15px; line-height: 1.85; }
.feature-detail .term { min-height: 0; box-shadow: var(--shadow-card); }
.feature-detail .term-body { padding: 20px; font-size: 12px; }
.feature-detail .ln { animation: none; }
.feature-detail .term-bar { grid-template-columns: 64px minmax(0,1fr) 64px; }
.toc { position: sticky; top: 16px; z-index: 10; display: flex; flex-wrap: wrap; gap: 8px; padding: 14px; margin-bottom: 32px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--panel); color: var(--text); box-shadow: var(--shadow-xs); }
.toc a { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 12px; border-radius: var(--r-sm); color: var(--muted); font-size: 14px; }
.toc a:hover { background: var(--accent-soft); color: var(--accent-dark); }
.toc-static { position: static; }
.faq-item { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--panel); color: var(--text); margin-bottom: 12px; box-shadow: var(--shadow-xs); }
.faq-item summary { position: relative; list-style: none; cursor: pointer; padding: 22px 56px 22px 24px; font-weight: var(--weight-medium); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 24px; top: 22px; color: var(--accent); font-family: var(--font-mono); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 24px 22px; color: var(--muted); }
.faq-answer p:last-child { margin-bottom: 0; }
.term-card { position: relative; padding: 28px; border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--panel); color: var(--text); box-shadow: var(--shadow-card); min-width: 0; }
.term-card h3 { margin: 16px 0 12px; font-weight: var(--weight-medium); }
.term-card p { margin-bottom: 16px; color: var(--muted); font-size: 15px; }
.term-alias { display: block; font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-top: 6px; overflow-wrap: anywhere; }
.term-card a { font-size: 14px; }
.client-card { padding: 30px; border: 1px solid var(--border); border-radius: var(--r-2xl); background: var(--panel); color: var(--text); box-shadow: var(--shadow-card); min-width: 0; }
.client-card.is-featured { border-color: var(--accent-ring); box-shadow: var(--shadow-card-hover); }
.client-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.client-head > div { min-width: 0; }
.client-logo { width: 56px; height: 56px; flex-shrink: 0; }
.client-head h3 { margin: 0 0 8px; font-size: 22px; }
.client-card p { color: var(--muted); }
.client-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-block: 18px; font-size: 13px; color: var(--muted); }
[data-version]:empty { display: none; }
.client-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.label-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.label { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg); color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.label-first { border-color: var(--accent-ring); background: var(--accent-soft); color: var(--accent-dark); }
.label-recommended { border-color: var(--success-ring); background: var(--bg); color: var(--success-ink); }
.label-archived { border-color: var(--border); background: var(--bg); color: var(--warn-ink); }
.label-error { border-color: var(--border); background: var(--bg); color: var(--error-ink); }
.post-card { display: flex; flex-direction: column; min-width: 0; padding: 28px; border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--panel); color: var(--text); box-shadow: var(--shadow-card); }
.post-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.post-card h3 { margin: 20px 0 12px; font-size: 21px; line-height: 1.5; }
.post-card h3 a { color: var(--text); }
.post-card h3 a:hover { color: var(--accent); }
.post-card p { color: var(--muted); font-size: 15px; }
.post-card .entry-link { padding-top: 8px; }
.callout { margin: 24px 0; padding: 22px 24px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--r-md); background: var(--panel); color: var(--text); box-shadow: var(--shadow-xs); }
.callout p:last-child { margin-bottom: 0; }
.callout-title { display: block; color: var(--accent-dark); margin-bottom: 8px; font-weight: var(--weight-medium); }
.callout-warn { border-left-color: var(--warn); }
.callout-warn .callout-title { color: var(--warn-ink); }
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--panel); color: var(--text); -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; background: var(--panel); color: var(--text); font-size: 14px; }
.data-table th, .data-table td, .prose table th, .prose table td { min-width: 7em; padding: 16px 20px; border-bottom: 1px solid var(--border); overflow-wrap: normal; word-break: normal; vertical-align: top; }
.data-table th, .prose table th { background: var(--bg); color: var(--text); font-weight: var(--weight-medium); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table caption { padding: 14px 20px; text-align: left; color: var(--muted); }
.prose table, .article-body table {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  background: var(--panel);
  color: var(--text);
}
.article-body table th, .article-body table td { min-width: 7em; padding: 16px 20px; border-bottom: 1px solid var(--border); overflow-wrap: normal; word-break: normal; }
.data-table code, .prose table code, .article-body table code { overflow-wrap: anywhere; word-break: normal; white-space: normal; }
.download-guide { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px; border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--panel); color: var(--text); box-shadow: var(--shadow-card); margin-top: 40px; }
.download-guide > div { min-width: 0; }
.download-guide h2 { margin: 0 0 8px; font-size: 24px; }
.download-guide p { margin: 0; color: var(--muted); }
.download-guide .btn { flex-shrink: 0; }
.dl-fab {
  position: fixed;
  right: max(20px,env(safe-area-inset-right));
  bottom: max(20px,env(safe-area-inset-bottom));
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 60px;
  max-width: calc(100% - 40px);
  padding: 14px 20px;
  border: 1px solid var(--accent-ring);
  border-radius: var(--r-lg);
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-btn);
}
.dl-fab:hover { background: var(--accent-dark); color: var(--on-accent); }
.dl-fab svg { width: 22px; height: 22px; flex-shrink: 0; }
.dl-fab-copy { display: flex; flex-direction: column; line-height: 1.5; }
.dl-fab-copy strong { font-size: 14px; }
.dl-fab-copy small { font-size: 11px; }
.has-article-fab { padding-bottom: 100px; }
.preview-static .ln, .preview-static .cursor { animation: none; opacity: 1; }
.preview-static .tab-progress::after { transform: scaleX(.42); animation: none; }
.preview-mobile { display: none; position: static; }
.preview-mobile > summary { list-style: none; }
.preview-mobile > summary::-webkit-details-marker, .language-picker > summary::-webkit-details-marker { display: none; }
.preview-mobile[open] .mobile-nav { display: block; }
.swatch-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 14px; }
.swatch { margin: 0; padding: 10px; min-width: 0; background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-md); }
.swatch span { display: block; height: 64px; border: 1px solid var(--border); border-radius: var(--r-xs); }
.swatch figcaption { margin-top: 8px; font: 11px/1.6 var(--font-mono); overflow-wrap: anywhere; color: var(--muted); }
.sw-bg { background: var(--bg); color: var(--text); }
.sw-panel { background: var(--panel); color: var(--text); }
.sw-panel-2 { background: var(--panel-2); color: var(--term-text); }
.sw-border { background: var(--border); color: var(--text); }
.sw-accent { background: var(--accent); color: var(--on-accent); }
.sw-accent-dark { background: var(--accent-dark); color: var(--on-accent); }
.sw-text { background: var(--text); color: var(--on-accent); }
.sw-muted { background: var(--muted); color: var(--on-accent); }
.sw-success { background: var(--success); color: var(--text); }
.sw-warn { background: var(--warn); color: var(--text); }
.sw-error { background: var(--error); color: var(--text); }
.sw-on-accent { background: var(--on-accent); color: var(--text); }
.sw-clear { background: var(--clear); color: var(--text); }
.sw-accent-soft { background: var(--accent-soft); color: var(--text); }
.sw-accent-soft-2 { background: var(--accent-soft-2); color: var(--text); }
.sw-accent-ring { background: var(--accent-ring); color: var(--text); }
.sw-success-ring { background: var(--success-ring); color: var(--text); }
.sw-band-soft { background: var(--band-soft); color: var(--text); }
.sw-band-mid { background: var(--band-mid); color: var(--text); }
.sw-glow { background: var(--glow); color: var(--text); }
.sw-glow-2 { background: var(--glow-2); color: var(--text); }
.sw-chrome-top { background: var(--chrome-top); color: var(--text); }
.sw-chrome-bottom { background: var(--chrome-bottom); color: var(--text); }
.sw-chrome-line { background: var(--chrome-line); color: var(--text); }
.sw-term-border { background: var(--term-border); color: var(--text); }
.sw-term-text { background: var(--term-text); color: var(--text); }
.sw-term-muted { background: var(--term-muted); color: var(--text); }
.sw-term-readable-muted { background: var(--term-readable-muted); color: var(--text); }
.sw-term-line { background: var(--term-line); color: var(--text); }
.sw-term-accent { background: var(--term-accent); color: var(--text); }
.sw-term-success { background: var(--term-success); color: var(--text); }
.sw-term-cursor { background: var(--term-cursor); color: var(--text); }
.sw-chip-info-bg { background: var(--chip-info-bg); color: var(--text); }
.sw-chip-info-bd { background: var(--chip-info-bd); color: var(--text); }
.sw-chip-direct-bg { background: var(--chip-direct-bg); color: var(--text); }
.sw-chip-direct-bd { background: var(--chip-direct-bd); color: var(--text); }
.sw-chip-direct-tx { background: var(--chip-direct-tx); color: var(--text); }
.sw-chip-proxy-bg { background: var(--chip-proxy-bg); color: var(--text); }
.sw-chip-proxy-bd { background: var(--chip-proxy-bd); color: var(--text); }
.sw-chip-proxy-tx { background: var(--chip-proxy-tx); color: var(--text); }
.sw-chip-reject-bg { background: var(--chip-reject-bg); color: var(--text); }
.sw-chip-reject-bd { background: var(--chip-reject-bd); color: var(--text); }
.sw-chip-reject-tx { background: var(--chip-reject-tx); color: var(--text); }
.sw-success-ink { background: var(--success-ink); color: var(--on-accent); }
.sw-warn-ink { background: var(--warn-ink); color: var(--on-accent); }
.sw-error-ink { background: var(--error-ink); color: var(--on-accent); }
.sw-veil { background: var(--veil); color: var(--text); }
@media (max-width: 1080px) {
  .stage { justify-self: stretch; max-width: none; }
  .preview-mobile { display: block; }
  .preview-mobile > summary { display: inline-flex; }
  .feature-workbench { grid-template-columns: minmax(0,1fr); }
  .swatch-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .term { min-height: 0; }
  .term-body { font-size: 12px; line-height: 20px; padding: 16px 18px 20px; }
  .ln { min-height: 20px; }
  .term-bar { grid-template-columns: 56px minmax(0,1fr) 56px; }
  .term-title { font-size: 11px; }
  .dots { gap: 6px; }
  .dots i { width: 10px; height: 10px; }
  .feature-picker, .feature-detail { padding: 24px; }
  .client-card, .term-card, .post-card { padding: 24px; }
  .swatch-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .toc { position: static; }
  .download-guide { flex-direction: column; align-items: flex-start; padding: 24px; }
  .dl-fab { min-height: 52px; padding: 10px 16px; }
  .dl-fab-copy small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ln, .cursor { animation: none; opacity: 1; }
  .tabs.is-autoplay [role="tab"] .tab-progress::after { animation: none; transform: none; }
}