.tab-set {
  min-width: 0;
}

.tab-list {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  padding: 5px;
  -webkit-overflow-scrolling: touch;
}

.tab-list [role="tab"] {
  min-width: 88px;
  min-height: 42px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  padding: 8px 17px;
  color: var(--color-muted);
  cursor: pointer;
  font-weight: 700;
}

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

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

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

.toc-tabs {
  position: sticky;
  top: 12px;
  z-index: 45;
  display: flex;
  max-width: 100%;
  gap: 7px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  padding: 6px;
  box-shadow: var(--shadow-soft);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

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

.toc-tabs a {
  display: inline-flex;
  min-height: 40px;
  flex-shrink: 0;
  align-items: center;
  border-radius: var(--radius-pill);
  padding: 7px 15px;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 680;
}

.toc-tabs a:hover,
.toc-tabs a.is-current {
  background: var(--color-panel-alt);
  color: var(--color-accent);
}

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

.faq-item {
  overflow: clip;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-panel);
  box-shadow: var(--shadow-soft);
}

.faq-item summary {
  position: relative;
  min-height: 64px;
  display: flex;
  align-items: center;
  padding: 18px 58px 18px 22px;
  cursor: pointer;
  font-weight: 730;
  list-style: none;
}

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

.faq-item summary::after {
  position: absolute;
  right: 22px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--color-panel-alt);
  color: var(--color-accent);
  content: "+";
  font-size: 20px;
  line-height: 1;
  transition: transform var(--transition-fast);
}

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

.faq-answer {
  border-top: 1px solid var(--color-border);
  padding: 18px 22px 22px;
  color: var(--color-muted);
}

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

.plan-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-panel);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.plan-card:hover {
  transform: translateY(-2px);
}

.plan-card.is-featured {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-device);
}

.plan-ribbon {
  position: absolute;
  top: 18px;
  right: 18px;
  border-radius: var(--radius-pill);
  background: var(--color-tint-cream);
  padding: 5px 11px;
  color: var(--color-text);
  font-size: 12px;
  font-weight: 780;
}

.plan-name {
  padding-right: 72px;
  font-size: 20px;
  font-weight: 780;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 22px;
  font-family: var(--font-display);
}

.plan-price strong {
  font-size: 42px;
  line-height: 1;
  letter-spacing: -0.02em;
}

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

.plan-quota {
  margin-top: 11px;
  color: var(--color-muted);
}

.plan-features {
  display: grid;
  gap: 10px;
  margin: 24px 0;
}

.plan-features li {
  position: relative;
  padding-left: 25px;
  color: var(--color-muted);
}

.plan-features li::before {
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--color-hill-mid);
  color: var(--color-bush-dark);
  content: "✓";
  font-size: 11px;
  font-weight: 800;
}

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

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

.data-table,
.server-table,
.compare-table {
  width: 100%;
  min-width: 720px;
}

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

.data-table th,
.server-table th,
.compare-table th {
  background: var(--color-panel-alt);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 780;
}

.data-table td:first-child,
.server-table td:first-child,
.compare-table td:first-child {
  color: var(--color-text);
  font-weight: 680;
}

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

.server-group-row th {
  background: var(--color-hill-far);
  color: var(--color-bush-dark);
}

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

.status-yes {
  color: var(--color-success);
  font-weight: 730;
}

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

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

.platform-card:hover {
  transform: translateY(-2px);
}

.platform-icon {
  width: 44px;
  height: 44px;
  display: grid;
  flex-shrink: 0;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--color-panel-alt);
  color: var(--color-accent);
}

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

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

.platform-card p {
  margin: 7px 0 18px;
  color: var(--color-muted);
  font-size: 14px;
}

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

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

.article-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-panel);
  padding: 25px;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-fast);
}

.article-card:hover {
  transform: translateY(-2px);
}

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

.article-card h3 {
  margin-top: 17px;
  font-size: 21px;
}

.article-card p {
  margin-top: 12px;
  color: var(--color-muted);
}

.article-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  margin-top: auto;
  padding-top: 20px;
  color: var(--color-accent);
  font-weight: 720;
}

.callout {
  position: relative;
  overflow-x: clip;
  border: 1px solid var(--color-border);
  border-left: 5px solid var(--color-accent);
  border-radius: var(--radius-lg);
  background: var(--color-panel);
  padding: 22px 24px;
  box-shadow: var(--shadow-soft);
}

.callout--success {
  border-left-color: var(--color-success);
  background: var(--color-hill-far);
}

