.devices, .fact-row, .badge-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}
.device { display: inline-flex; align-items: center; gap: 7px; font-size: var(--size-sm); font-weight: var(--weight-medium); color: var(--text-muted); }
.device svg { width: 20px; height: 20px; color: var(--text); opacity: 0.72; flex-shrink: 0; }
.device:hover { color: var(--accent-dark); }
.devices__sep { width: 1px; height: 18px; background: var(--border); color: var(--text); flex-shrink: 0; }
.fact-pill, .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 28px;
  padding: 3px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: var(--size-xs);
  font-weight: var(--weight-semibold);
  overflow-wrap: anywhere;
}
.fact-pill { font-size: 13px; }
.fact-pill svg { width: 13px; height: 13px; flex-shrink: 0; }
.fact-pill--quiet { color: var(--text-muted); font-weight: var(--weight-medium); background: var(--bg-panel); }
.badge { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent-a30); }
.badge--neutral { background: var(--bg-panel); color: var(--text-muted); border-color: var(--border); }
.devices__note { margin: 12px 0 0; font-family: var(--font-mono); font-size: var(--size-xs); letter-spacing: 0.01em; color: var(--text-muted); }
.fact-row { gap: 10px; }

.rig { position: relative; width: 560px; height: 600px; justify-self: end; }
.rig__field {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 520px;
  height: 600px;
  transform: translate(-50%, -50%);
  opacity: 0.6;
  background-image: repeating-linear-gradient(90deg, var(--transparent) 0 2px, var(--bg) 2px 8px), var(--grad-field);
  color: var(--text);
  -webkit-mask-image: var(--field-mask);
  mask-image: var(--field-mask);
}
.rig__stack {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 440px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transform: translate(-50%, -50%) rotate(-2deg);
}
.toggle-tile {
  position: relative;
  width: 380px;
  height: 66px;
  padding: 0 18px 0 20px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-tile);
  box-shadow: var(--shadow-tile);
  transform-origin: center;
}
.toggle-tile:nth-child(1), .toggle-tile:nth-child(6) { transform: translateX(60px) scale(0.94); opacity: 0.4; }
.toggle-tile:nth-child(2), .toggle-tile:nth-child(5) { transform: translateX(26px); opacity: 0.78; }
.toggle-tile:nth-child(3), .toggle-tile:nth-child(4) { z-index: 2; box-shadow: var(--shadow-lift); }
.switch { position: relative; width: 46px; height: 28px; border-radius: var(--r-pill); background: var(--bg-panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); flex-shrink: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: var(--r-round); background: var(--knob); color: var(--text); box-shadow: var(--shadow-knob); }
.switch--on { background: linear-gradient(180deg, var(--switch-on-top) 0%, var(--text) 100%); color: var(--knob); box-shadow: var(--shadow-track-on); }
.switch--on::after { left: 21px; }
.tile-name { font-family: var(--font-display); font-size: var(--size-body); font-weight: var(--weight-semibold); letter-spacing: -0.01em; color: var(--text-muted); white-space: nowrap; }
.toggle-tile:nth-child(3) .tile-name, .toggle-tile:nth-child(4) .tile-name { color: var(--text); }
.tile-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: var(--r-pill); border: 1px solid var(--border); font-size: var(--size-xs); font-weight: var(--weight-medium); color: var(--text-muted); background: var(--bg); white-space: nowrap; }
.toggle-tile:nth-child(3) .tile-tag, .toggle-tile:nth-child(4) .tile-tag { border-color: var(--accent-a30); background: var(--accent-soft); color: var(--accent-dark); }

