.tabs {
  display: grid;
  gap: 24px;
}

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

.tab-list [role="tab"] {
  min-width: 88px;
  min-height: 40px;
  padding: 8px 17px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.tab-list [role="tab"][aria-selected="true"] {
  background: var(--color-accent);
  color: var(--color-button-text);
  font-weight: 750;
}

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

.toc-tabs {
  position: sticky;
  top: 12px;
  z-index: 50;
  display: flex;
  max-width: 100%;
  gap: 6px;
  margin-bottom: 42px;
  padding: 7px;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-panel);
  box-shadow: 0 12px 30px var(--color-shadow-soft);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

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

.toc-tabs a.is-current,
.toc-tabs a[aria-current="location"] {
  background: var(--color-panel-raised);
  color: var(--color-accent);
  font-weight: 700;
}

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

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-panel);
}

.faq-item summary {
  position: relative;
  min-height: 56px;
  padding: 16px 48px 16px 20px;
  color: var(--color-text);
  font-weight: 700;
  list-style: none;
}

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

.faq-item summary::after {
  position: absolute;
  top: 50%;
  right: 20px;
  color: var(--color-accent);
  content: "+";
  font-family: var(--font-mono);
  font-size: 22px;
  transform: translateY(-50%);
}

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

.faq-answer {
  padding: 0 20px 18px;
}

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

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

.plan-card {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-panel);
}

.plan-card.is-featured,
.plan-card[aria-current="true"] {
  border-color: var(--color-accent-strong);
  background: var(--color-panel-raised);
  box-shadow: 0 20px 50px var(--color-shadow-soft), inset 0 1px 0 var(--color-accent-glow-soft);
}

.plan-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-button-text);
  font-size: 11px;
  font-weight: 800;
}

.plan-name {
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 850;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 18px;
  color: var(--color-text);
}

.plan-price strong {
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1;
}

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

.plan-quota {
  margin-bottom: 20px;
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 13px;
}

.plan-features {
  display: grid;
  gap: 10px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.plan-features li {
  position: relative;
  margin: 0;
  padding-left: 20px;
  color: var(--color-text-muted);
}

.plan-features li::before {
  position: absolute;
  top: .67em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  content: "";
}

.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-medium);
  -webkit-overflow-scrolling: touch;
}

.data-table,
.location-table,
.comparison-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: var(--color-panel);
  text-align: left;
}

.data-table th,
.data-table td,
.location-table th,
.location-table td,
.comparison-table th,
.comparison-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
  vertical-align: middle;
}

.data-table th,
.location-table th,
.comparison-table th {
  background: var(--color-panel-raised);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.data-table th:first-child,
.data-table td:first-child,
.location-table th:first-child,
.location-table td:first-child,
.comparison-table th:first-child,
.comparison-table td:first-child {
  color: var(--color-text);
  font-weight: 650;
}

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

.table-group td {
  background: var(--color-panel-raised);
  color: var(--color-accent) !important;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
}

.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 {
  display: flex;
  min-height: 190px;
  align-items: flex-start;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-panel);
}

.platform-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  margin-bottom: 22px;
  border-radius: var(--radius-small);
  background: var(--color-panel-raised);
  color: var(--color-accent);
}

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

.platform-name {
  margin-bottom: 14px;
  font-weight: 800;
}

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

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

.article-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-panel);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.article-card:hover {
  border-color: var(--color-accent-strong);
  transform: translateY(-3px);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

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

.article-card p {
  flex: 1;
}

.article-link {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  color: var(--color-accent);
  font-weight: 700;
}

.callout {
  margin: 28px 0;
  padding: 20px 22px;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-small);
  background: var(--color-panel);
}

.callout strong {
  display: block;
  margin-bottom: 6px;
}

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

.promo-block {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 26px;
  align-items: center;
  margin-top: 56px;
  padding: clamp(24px, 4vw, 40px);
  overflow: hidden;
  border: 1px solid var(--color-accent-strong);
  border-radius: var(--radius-large);
  background: var(--color-panel-raised);
  box-shadow: var(--shadow-panel);
}

.promo-brand {
  margin-bottom: 8px;
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
}

.promo-block p {
  margin-bottom: 0;
}

.float-cta {
  position: fixed;
  right: 28px;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-button-text);
  font-size: 14px;
  font-weight: 800;
  box-shadow: var(--shadow-button);
  transition: transform var(--transition-fast);
}

.float-cta:hover {
  transform: translateY(-2px);
}

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

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

.hero-preview {
  display: flex;
  min-height: calc(100svh - var(--header-height));
  align-items: center;
  overflow-x: clip;
}

.hero-preview-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 640px;
  gap: 56px;
  align-items: center;
  padding-top: 36px;
  padding-bottom: 36px;
}

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

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

.hero-copy h1 .kw {
  color: var(--color-accent);
}

.hero-subtitle {
  max-width: 520px;
  margin-bottom: 24px;
  font-size: 16px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}

.trust-row,
.platform-strip,
.flag-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.trust-row {
  gap: 10px;
  margin-bottom: 25px;
}

.trust-item {
  display: inline-flex;
  max-width: 100%;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.trust-item svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  color: var(--color-success);
}

.platform-strip {
  gap: 20px;
  margin-bottom: 16px;
}

.platform-inline,
.flag-inline {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 7px;
  color: var(--color-text-muted);
  font-size: 13px;
}