.callout-title {
  display: block;
  margin-bottom: 6px;
  color: var(--color-text);
  font-weight: 780;
}

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

.promo-block {
  position: relative;
  overflow-x: clip;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 26px;
  border-radius: var(--radius-xl);
  background: var(--color-accent);
  padding: clamp(28px, 5vw, 52px);
  color: var(--color-panel);
  box-shadow: var(--shadow-device);
}

.promo-block h2 {
  color: var(--color-panel);
  font-size: clamp(28px, 4vw, 44px);
}

.promo-block p {
  margin-top: 8px;
  color: var(--color-hill-far);
}

.promo-block .btn {
  background: var(--color-panel);
  color: var(--color-accent-dark);
}

.float-cta {
  position: fixed;
  right: max(20px, env(safe-area-inset-right, 0px));
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  z-index: 70;
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  padding: 12px 23px;
  color: var(--color-panel);
  font-weight: 760;
  box-shadow: var(--shadow-float);
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.float-cta:hover {
  transform: translateY(-2px);
  background: var(--color-accent-dark);
}

.float-cta svg {
  width: 18px;
  height: 18px;
}

body:has(.float-cta)::after {
  display: block;
  height: calc(88px + env(safe-area-inset-bottom, 0px));
  content: "";
}

.feature-mosaic {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 24px;
}

.feature-card {
  overflow: clip;
  border-radius: var(--radius-xl);
  background: var(--color-panel);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-fast);
}

.feature-card:nth-child(2),
.feature-card:nth-child(5) {
  transform: translateY(-18px);
}

.feature-card:hover {
  transform: translateY(-2px);
}

.feature-card:nth-child(2):hover,
.feature-card:nth-child(5):hover {
  transform: translateY(-20px);
}

.feature-art {
  height: 220px;
  display: grid;
  place-items: center;
}

.feature-art--lavender {
  background: var(--color-tint-lavender);
}

.feature-art--teal {
  background: var(--color-tint-teal);
}

.feature-art--orange {
  background: var(--color-tint-orange);
}

.feature-art svg {
  width: min(240px, 82%);
  height: 160px;
}

.feature-copy {
  padding: 28px;
}

.feature-copy h3 {
  font-size: 23px;
}

.feature-copy p {
  margin-top: 12px;
  color: var(--color-muted);
}

/* Preview page */
.preview-page {
  background: var(--color-bg);
}

.preview-static-nav {
  position: relative;
  z-index: 30;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-panel);
}

.preview-hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  overflow: hidden;
  padding-bottom: 390px;
}

.preview-hero-copy {
  position: relative;
  z-index: 8;
  width: min(920px, calc(100% - var(--gutter) * 2));
  margin-inline: auto;
  padding-top: clamp(36px, 6vh, 68px);
  text-align: center;
}

.preview-hero-copy .eyebrow {
  margin-inline: auto;
}

.preview-hero-copy h1 {
  margin-top: 20px;
}

.preview-hero-copy .btn-row {
  justify-content: center;
  margin-top: 28px;
}

.preview-hero-sub {
  max-width: 680px;
  margin: 20px auto 0;
  color: var(--color-muted);
  font-size: 17px;
}

.preview-hero-sub strong {
  color: var(--color-text);
}

.hero-capsule {
  width: fit-content;
  max-width: 100%;
  margin: 24px auto 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-panel);
  padding: 11px 24px;
  box-shadow: var(--shadow-soft);
}

.platform-strip,
.flag-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 24px;
}

.platform-strip {
  padding-bottom: 10px;
}

.flag-strip {
  border-top: 1px solid var(--color-border);
  padding-top: 10px;
}

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

.platform-strip svg {
  width: 17px;
  height: 17px;
  color: var(--color-muted);
}

.platform-text-mark {
  width: 21px;
  height: 21px;
  display: inline-grid;
  flex-shrink: 0;
  place-items: center;
  border-radius: 6px;
  background: var(--color-panel-alt);
  color: var(--color-accent-dark);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
}

.flag-strip svg {
  width: 24px;
  height: 16px;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 0 0 1px var(--color-border);
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 12px;
  margin-top: 15px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 630;
}

.hero-trust i {
  color: var(--color-border);
  font-style: normal;
}

.preview-cloud {
  position: absolute;
  z-index: 1;
  width: 150px;
  height: 38px;
  border-radius: var(--radius-pill);
  background: var(--color-panel);
}