.feature-layout { display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 80px; align-items: start; }
.feature-tabs { display: flex; flex-direction: column; gap: 8px; }
.feature-tab {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 96px;
  padding: 18px;
  text-align: left;
  border: 1px solid var(--transparent);
  border-radius: var(--r-card);
  background: var(--transparent);
  color: var(--text-muted);
}
.feature-tab[aria-selected="true"] { border-color: var(--border); background: var(--bg); color: var(--text); box-shadow: var(--shadow-soft); }
.feature-tab:hover { color: var(--accent-dark); }
.feature-tab__copy { min-width: 0; }
.feature-tab__title { display: block; font-weight: var(--weight-semibold); font-size: var(--size-body); }
.feature-tab__note { display: block; margin-top: 4px; font-size: var(--size-sm); color: var(--text-muted); }
.feature-icon {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border: 1px solid var(--accent-a30);
  border-radius: var(--r-tile);
  background: linear-gradient(145deg, var(--white-a90), var(--transparent) 65%), var(--grad-field);
  color: var(--on-accent);
  box-shadow: inset 0 1px 0 var(--white-a90), inset 0 -5px 10px var(--violet-a20), 0 6px 12px var(--violet-a10);
}
.feature-icon::before { content: ""; position: absolute; inset: 13px; border: 2px solid var(--on-accent); border-radius: var(--r-small); box-shadow: 3px 3px 0 var(--white-a28); }
.feature-icon--routing::after { content: ""; position: absolute; inset: 23px 12px; border-top: 2px solid var(--on-accent); border-bottom: 2px solid var(--on-accent); }
.feature-icon--demand::before { inset: 19px 10px; border-radius: var(--r-pill); }
.feature-icon--demand::after { content: ""; position: absolute; left: 29px; top: 23px; width: 10px; height: 10px; border-radius: var(--r-round); background: var(--on-accent); color: var(--accent-dark); }
.feature-icon--subscribe::after { content: ""; position: absolute; inset: 24px 20px 12px; border-left: 2px solid var(--on-accent); border-right: 2px solid var(--on-accent); }
.feature-icon--config::before { inset: 12px 17px; transform: rotate(6deg); }
.feature-icon--proxy::before { inset: 14px; border-radius: var(--r-round); }
.feature-icon--proxy::after { content: ""; position: absolute; inset: 14px 23px; border: 1px solid var(--on-accent); border-radius: var(--r-round); }
.feature-icon--log::before { inset: 15px 12px; border-width: 0 0 2px 2px; border-radius: 0; }
.feature-icon--log::after { content: ""; position: absolute; inset: 19px 18px; border-top: 2px solid var(--on-accent); border-bottom: 2px solid var(--on-accent); transform: skewY(-20deg); }
.feature-stage { padding: 42px 22px 28px; min-width: 0; }
.feature-board {
  position: relative;
  isolation: isolate;
  padding: 38px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-lift);
  transform: perspective(1100px) rotateX(12deg) rotateY(-13deg) rotateZ(3deg);
}
.feature-board::before, .feature-board::after { content: ""; position: absolute; z-index: -1; inset: 12px 0 -12px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg-panel-2); color: var(--text); }
.feature-board::after { z-index: -2; inset: 24px 0 -24px; background: var(--bg-panel); color: var(--text); }
.feature-board__title { margin: 0 0 24px; font-family: var(--font-display); font-size: var(--size-h3); font-weight: var(--weight-bold); }
.feature-board pre { margin: 0; font-size: var(--size-sm); }
.feature-detail { margin: 64px 0 0; color: var(--text-muted); line-height: 1.9; }
.settings-list { list-style: none; margin: 0; padding: 0; }
.settings-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 15px; padding-bottom: 15px; }
.settings-list li + li { border-top: 1px solid var(--border); }

