.hero-preview {
  position: relative;
  min-height: 780px;
  overflow-x: clip;
  border-bottom: 1px solid var(--color-border);
}

.hero-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 39%, var(--color-accent-glow), transparent 32%);
  pointer-events: none;
}

.hero-layout {
  position: relative;
  z-index: 1;
  min-height: 700px;
  display: grid;
  grid-template-columns: minmax(380px, 0.82fr) minmax(620px, 1.45fr);
  align-items: center;
  gap: 44px;
}

.hero-copy {
  position: relative;
  z-index: 4;
}

.hero-description {
  max-width: 470px;
  color: var(--color-muted);
}

.hero-description strong {
  color: var(--color-ink);
}

.trust-row,
.platform-strip,
.flag-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 16px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.trust-row li,
.platform-strip li,
.flag-strip li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--color-muted);
  font-size: 12px;
}

.trust-row svg,
.platform-strip svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.hero-visual {
  position: relative;
  min-height: 580px;
  display: grid;
  place-items: center;
  overflow-x: clip;
}

.orbit {
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(860px, 105%);
  aspect-ratio: 2 / 1;
  border: 1px solid var(--color-orbit);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-7deg);
}

.orbit-inner {
  width: min(680px, 84%);
  transform: translate(-50%, -50%) rotate(7deg);
}

.rack {
  position: relative;
  z-index: 2;
  width: min(790px, 100%);
  padding: 14px;
  border: 1px solid var(--color-rack-edge);
  border-radius: var(--radius-lg);
  background: var(--color-rack);
  box-shadow: var(--shadow-panel);
}

.rack-bar,
.rack-foot {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 13px;
  border: 1px solid var(--color-rack-edge);
  border-radius: var(--radius-sm);
  background: var(--color-rack-raised);
  color: var(--color-rack-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.07em;
}

.rack-name,
.rack-route {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rack-name strong {
  color: var(--color-rack-copy);
}

.rack-light {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: var(--radius-pill);
  background: var(--color-success);
  box-shadow: 0 0 0 3px var(--color-success-soft);
}

.port-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-block: 11px;
}

.rack-port {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--color-rack-edge);
  border-radius: var(--radius-sm);
  background: var(--color-rack-raised);
  box-shadow: inset 0 1px 0 var(--color-white-alpha), inset 0 -12px 20px var(--color-black-alpha);
}

.port-meta {
  display: flex;
  justify-content: space-between;
  color: var(--color-rack-muted);
  font-family: var(--font-mono);
  font-size: 8px;
}

.port-led {
  width: 5px;
  height: 5px;
  border-radius: var(--radius-pill);
  background: var(--color-rack-line);
}

.rack-port.active .port-led {
  background: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-accent-glow);
  animation: status-breathe 2.8s ease-in-out infinite;
}

.flag-box {
  height: 64px;
  display: grid;
  place-items: center;
  margin-top: 9px;
  border: 1px solid var(--color-rack-line);
  border-radius: var(--radius-xs);
  background: var(--color-rack-soft);
}

.flag-box svg {
  width: 52px;
  height: 32px;
  border-radius: var(--radius-xs);
}

.port-code,
.port-place {
  overflow-wrap: anywhere;
  text-align: center;
}

.port-code {
  margin-top: 8px;
  color: var(--color-rack-copy);
  font-family: var(--font-mono);
  font-size: 9px;
}

.port-place {
  margin-top: 3px;
  color: var(--color-rack-muted);
  font-size: 9px;
}

.device-link {
  position: absolute;
  z-index: 4;
  left: 1%;
  bottom: 7%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  box-shadow: 0 12px 28px var(--color-soft-shadow);
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.device-link svg {
  width: 20px;
  height: 20px;
  color: var(--color-accent-dark);
}

.cable {
  position: absolute;
  z-index: 3;
  inset: 46% auto auto 2%;
  width: 42%;
  height: 38%;
  pointer-events: none;
}

.cable path {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 420;
  stroke-dashoffset: 0;
  animation: cable-connect 900ms ease-out both;
}

.preview-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--color-border);
  background: var(--color-surface);
}

