.tabs {
  width: 100%;
}

.tab-list {
  width: max-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 auto 32px;
  padding: 6px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border-radius: var(--radius-pill);
  background: var(--color-panel-soft);
  scrollbar-width: none;
}

.tab-list::-webkit-scrollbar,
.toc-tabs::-webkit-scrollbar {
  display: none;
}

.tab-list [role="tab"] {
  min-height: 42px;
  flex: 0 0 auto;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  color: var(--color-text-muted);
  background: transparent;
  font-size: 14px;
  font-weight: 680;
  white-space: nowrap;
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.tab-list [role="tab"]:hover {
  color: var(--color-accent-dark);
}

.tab-list [role="tab"][aria-selected="true"],
.tab-list [role="tab"].is-active {
  color: var(--color-accent-dark);
  background: var(--color-panel);
  box-shadow: var(--shadow-paper);
}

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

.toc-tabs {
  position: sticky;
  z-index: 30;
  top: var(--toc-top);
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 18px 0 36px;
  padding: 7px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  box-shadow: var(--shadow-paper);
  scrollbar-width: none;
}

.toc-tabs a {
  min-height: 40px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 650;
  white-space: nowrap;
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast);
}

.toc-tabs a:hover,
.toc-tabs a.is-current,
.toc-tabs a[aria-current="true"] {
  color: var(--color-accent-dark);
  background: var(--color-panel-soft);
}

.toc-sticky-host {
  position: sticky;
  z-index: 30;
}

.toc-sticky-host > .toc-tabs {
  position: static;
}

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

.faq-item {
  overflow: clip;
  border-radius: var(--radius-md);
  background: var(--color-panel);
  box-shadow: var(--shadow-paper);
}

.faq-item summary {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
  color: var(--color-text);
  font-weight: 700;
}

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

.faq-item summary::after {
  content: "+";
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  margin-left: auto;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  color: var(--color-accent-dark);
  background: var(--color-panel-soft);
  font-family: var(--font-mono);
  transition: transform var(--transition-fast);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 22px 22px;
  color: var(--color-text-muted);
  line-height: 1.75;
}

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

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 18px;
}

.plan-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 34px);
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--color-panel);
  box-shadow: var(--shadow-paper);
}

.plan-card.is-featured {
  background:
    radial-gradient(circle at 90% 5%, var(--color-success-soft), transparent 28%),
    var(--color-panel);
  box-shadow: var(--shadow-stage);
}

.plan-card.is-current {
  box-shadow:
    inset 0 0 0 2px var(--color-accent),
    var(--shadow-stage);
}

.plan-ribbon {
  position: absolute;
  top: 18px;
  right: 18px;
  max-width: calc(100% - 36px);
}

.plan-name {
  margin: 0 0 12px;
  padding-right: 74px;
  font-size: 22px;
}

.plan-period {
  color: var(--color-text-muted);
  font-size: 13px;
}

.plan-price {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  margin: 20px 0 22px;
}

.plan-price strong {
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: clamp(42px, 5vw, 58px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.plan-price span {
  color: var(--color-text-muted);
  font-size: 14px;
}

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

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

.plan-features li::before {
  content: "✓";
  flex: 0 0 auto;
  color: var(--color-success);
  font-weight: 800;
}

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

.table-shell {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border-radius: var(--radius-lg);
  background: var(--color-panel);
  box-shadow: var(--shadow-paper);
  -webkit-overflow-scrolling: touch;
}

.data-table,
.network-table {
  width: 100%;
  min-width: 720px;
  color: var(--color-text-muted);
  font-size: 14px;
}

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

.data-table th,
.network-table th {
  color: var(--color-text);
  background: var(--color-panel-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.network-table .region-row th {
  padding-top: 20px;
  padding-bottom: 12px;
  color: var(--color-accent-dark);
  background: var(--color-accent-faint);
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}

.country-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--color-text);
  font-weight: 680;
}

.country-flag {
  flex: 0 0 auto;
  font-size: 20px;
}

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

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

.platform-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--color-panel);
  box-shadow: var(--shadow-paper);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.platform-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-stage);
}

.platform-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: var(--radius-md);
  color: var(--color-accent-dark);
  background: var(--color-panel-soft);
}

.platform-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.platform-card p {
  margin-bottom: 20px;
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.platform-card .button {
  width: 100%;
  margin-top: auto;
  padding-inline: 12px;
}

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

.article-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 3vw, 30px);
  border-radius: var(--radius-lg);
  background: var(--color-panel);
  box-shadow: var(--shadow-paper);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-stage);
}

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

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

.article-card p {
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.75;
}

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

