.chip-row,
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.badge {
  max-width: 100%;
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  padding: 5px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-text-muted);
  background: var(--color-bg-panel);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.25;
}

.badge-dot::before {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  content: "";
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
}

.badge-featured {
  color: var(--color-bg);
  border-color: var(--color-accent);
  background: var(--color-accent);
}

.badge-recommended {
  color: var(--color-success);
  border-color: var(--color-success);
  background: var(--color-success-soft);
}

.badge-stopped {
  color: var(--color-error);
  border-color: var(--color-error);
  background: var(--color-error-soft);
}

.badge-neutral {
  color: var(--color-text);
  background: var(--color-text-soft);
}

.tab-machine {
  min-width: 0;
  border: 1px solid var(--color-border);
  background: var(--color-bg-panel);
  box-shadow: 14px 16px 0 var(--color-black-soft);
}

.tab-list {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-panel-2);
  scrollbar-width: thin;
}

.tab-button {
  position: relative;
  min-width: max-content;
  min-height: 50px;
  padding: 10px 18px;
  border: 0;
  border-right: 1px solid var(--color-border);
  color: var(--color-text-muted);
  background: var(--color-transparent);
  font-family: var(--font-mono);
  font-size: 0.81rem;
  cursor: pointer;
}

.tab-button:hover {
  color: var(--color-text);
  background: var(--color-text-faint);
}

.tab-button[aria-selected="true"] {
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

.tab-button[aria-selected="true"]::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  content: "";
  background: var(--color-error);
}

.tab-panel {
  min-width: 0;
  padding: clamp(22px, 4vw, 40px);
}

.tab-panel[hidden] {
  display: none;
}

.toc-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 6px;
  max-width: 100%;
  overflow-x: auto;
  padding: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-panel);
  box-shadow: 0 8px 20px var(--color-shadow);
  overscroll-behavior-inline: contain;
}

.toc-tabs a {
  min-width: max-content;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.toc-tabs a:hover {
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--color-border);
  background: var(--color-bg-panel);
  box-shadow: 7px 8px 0 var(--color-black-soft);
}

.faq-item summary {
  position: relative;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 52px 15px 18px;
  color: var(--color-text);
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  content: "";
  background: var(--color-error);
}

.faq-item summary::after {
  position: absolute;
  right: 19px;
  content: "+";
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 1.4rem;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  padding: 0 20px 20px 39px;
  border-top: 1px dashed var(--color-border);
}

.faq-answer > :last-child {
  margin-bottom: 0;
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.term-card {
  position: relative;
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--color-border);
  border-left: 5px solid var(--color-accent-dark);
  background:
    repeating-linear-gradient(
      0deg,
      var(--color-transparent) 0,
      var(--color-transparent) 23px,
      var(--color-text-faint) 24px
    ),
    var(--color-bg-panel);
}

.term-card dt {
  margin-bottom: 9px;
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
}

.term-card dd {
  margin: 0;
  color: var(--color-text-muted);
}

.client-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.client-card {
  position: relative;
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--color-border);
  border-bottom-width: 6px;
  background: linear-gradient(145deg, var(--color-bg-panel), var(--color-bg-panel-2));
  box-shadow: inset 0 1px 0 var(--color-white-glint), 10px 12px 0 var(--color-black-soft);
}

.client-card.is-featured {
  border-color: var(--color-accent);
}

.client-card.is-stopped {
  border-color: var(--color-error);
}

.client-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.client-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.client-title {
  min-width: 0;
  flex: 1;
}

.client-title h3 {
  overflow-wrap: anywhere;
}

.client-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

[data-cdnver] {
  display: none;
}