.tabs { min-width: 0; }
.tab-strip { display: flex; gap: 8px; max-width: 100%; overflow-x: auto; padding-bottom: 12px; overscroll-behavior-x: contain; }
.tab-strip [role="tab"] { min-height: 44px; flex-shrink: 0; padding: 10px 20px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg); color: var(--text-muted); font-weight: var(--weight-semibold); }
.tab-strip [role="tab"][aria-selected="true"] { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent-a30); }
[role="tabpanel"] { min-width: 0; }

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; padding: 12px; border-radius: var(--r-card); background: var(--bg-panel); color: var(--text); }
.toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: var(--r-pill); color: var(--text-muted); }
.toc a:hover, .toc a[aria-current="location"] { background: var(--bg); color: var(--accent-dark); box-shadow: var(--shadow-soft); }
.toc--sticky { position: sticky; top: 16px; z-index: 10; }

.faq-item { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-soft); }
.faq-item + .faq-item { margin-top: 16px; }
.faq-item summary { position: relative; padding: 22px 58px 22px 24px; font-weight: var(--weight-semibold); cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 24px; top: 20px; color: var(--accent-dark); font-size: var(--size-h3); }
.faq-item[open] summary::after { content: "−"; }
.faq-item__body { padding: 0 24px 24px; color: var(--text-muted); }
.faq-item__body p { margin: 0; }

.term-card { padding: var(--card-pad); border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-soft); }
.term-card dt { margin-bottom: 12px; font-family: var(--font-display); font-size: var(--size-subtitle); font-weight: var(--weight-bold); }
.term-card dd { margin: 0; color: var(--text-muted); line-height: 1.85; }
.term-card__category { display: block; margin-bottom: 10px; color: var(--accent-dark); font-size: var(--size-xs); font-weight: var(--weight-semibold); }

.shot-row { display: flex; align-items: flex-start; justify-content: center; flex-wrap: wrap; gap: 32px; }
.official-shot { width: 100%; max-width: 280px; margin: 0; padding: 0; flex-shrink: 0; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: var(--r-shot); }
.official-shot img, .shot-placeholder { border: 1px solid var(--border); }
.official-shot figcaption { margin-top: 14px; color: var(--text-muted); font-size: var(--size-sm); line-height: 1.7; }
.shot-placeholder { display: grid; place-items: center; width: 100%; aspect-ratio: 750 / 1334; border-radius: var(--r-shot); background: var(--bg-panel-2); color: var(--text-muted); text-align: center; font-size: var(--size-sm); }

.device-card { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: 32px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-tile); }
.device-card > svg { width: 48px; height: 48px; color: var(--accent-dark); flex-shrink: 0; }
.device-card h3, .device-card p { margin: 0; }
.device-card p { color: var(--text-muted); }
.device-card .btn-guide { margin-top: auto; font-size: var(--size-body); color: var(--accent-dark); }
.article-card { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: var(--card-pad); border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-soft); transition: box-shadow var(--motion-fast), transform var(--motion-fast); }
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.article-card h3 { margin: 0; font-size: var(--size-subtitle); }
.article-card p { margin: 0; color: var(--text-muted); }
.article-card__link { margin-top: auto; color: var(--accent-dark); font-weight: var(--weight-semibold); }
.article-card__meta { color: var(--text-muted); font-size: var(--size-xs); }

.callout { margin: 28px 0; padding: 24px 28px; border: 1px solid var(--accent-a30); border-left: 4px solid var(--accent); border-radius: var(--r-tile); background: var(--accent-soft); color: var(--text); }
.callout strong { color: var(--accent-dark); }
.callout p { margin: 8px 0 0; }
.callout--plain { background: var(--bg-panel); color: var(--text); border-color: var(--border); }
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--border); border-radius: var(--r-tile); }
.data-table { width: 100%; border-collapse: collapse; background: var(--bg); color: var(--text); text-align: left; }
.data-table th, .data-table td, .prose th, .prose td, .article-body th, .article-body 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 th, .article-body th { background: var(--bg-panel); color: var(--text); font-weight: var(--weight-semibold); }
.data-table tr:last-child td { border-bottom: 0; }
.prose table, .article-body table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; min-width: 0; border-collapse: collapse; overscroll-behavior-x: contain; }
.prose table code, .article-body table code { overflow-wrap: anywhere; }