.platform-inline svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.flag-strip {
  gap: 16px;
}

.flag-strip-label {
  color: var(--color-accent-strong);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
}

.flag-inline svg {
  width: 24px;
  height: 16px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 3px;
}

.flag-outline {
  fill: none;
  stroke: var(--color-border);
}

.flag-red {
  fill: var(--color-flag-red);
}

.flag-blue {
  fill: var(--color-flag-blue);
}

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

.hub-panel {
  position: relative;
  width: 640px;
  height: 480px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background: var(--color-panel);
  box-shadow: var(--shadow-panel);
}

.hub-panel::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='0.05'/></svg>");
  content: "";
  pointer-events: none;
}

.hub-caption,
.hub-footnote {
  position: absolute;
  z-index: 2;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
}

.hub-caption {
  top: 18px;
  left: 22px;
}

.hub-caption b {
  color: var(--color-accent);
  font-weight: 500;
}

.hub-footnote {
  right: 0;
  bottom: 16px;
  left: 0;
  text-align: center;
}

.hub-arcs {
  position: absolute;
  inset: 0;
  width: 640px;
  height: 480px;
}

.hub-arc {
  fill: none;
  stroke: var(--color-arc);
  stroke-width: 1.5;
}

.hub-arc-highlight {
  fill: none;
  opacity: .28;
  stroke: var(--color-accent-strong);
  stroke-width: 1.5;
}

.hub-core {
  position: absolute;
  top: 240px;
  left: 320px;
  z-index: 3;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 12px var(--color-accent-glow), 0 0 34px var(--color-accent-glow-soft);
}

.hub-halo {
  position: absolute;
  border: 1px solid var(--color-accent);
  border-radius: 50%;
  animation: hub-breathe 3.4s ease-in-out infinite;
}

.hub-halo-one {
  inset: -13px;
  opacity: .5;
}

.hub-halo-two {
  inset: -25px;
  opacity: .28;
  animation-delay: 1.7s;
}

.route-packet {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 8px var(--color-accent-glow);
  opacity: .7;
  offset-rotate: 0deg;
  animation: route-travel 8.5s linear infinite;
}

.route-a {
  offset-path: path("M84 150 C220 160 420 320 556 330");
}

.route-b {
  offset-path: path("M556 150 C420 160 220 320 84 330");
}

.route-delay-one {
  animation-delay: 1.4s;
}

.route-delay-two {
  animation-delay: 2.8s;
}

.route-delay-three {
  animation-delay: 4.2s;
}

.route-delay-four {
  animation-delay: 5.6s;
}

.route-delay-five {
  animation-delay: 7s;
}

.route-node {
  position: absolute;
  z-index: 4;
  display: flex;
  width: 106px;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-panel-raised);
}

.route-node::before {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--color-success);
  content: "";
}

.route-node-name {
  color: var(--color-text);
  font-size: 13px;
  font-weight: 650;
}

.route-node-code {
  margin-left: auto;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.route-hk {
  top: 122px;
  left: 26px;
}

.route-tyo {
  top: 122px;
  right: 26px;
}

.route-lax {
  right: 26px;
  bottom: 142px;
}

.route-sin {
  bottom: 142px;
  left: 26px;
}

.stats-band {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-panel);
}

.stats-band-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 15px;
  padding-bottom: 15px;
}

.stat-item {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .05em;
}

.stat-item b {
  color: var(--color-accent);
  font-size: 16px;
}

.preview-nav {
  border-bottom: 1px solid var(--color-border);
}

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

.preview-title {
  margin-bottom: 38px;
}

.preview-title p {
  max-width: 660px;
}

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

.swatch-color {
  height: 86px;
}

.swatch-info {
  padding: 13px;
}

.swatch-info strong,
.swatch-info code {
  display: block;
}

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

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

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

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

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

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

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

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

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

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

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

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

.type-specimen {
  display: grid;
  gap: 22px;
}

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

.type-label {
  display: block;
  margin-bottom: 8px;
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 11px;
}

.type-display {
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 900;
  line-height: 1.12;
}

.type-heading {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 850;
}

.type-body {
  max-width: 720px;
  color: var(--color-text-muted);
  font-size: 18px;
}

.type-mono {
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 14px;
}

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

.component-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.demo-table {
  min-width: 620px;
}

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

@keyframes hub-breathe {
  0%,
  100% {
    opacity: .5;
    transform: scale(.82);
  }

  50% {
    opacity: .14;
    transform: scale(1.08);
  }
}

@keyframes route-travel {
  0% {
    opacity: 0;
    offset-distance: 0%;
  }

  10% {
    opacity: .9;
  }

  55% {
    opacity: 1;
  }

  90% {
    opacity: .7;
  }

  100% {
    opacity: 0;
    offset-distance: 100%;
  }
}

@media (max-width: 1320px) {
  .hero-preview-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 44px;
  }

  .hero-copy {
    max-width: 680px;
    text-align: center;
  }

  .hero-subtitle {
    margin-inline: auto;
  }

  .hero-actions,
  .trust-row,
  .platform-strip,
  .flag-strip {
    justify-content: center;
  }
}

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

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

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

@media (max-width: 700px) {
  .hub-panel {
    display: none;
  }

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

  .hero-preview-inner {
    min-height: calc(100svh - var(--header-height));
    align-content: center;
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

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

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

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

  .stats-band-inner {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hub-halo,
  .route-packet {
    animation: none;
  }
}