[data-cdnver]:not(:empty) {
  display: inline-flex;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.post-card {
  position: relative;
  min-width: 0;
  padding: 27px;
  border: 1px solid var(--color-border);
  background:
    linear-gradient(90deg, var(--color-text-faint) 1px, var(--color-transparent) 1px),
    var(--color-bg-panel);
  background-size: 28px 100%;
  box-shadow: 9px 11px 0 var(--color-black-soft);
}

.post-card::after {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 38px;
  border-top: 2px solid var(--color-error);
  content: "";
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 17px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.post-card h3 a:hover {
  color: var(--color-accent);
}

.post-card .post-summary {
  margin-bottom: 20px;
}

.callout {
  position: relative;
  margin: 24px 0;
  padding: 20px 22px 20px 28px;
  border: 1px solid var(--color-border);
  border-left: 6px solid var(--color-accent);
  background: var(--color-accent-soft);
  box-shadow: inset 8px 0 18px var(--color-black-soft);
}

.callout::before {
  position: absolute;
  top: 11px;
  left: -4px;
  width: 2px;
  height: 18px;
  content: "";
  background: var(--color-error);
}

.callout.is-warning {
  border-left-color: var(--color-warn);
}

.callout.is-danger {
  border-left-color: var(--color-error);
  background: var(--color-error-soft);
}

.callout.is-success {
  border-left-color: var(--color-success);
  background: var(--color-success-soft);
}

.callout > :last-child {
  margin-bottom: 0;
}

.article-download {
  margin-top: 54px;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid var(--color-accent-dark);
  border-bottom-width: 7px;
  background:
    repeating-linear-gradient(
      90deg,
      var(--color-text-faint) 0,
      var(--color-text-faint) 1px,
      var(--color-transparent) 1px,
      var(--color-transparent) 28px
    ),
    var(--color-bg-panel-2);
  box-shadow: 14px 16px 0 var(--color-shadow);
}

.dl-fab {
  position: fixed;
  right: clamp(14px, 2.6vw, 30px);
  bottom: clamp(14px, 2.6vw, 30px);
  z-index: 80;
  max-width: calc(100vw - 28px);
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 9px 17px 9px 10px;
  border: 1px solid var(--color-accent);
  border-bottom-width: 5px;
  color: var(--color-bg);
  background: var(--color-accent);
  box-shadow: 10px 12px 0 var(--color-shadow-deep);
  font-weight: 800;
}

.dl-fab:hover {
  background: var(--color-text);
}

.dl-fab-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--color-bg);
  border-radius: 50%;
}

.dl-fab-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.prose > .data-table {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.swatch {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg-panel);
}

.swatch-color {
  height: 78px;
  border-bottom: 1px solid var(--color-border);
}

.swatch-label {
  padding: 10px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  overflow-wrap: anywhere;
}

.swatch-bg {
  background: var(--color-bg);
}

.swatch-panel {
  background: var(--color-bg-panel);
}

.swatch-panel-2 {
  background: var(--color-bg-panel-2);
}

.swatch-border {
  background: var(--color-border);
}

.swatch-accent {
  background: var(--color-accent);
}

.swatch-accent-dark {
  background: var(--color-accent-dark);
}

.swatch-text {
  background: var(--color-text);
}

.swatch-muted {
  background: var(--color-text-muted);
}

.swatch-success {
  background: var(--color-success);
}

.swatch-error {
  background: var(--color-error);
}

.preview-hero {
  position: relative;
  min-height: calc(900px - var(--nav-height));
  overflow-x: clip;
}

.preview-hero::before {
  position: absolute;
  top: 78px;
  left: -230px;
  width: 850px;
  height: 540px;
  content: "";
  border: 1px solid var(--color-accent-mid);
  border-radius: 50%;
  background: var(--color-accent-soft);
  filter: blur(80px);
  opacity: 0.32;
  transform: rotate(-12deg);
}

.preview-hero::after {
  position: absolute;
  right: -190px;
  bottom: 68px;
  width: 690px;
  height: 330px;
  content: "";
  background: var(--color-grid-blue);
  filter: blur(70px);
  opacity: 0.65;
  transform: rotate(8deg);
}

.preview-hero-shell {
  position: relative;
  z-index: 2;
  min-height: calc(900px - var(--nav-height));
  display: grid;
  grid-template-columns: minmax(620px, 1.14fr) minmax(390px, 0.86fr);
  align-items: center;
  gap: 54px;
  padding-top: 34px;
  padding-bottom: 64px;
}

.receiver-stage {
  position: relative;
  min-width: 0;
  min-height: 600px;
  display: flex;
  align-items: center;
  animation: receiver-arrive 0.92s var(--ease-machine) both;
}

.frequency-rail {
  position: absolute;
  top: 76px;
  bottom: 72px;
  left: 1px;
  width: 48px;
  border-left: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 8px;
}