.preview-facts div {
  padding: 17px var(--gutter);
  border-right: 1px solid var(--color-border);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
}

.preview-facts div:last-child {
  border-right: 0;
}

.tabs {
  min-width: 0;
}

.tab-list,
[role="tablist"] {
  display: flex;
  width: fit-content;
  max-width: 100%;
  gap: 4px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-soft);
  -webkit-overflow-scrolling: touch;
}

[role="tab"] {
  min-height: 40px;
  flex: 0 0 auto;
  padding: 0 15px;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--color-muted);
  font-weight: 650;
}

[role="tab"][aria-selected="true"],
[role="tab"].is-active {
  background: var(--color-surface);
  color: var(--color-ink);
  box-shadow: 0 3px 10px var(--color-soft-shadow);
}

[role="tabpanel"][hidden] {
  display: none;
}

.tab-panel {
  margin-top: 22px;
}

.toc-tabs {
  position: sticky;
  z-index: 40;
  top: 12px;
  display: flex;
  max-width: 100%;
  gap: 5px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  box-shadow: 0 10px 30px var(--color-soft-shadow);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.toc-tabs a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 12px;
  border-radius: var(--radius-xs);
  color: var(--color-muted);
  font-size: 13px;
  white-space: nowrap;
}

.toc-tabs a:hover,
.toc-tabs a.is-current,
.toc-tabs a[aria-current="location"] {
  background: var(--color-rack);
  color: var(--color-rack-copy);
}

.faq-list {
  display: grid;
  border-top: 1px solid var(--color-border);
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item summary {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  list-style: none;
  font-weight: 720;
}

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

.faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--color-accent-dark);
  font-family: var(--font-mono);
  font-size: 22px;
}

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

.faq-answer {
  max-width: 850px;
  padding: 0 38px 24px 0;
  color: var(--color-muted);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.plan-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.plan-card.is-current {
  border-color: var(--color-accent);
  box-shadow: inset 0 3px 0 var(--color-accent), 0 24px 52px var(--color-soft-shadow);
}

.plan-badge {
  position: absolute;
  top: 16px;
  right: 16px;
}

.plan-period {
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 20px 0;
}

.plan-price strong {
  font-size: clamp(38px, 5vw, 54px);
  letter-spacing: -0.04em;
  line-height: 1;
}

.plan-price span {
  color: var(--color-muted);
}

.plan-features {
  display: grid;
  gap: 9px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  color: var(--color-muted);
}

.plan-features li {
  display: flex;
  gap: 9px;
}

.plan-features li::before {
  content: "•";
  flex: 0 0 auto;
  color: var(--color-accent-dark);
}

.plan-card .button {
  width: 100%;
  margin-top: auto;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  -webkit-overflow-scrolling: touch;
}

.data-table,
.network-table,
.comparison-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: var(--color-surface);
}

.data-table th,
.data-table td,
.network-table th,
.network-table td,
.comparison-table th,
.comparison-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-ink);
  text-align: left;
  vertical-align: middle;
}

.data-table th,
.network-table th,
.comparison-table th {
  background: var(--color-surface-soft);
  color: var(--color-ink);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.data-table tr:last-child td,
.network-table tr:last-child td,
.comparison-table tr:last-child td {
  border-bottom: 0;
}

.network-group td {
  background: var(--color-rack);
  color: var(--color-rack-copy);
  font-family: var(--font-mono);
  font-size: 11px;
}

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

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

.platform-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

.platform-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xs);
  background: var(--color-surface-soft);
}

.platform-icon svg {
  width: 21px;
  height: 21px;
}

.platform-card h3 {
  font-size: 18px;
}

.platform-card p {
  color: var(--color-muted);
  font-size: 13px;
}