.callout {
  position: relative;
  margin: 28px 0;
  padding: 22px 24px 22px 30px;
  overflow: hidden;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  background: var(--color-panel-soft);
}

.callout::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--color-accent);
}

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

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

.callout-warn {
  background: var(--color-warn-soft);
}

.callout-warn::before {
  background: var(--color-warn);
}

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

.promo-block {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  margin-top: 56px;
  padding: clamp(28px, 5vw, 48px);
  overflow: hidden;
  border-radius: var(--radius-xl);
  color: var(--color-white);
  background:
    radial-gradient(circle at 92% 0, var(--color-accent-mid), transparent 34%),
    var(--color-accent-dark);
  box-shadow: var(--shadow-stage);
}

.promo-block::after {
  content: "";
  position: absolute;
  inset: auto 8% 0 auto;
  width: 150px;
  height: 100px;
  border-radius: 100px 100px 0 0;
  box-shadow:
    inset 0 0 0 12px var(--color-accent-soft),
    inset 0 0 0 28px var(--color-accent-mid);
  opacity: 0.45;
}

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

.promo-copy h2,
.promo-copy h3 {
  margin-bottom: 10px;
  color: var(--color-white);
}

.promo-copy p {
  max-width: 640px;
  margin-bottom: 0;
  color: var(--color-accent-pale);
}

.promo-block .button {
  position: relative;
  z-index: 2;
  color: var(--color-accent-dark);
  background: var(--color-white);
}

.feature-browser {
  display: grid;
  grid-template-columns: minmax(180px, 0.72fr) minmax(320px, 1.2fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: stretch;
}

.feature-index,
.feature-track,
.feature-detail {
  min-width: 0;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: var(--color-panel);
  box-shadow: var(--shadow-paper);
}

.feature-index {
  display: grid;
  align-content: start;
  gap: 8px;
}

.feature-index button {
  min-height: 48px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--color-text-muted);
  background: transparent;
  text-align: left;
  font-weight: 650;
}

.feature-index button:hover,
.feature-index button[aria-selected="true"] {
  color: var(--color-accent-dark);
  background: var(--color-panel-soft);
}

.feature-track {
  position: relative;
  display: grid;
  align-content: center;
  gap: 18px;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent, var(--color-accent-faint), transparent),
    var(--color-panel);
}

.feature-stop {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 12px;
  color: var(--color-text-muted);
}

.feature-stop::before {
  content: "";
  width: 36px;
  height: 36px;
  border-radius: 18px 18px 8px 8px;
  background: var(--color-accent-pale);
  box-shadow: inset 0 0 0 6px var(--color-panel);
}

.feature-stop:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 33px;
  bottom: -21px;
  left: 17px;
  border-left: 2px dashed var(--color-accent-soft);
}

.feature-stop.is-active {
  color: var(--color-accent-dark);
  font-weight: 720;
}

.feature-stop.is-active::before {
  background: var(--color-success);
}

.feature-detail {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--color-panel-soft);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0;
}

.stat-card {
  min-width: 0;
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--color-panel);
  box-shadow: var(--shadow-paper);
}

.stat-num {
  display: block;
  margin-bottom: 5px;
  color: var(--color-accent-dark);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.stat-label {
  color: var(--color-text-muted);
  font-size: 13px;
}

.check-list {
  padding: 0;
  list-style: none;
}

.check-list li {
  padding-left: 0;
}

.verdict {
  margin: 24px 0;
  padding: 18px 20px;
  border-left: 6px solid var(--color-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--color-panel-soft);
}

.tunnel-stage {
  position: relative;
  width: 100%;
  min-height: 399px;
  margin-top: 20px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 79% 17%, var(--color-success-soft) 0, transparent 23%),
    linear-gradient(180deg, var(--color-panel) 0%, var(--color-panel-soft) 100%);
  box-shadow: var(--shadow-stage);
}

.tunnel-stage::before {
  content: "";
  position: absolute;
  right: 7%;
  bottom: 23px;
  left: 7%;
  height: 84px;
  border-radius: var(--radius-pill);
  background: var(--color-tunnel-floor);
  opacity: 0.52;
  transform: perspective(240px) rotateX(52deg);
}

.stage-label {
  position: absolute;
  z-index: 5;
  top: 19px;
  left: 22px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 620;
  letter-spacing: 0.03em;
}

.stage-label::before {
  content: "";
  width: 22px;
  height: 2px;
  flex: 0 0 22px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
}