.frequency-rail::before {
  position: absolute;
  inset: 0 0 0 10px;
  content: "";
  background: repeating-linear-gradient(
    to bottom,
    var(--color-border) 0,
    var(--color-border) 1px,
    var(--color-transparent) 1px,
    var(--color-transparent) 18px
  );
}

.frequency-rail span {
  position: absolute;
  left: 20px;
  padding-left: 7px;
  background: var(--color-bg);
}

.frequency-rail span:nth-child(1) {
  top: 3px;
}

.frequency-rail span:nth-child(2) {
  top: 118px;
}

.frequency-rail span:nth-child(3) {
  top: 236px;
}

.frequency-rail span:nth-child(4) {
  top: 356px;
}

.rail-marker {
  position: absolute;
  top: 173px;
  left: -4px;
  width: 19px;
  height: 8px;
  border: 1px solid var(--color-error);
  background: var(--color-error);
  box-shadow: 0 0 16px var(--color-error-soft);
}

.receiver-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  margin-left: 27px;
  padding-top: 62px;
}

.receiver-topline {
  position: absolute;
  top: 18px;
  right: 18px;
  left: 36px;
  height: 44px;
  border-top: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
}

.receiver-topline::before {
  position: absolute;
  top: -5px;
  left: 0;
  width: 46%;
  height: 8px;
  content: "";
  background: repeating-linear-gradient(
    90deg,
    var(--color-accent) 0,
    var(--color-accent) 1px,
    var(--color-transparent) 1px,
    var(--color-transparent) 12px
  );
}