.platform-card .button {
  width: 100%;
  margin-top: auto;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.article-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px var(--color-soft-shadow);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.article-card h3 {
  font-size: 22px;
}

.article-card p {
  color: var(--color-muted);
}

.article-card-link {
  margin-top: auto;
  color: var(--color-accent-dark);
  font-weight: 720;
}

.callout {
  margin-block: 24px;
  padding: 18px 20px;
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--color-accent-soft);
}

.callout strong {
  color: var(--color-accent-dark);
}

.promo-block {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 30px;
  margin-top: 54px;
  padding: clamp(26px, 5vw, 48px);
  overflow-x: clip;
  border: 1px solid var(--color-rack-edge);
  border-radius: var(--radius-md);
  background: var(--color-rack);
  color: var(--color-rack-copy);
  box-shadow: var(--shadow-panel);
}

.promo-block::after {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  right: -80px;
  bottom: -120px;
  border: 1px solid var(--color-accent);
  border-radius: 50%;
  opacity: 0.55;
}

.promo-block h2,
.promo-block h3 {
  color: var(--color-rack-copy);
}

.promo-block p {
  margin-bottom: 0;
  color: var(--color-rack-muted);
}

.promo-block .button {
  position: relative;
  z-index: 1;
}

.float-cta {
  position: fixed;
  z-index: 80;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid var(--color-accent-dark);
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: var(--color-ink);
  box-shadow: var(--shadow-button);
  font-size: 14px;
  font-weight: 760;
}

.float-cta svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

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

.swatch {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

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

.swatch-copy {
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.swatch-page .swatch-color { background: var(--color-page); }
.swatch-surface .swatch-color { background: var(--color-surface); }
.swatch-soft .swatch-color { background: var(--color-surface-soft); }
.swatch-deep .swatch-color { background: var(--color-surface-deep); }
.swatch-border .swatch-color { background: var(--color-border); }
.swatch-ink .swatch-color { background: var(--color-ink); }
.swatch-muted .swatch-color { background: var(--color-muted); }
.swatch-accent .swatch-color { background: var(--color-accent); }
.swatch-accent-dark .swatch-color { background: var(--color-accent-dark); }
.swatch-success .swatch-color { background: var(--color-success); }
.swatch-warning .swatch-color { background: var(--color-warning); }
.swatch-error .swatch-color { background: var(--color-error); }
.swatch-rack .swatch-color { background: var(--color-rack); }
.swatch-rack-raised .swatch-color { background: var(--color-rack-raised); }
.swatch-rack-soft .swatch-color { background: var(--color-rack-soft); }

@keyframes status-breathe {
  0%, 100% { opacity: 0.65; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes cable-connect {
  from { stroke-dashoffset: 420; }
  to { stroke-dashoffset: 0; }
}

@media (max-width: 1120px) {
  .hero-layout {
    grid-template-columns: 1fr;
    padding-top: 70px;
    padding-bottom: 60px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .hero-visual {
    min-height: 510px;
  }

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

@media (max-width: 860px) {
  .plan-grid,
  .article-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .device-link,
  .cable {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero-preview {
    min-height: auto;
  }

  .hero-layout {
    min-height: auto;
    padding-top: 52px;
    padding-bottom: 48px;
  }

  .hero-visual {
    min-height: 500px;
  }

  .rack {
    padding: 10px;
  }

  .rack-bar,
  .rack-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .port-grid {
    gap: 7px;
  }

  .rack-port {
    padding: 7px;
  }

  .flag-box {
    height: 50px;
  }

  .flag-box svg {
    width: 40px;
    height: 26px;
  }

  .preview-facts {
    grid-template-columns: 1fr;
  }

  .preview-facts div {
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
  }

  .preview-facts div:last-child {
    border-bottom: 0;
  }

  .platform-grid,
  .swatch-grid {
    grid-template-columns: 1fr 1fr;
  }

  .promo-block {
    grid-template-columns: 1fr;
  }

  .float-cta {
    right: 12px;
    bottom: 12px;
  }
}

@media (max-width: 390px) {
  .platform-grid,
  .swatch-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rack-port.active .port-led,
  .cable path {
    animation: none;
  }
}