.preview-cloud::before {
  position: absolute;
  left: 30px;
  top: -20px;
  width: 62px;
  height: 49px;
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  content: "";
}

.preview-cloud--left {
  left: 7%;
  top: 92px;
}

.preview-cloud--right {
  right: 7%;
  top: 160px;
  transform: scale(0.82);
}

.hero-scene {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  height: 430px;
  pointer-events: none;
}

.hero-scene > svg {
  width: 100%;
  height: 430px;
  display: block;
}

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

.scene-hill-mid {
  fill: var(--color-hill-mid);
}

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

.scene-bush {
  fill: var(--color-bush);
}

.scene-bush-dark {
  fill: var(--color-bush-dark);
}

.scene-route {
  fill: none;
  stroke: var(--color-tint-lavender);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.scene-route--teal {
  stroke: var(--color-tint-teal);
}

.scene-node {
  fill: var(--color-panel);
  filter: drop-shadow(0 8px 11px var(--color-shadow-soft));
}

.scene-tab-lavender {
  fill: var(--color-tint-lavender);
}

.scene-tab-teal {
  fill: var(--color-tint-teal);
}

.scene-tab-orange {
  fill: var(--color-tint-orange);
}

.scene-tab-cream {
  fill: var(--color-tint-cream);
}

.scene-city {
  fill: var(--color-text);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 750;
}

.scene-code {
  fill: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.scene-dot {
  fill: var(--color-accent);
}

.client-mock {
  position: absolute;
  right: clamp(24px, 7vw, 110px);
  bottom: 40px;
  z-index: 5;
  width: min(340px, 32vw);
  overflow: clip;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-panel);
  box-shadow: var(--shadow-device);
  transform: rotate(0.45deg);
}

.client-chrome {
  height: 39px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-panel-alt);
  padding-inline: 15px;
}

.chrome-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
}

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

.chrome-dot--warning {
  background: var(--color-warning);
}

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

.client-body {
  padding: 18px;
}

.client-label {
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 700;
}

.client-route {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 9px;
  border-radius: var(--radius-md);
  background: var(--color-hill-far);
  padding: 13px;
}

.client-route strong {
  display: block;
  font-size: 14px;
}

.client-route span {
  color: var(--color-muted);
  font-size: 12px;
}

.client-status {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--color-success);
}

.client-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 15px;
  color: var(--color-muted);
  font-size: 13px;
}

.client-switch {
  width: 42px;
  height: 24px;
  display: flex;
  justify-content: flex-end;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  padding: 3px;
}

.client-switch::after {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  content: "";
}

.preview-section {
  padding-top: 88px;
  padding-bottom: 88px;
}

.preview-grid {
  display: grid;
  gap: 20px;
}

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

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

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

.token-card {
  overflow: clip;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-panel);
}

.token-swatch {
  height: 86px;
}

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

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

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

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

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

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

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

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

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

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

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

.token-swatch--lavender {
  background: var(--color-tint-lavender);
}

.token-swatch--teal {
  background: var(--color-tint-teal);
}

.token-swatch--orange {
  background: var(--color-tint-orange);
}

.token-swatch--cream {
  background: var(--color-tint-cream);
}

.token-label {
  padding: 13px;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.type-samples {
  display: grid;
  gap: 30px;
}

.type-sample {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 26px;
}

.type-caption {
  display: block;
  margin-bottom: 8px;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.component-stack {
  display: grid;
  gap: 26px;
}

.preview-footer {
  margin-top: 80px;
}

@media (max-width: 980px) {
  .plan-grid,
  .article-grid,
  .feature-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .feature-card:nth-child(2),
  .feature-card:nth-child(5) {
    transform: none;
  }

  .client-mock {
    display: none;
  }
}

@media (max-width: 768px) {
  .preview-hero {
    min-height: auto;
    padding-bottom: 300px;
  }

  .preview-cloud {
    display: none;
  }

  .hero-scene {
    height: 310px;
  }

  .hero-scene > svg {
    width: 1120px;
    height: 310px;
    transform: translateX(-34%);
  }

  .preview-grid--two,
  .preview-grid--three {
    grid-template-columns: 1fr;
  }

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

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

  .promo-block .btn {
    justify-self: start;
  }
}

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

  .tab-list {
    width: 100%;
  }

  .tab-list [role="tab"] {
    flex: 1 0 auto;
  }

  .hero-capsule {
    width: 100%;
    padding-inline: 14px;
  }

  .platform-strip,
  .flag-strip {
    gap: 12px 14px;
  }

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

  .float-cta {
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }
}