.receiver-topline span {
  position: absolute;
  top: -28px;
  right: 0;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.receiver {
  position: relative;
  width: 100%;
  min-height: 420px;
  padding: 23px;
  border: 1px solid var(--color-border);
  border-bottom-width: 7px;
  background: linear-gradient(150deg, var(--color-bg-panel-2), var(--color-bg) 48%, var(--color-bg-panel-2));
  box-shadow:
    inset 0 2px 0 var(--color-white-glint),
    inset 0 -18px 26px var(--color-shadow),
    18px 24px 0 var(--color-shadow);
}

.receiver::before,
.receiver::after {
  position: absolute;
  top: 12px;
  width: 8px;
  height: 8px;
  content: "";
  border: 1px solid var(--color-text-muted);
  border-radius: 50%;
  background: var(--color-bg);
}

.receiver::before {
  left: 12px;
}

.receiver::after {
  right: 12px;
}

.receiver-face {
  min-height: 366px;
  padding: 27px 25px 21px;
  border: 1px solid var(--color-border);
  background:
    linear-gradient(90deg, var(--color-text-faint) 1px, var(--color-transparent) 1px),
    var(--color-bg-panel);
  background-size: 24px 100%;
  box-shadow: inset 12px 13px 25px var(--color-shadow), inset -1px -1px 0 var(--color-white-glint);
}

.face-header {
  min-height: 25px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.status-set {
  display: flex;
  gap: 12px;
}

.status-set span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-set i {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
}

.status-set span:last-child i {
  background: var(--color-error);
  box-shadow: 0 0 8px var(--color-error);
}

.machine-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 172px;
  gap: 18px;
}

.address-label,
.output-title {
  margin-bottom: 7px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.address-window {
  position: relative;
  height: 72px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0 17px;
  border: 1px solid var(--color-accent-dark);
  border-radius: var(--radius-xs);
  color: var(--color-accent);
  background: linear-gradient(180deg, var(--color-black-soft), var(--color-accent-soft)), var(--color-bg);
  box-shadow:
    inset 0 11px 19px var(--color-shadow-deep),
    inset 0 -1px 0 var(--color-accent-mid),
    0 0 22px var(--color-accent-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: nowrap;
}

.address-window::before {
  position: absolute;
  inset: 0;
  content: "";
  background: repeating-linear-gradient(
    90deg,
    var(--color-transparent) 0,
    var(--color-transparent) 8px,
    var(--color-accent-soft) 9px
  );
  animation: window-scan 4.8s linear infinite;
}

.address-window code {
  position: relative;
  z-index: 1;
  overflow-wrap: normal;
}

.physical-controls {
  display: grid;
  grid-template-columns: 0.86fr 1fr 1.22fr;
  gap: 8px;
  margin-top: 18px;
}

.machine-button {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  border: 1px solid var(--color-border);
  border-bottom-width: 5px;
  color: var(--color-text);
  background: linear-gradient(180deg, var(--color-bg-panel-2), var(--color-bg));
  box-shadow: inset 0 1px 0 var(--color-white-glint), 0 7px 10px var(--color-shadow);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.machine-button.is-current {
  border-color: var(--color-error);
}

.output-bay {
  min-height: 217px;
  padding: 11px 10px 9px;
  border: 1px solid var(--color-border);
  background: var(--color-black-soft);
  box-shadow: inset 7px 8px 14px var(--color-shadow);
}

.output-title {
  display: flex;
  justify-content: space-between;
}

.output-title b {
  color: var(--color-accent);
}

.platform-list {
  display: grid;
  gap: 7px;
}

.platform-port {
  position: relative;
  min-height: 37px;
  display: grid;
  grid-template-columns: 12px 24px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border: 1px solid var(--color-text-soft);
  color: var(--color-text-muted);
  background: var(--color-bg-panel);
  font-family: var(--font-mono);
  font-size: 8px;
}

.platform-port::before {
  position: absolute;
  left: -20px;
  width: 19px;
  border-top: 1px dashed var(--color-accent-dark);
  content: "";
}

.platform-port svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.jack {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  background: var(--color-bg);
}

.machine-footer {
  min-height: 64px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 22px;
  margin-top: 15px;
}

.process-scale {
  height: 47px;
  border-top: 1px solid var(--color-border);
  background: repeating-linear-gradient(
    90deg,
    var(--color-border) 0,
    var(--color-border) 1px,
    var(--color-transparent) 1px,
    var(--color-transparent) 14px
  );
  background-size: 100% 8px;
  background-repeat: no-repeat;
}

.process-scale ol {
  display: flex;
  justify-content: space-between;
  margin: 15px 0 0;
  padding: 0;
  list-style: none;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 8px;
}

.process-scale li::before {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 5px;
  content: "";
  border-radius: 50%;
  background: var(--color-accent);
}

.nameplate {
  min-width: 120px;
  padding: 9px 11px;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  background: var(--color-bg-panel-2);
  font-family: var(--font-mono);
  font-size: 8px;
  text-align: center;
}

.hero-copy-preview {
  min-width: 0;
  animation: copy-arrive 0.88s 0.1s var(--ease-machine) both;
}

.hero-copy-preview h1 {
  max-width: 620px;
}

.hero-copy-preview .lead {
  margin-bottom: 26px;
}

.hero-copy-preview .chip-row {
  margin-top: 22px;
}

@keyframes receiver-arrive {
  from {
    opacity: 0;
    transform: translateX(-28px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes copy-arrive {
  from {
    opacity: 0;
    transform: translateX(24px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes window-scan {
  from {
    transform: translateX(-18px);
  }

  to {
    transform: translateX(18px);
  }
}

@media (max-width: 1120px) {
  .preview-hero-shell {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 54px;
  }

  .receiver-stage {
    order: 2;
  }

  .hero-copy-preview {
    order: 1;
  }
}

@media (max-width: 760px) {
  .glossary-grid,
  .client-grid,
  .post-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .palette-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .receiver-stage {
    min-height: 480px;
  }

  .frequency-rail {
    display: none;
  }

  .receiver-wrap {
    margin-left: 0;
  }

  .receiver {
    padding: 14px;
    box-shadow: inset 0 2px 0 var(--color-white-glint), 8px 12px 0 var(--color-shadow);
  }

  .receiver-face {
    padding: 20px 15px;
  }

  .machine-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .output-bay {
    min-height: 0;
  }

  .platform-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .platform-port::before {
    display: none;
  }

  .machine-footer {
    grid-template-columns: minmax(0, 1fr);
  }

  .nameplate {
    display: none;
  }
}

@media (max-width: 640px) {
  .toc-tabs {
    top: 0;
  }

  .faq-answer {
    padding-left: 18px;
  }

  .physical-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .platform-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .address-window {
    height: 62px;
    font-size: 9px;
  }

  .face-header {
    flex-direction: column;
    margin-bottom: 12px;
  }

  .preview-hero-shell {
    min-height: auto;
  }

  .receiver-stage {
    min-height: 590px;
  }
}