.store-followup { margin-top: 48px; padding: 28px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-soft); }
.store-followup h2 { margin: 0; font-size: var(--size-h3); }
.store-followup p { color: var(--text-muted); }
.dl-fab {
  position: fixed;
  z-index: 30;
  right: 24px;
  bottom: max(24px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 36px);
  min-height: 58px;
  padding: 12px 20px;
  border: 1px solid var(--accent-a30);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--accent-dark);
  box-shadow: var(--shadow-lift);
  font-size: var(--size-sm);
  font-weight: var(--weight-semibold);
}
.dl-fab svg { width: 22px; height: 22px; flex-shrink: 0; }
.dl-fab:hover { background: var(--accent-soft); color: var(--accent-dark); }

.palette-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.palette-chip { min-width: 0; }
.palette-chip code { display: block; margin-top: 12px; color: var(--text-muted); }
.palette-swatch { height: 86px; border: 1px solid var(--border); border-radius: var(--r-tile); background: var(--bg); color: var(--text); }
.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-accent { background: var(--accent); color: var(--on-accent); }
.swatch-dark { background: var(--accent-dark); color: var(--on-accent); }
.swatch-sky { background: var(--accent-sky); color: var(--text); }
.swatch-soft { background: var(--accent-soft); color: var(--accent-dark); }
.swatch-text { background: var(--text); color: var(--bg); }
.swatch-muted { background: var(--text-muted); color: var(--bg); }
.swatch-success { background: var(--success); color: var(--text); }
.swatch-warn { background: var(--warn); color: var(--text); }
.swatch-error { background: var(--error); color: var(--text); }
.preview-stack > * + * { margin-top: 32px; }
.preview-type-title { margin: 0; font-size: var(--size-h1); }
.preview-caption { font-size: var(--size-sm); color: var(--text-muted); }

@media (max-width: 1180px) {
  .rig { width: 480px; }
  .rig__field { width: 460px; }
  .feature-layout { grid-template-columns: 340px minmax(0, 1fr); gap: 32px; }
  .feature-board { padding: 24px; }
}
@media (max-width: 960px) {
  .rig { justify-self: center; width: 100%; max-width: 420px; height: 400px; }
  .rig__field { width: 100%; height: 400px; }
  .rig__stack { width: 100%; max-width: 380px; transform: translate(-50%, -50%); }
  .toggle-tile { width: 100%; }
  .toggle-tile:nth-child(1), .toggle-tile:nth-child(6) { display: none; }
  .toggle-tile:nth-child(2), .toggle-tile:nth-child(5) { transform: none; opacity: 0.85; }
  .feature-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .feature-tabs { flex-direction: row; max-width: 100%; overflow-x: auto; padding-bottom: 14px; }
  .feature-tab { flex-shrink: 0; width: auto; min-height: 44px; padding: 10px 18px; border-radius: var(--r-pill); }
  .feature-tab .feature-icon, .feature-tab__note { display: none; }
  .feature-board { transform: none; }
  .feature-stage { padding-inline: 0; }
  .feature-detail { margin-top: 48px; }
}
@media (max-width: 640px) {
  .toggle-tile { height: 60px; padding: 0 14px; gap: 12px; }
  .tile-name { font-size: var(--size-nav); }
  .tile-tag { padding-inline: 8px; }
  .devices { gap: 10px 16px; }
  .devices, .fact-row, .badge-row { flex-direction: row; flex-wrap: wrap; }
  .fact-row, .badge-row { justify-content: center; }
  .shot-row { flex-direction: column; align-items: center; }
  .official-shot { margin-inline: auto; }
  .palette-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-board { padding: 20px; transform: none; }
  .device-card { padding: 24px; }
  .dl-fab { right: 18px; bottom: max(18px, env(safe-area-inset-bottom)); min-height: 52px; padding: 10px 16px; }
}