.stage-facts {
  position: absolute;
  z-index: 5;
  top: 15px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stage-fact {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  color: var(--color-accent-dark);
  background: var(--color-panel-translucent);
  box-shadow: var(--shadow-paper);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.tunnel-art {
  position: absolute;
  inset: 40px 0 0;
  width: 100%;
  height: calc(100% - 40px);
}

.arch-far {
  fill: none;
  stroke: var(--color-accent-pale);
  stroke-width: 22;
  stroke-linecap: round;
}

.arch-mid {
  fill: none;
  stroke: var(--color-accent-soft);
  stroke-width: 18;
  stroke-linecap: round;
}

.arch-near {
  fill: none;
  stroke: var(--color-accent-mid);
  stroke-width: 18;
  stroke-linecap: round;
}

.arch-front {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 20;
  stroke-linecap: round;
}

.arch-highlight {
  fill: none;
  stroke: var(--color-success);
  stroke-width: 7;
  stroke-linecap: round;
}

.tunnel-rail {
  fill: none;
  stroke: var(--color-accent-soft);
  stroke-width: 7;
  stroke-linecap: round;
}

.tunnel-rail-dash {
  fill: none;
  stroke: var(--color-success);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 8 13;
}

.lock-body {
  fill: var(--color-accent);
}

.lock-body-soft {
  fill: var(--color-accent-mid);
}

.lock-shackle {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 10;
  stroke-linecap: round;
}

.lock-shackle-soft {
  fill: none;
  stroke: var(--color-accent-mid);
  stroke-width: 9;
  stroke-linecap: round;
}

.lock-key {
  fill: var(--color-white);
}

.city-far {
  fill: var(--color-city-far);
}

.city-near {
  fill: var(--color-city-near);
}

.city-window {
  fill: var(--color-white);
  opacity: 0.72;
}

.packet-shadow {
  fill: var(--color-shadow);
}

.packet-body {
  fill: var(--color-panel);
}

.packet-shell {
  fill: var(--color-accent);
}

.packet-core {
  fill: var(--color-accent-pale);
}

.packet-line {
  fill: none;
  stroke: var(--color-accent-dark);
  stroke-width: 4;
  stroke-linecap: round;
}

.packet-node {
  fill: var(--color-success);
}

.badge-body {
  fill: var(--color-success);
}

.badge-check {
  fill: none;
  stroke: var(--color-white);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.badge-text {
  fill: var(--color-white);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 720;
}

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

.swatch {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-panel);
  box-shadow: var(--shadow-paper);
}

.swatch-color {
  height: 84px;
}

.swatch-copy {
  padding: 13px;
}

.swatch-copy strong,
.swatch-copy code {
  display: block;
  overflow-wrap: anywhere;
}

.swatch-copy code {
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: 11px;
}

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

.swatch-panel {
  background: var(--color-panel);
  box-shadow: inset 0 0 0 1px var(--color-border);
}

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

.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-warn {
  background: var(--color-warn);
}

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

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

.preview-stack {
  display: grid;
  gap: 24px;
}

.preview-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.preview-footer {
  margin-top: 0;
}

@media (max-width: 1020px) {
  .platform-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .feature-browser {
    grid-template-columns: minmax(170px, 0.7fr) minmax(0, 1.3fr);
  }

  .feature-detail {
    grid-column: 1 / -1;
  }

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

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

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

  .feature-browser {
    display: block;
  }

  .feature-index,
  .feature-track,
  .feature-detail {
    margin-bottom: 14px;
  }

  .feature-index {
    display: flex;
    overflow-x: auto;
  }

  .feature-index button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

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

  .promo-block .button {
    width: max-content;
  }

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

  .tunnel-stage {
    min-height: 330px;
  }

  .tunnel-art {
    width: 150%;
    max-width: none;
    transform: translateX(-17%);
  }
}

@media (max-width: 640px) {
  .plan-ribbon {
    position: static;
    align-self: flex-start;
    margin-bottom: 10px;
  }

  .plan-name {
    padding-right: 0;
  }

  .tab-list {
    width: 100%;
    justify-content: flex-start;
    margin-bottom: 24px;
  }

  .toc-tabs {
    margin-inline: 0;
    border-radius: var(--radius-md);
  }

  .faq-item summary {
    padding-inline: 17px;
  }

  .faq-answer {
    padding-right: 17px;
    padding-left: 17px;
  }

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

  .platform-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 15px;
  }

  .platform-icon {
    grid-row: 1 / 4;
  }

  .platform-card .button {
    width: max-content;
    max-width: 100%;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .promo-block .button {
    width: 100%;
  }

  .stage-label {
    top: 16px;
    left: 16px;
  }

  .stage-facts {
    top: 52px;
    right: 12px;
    left: 12px;
    justify-content: center;
    flex-wrap: wrap;
  }

  .stage-fact {
    white-space: normal;
  }

  .tunnel-art {
    inset-top: 74px;
    height: calc(100% - 74px);
  }
}