.hero-preview {
  position: relative;
  max-width: 100%;
  overflow-x: clip;
  padding-top: 32px;
  background: linear-gradient(180deg, var(--color-bg-top), var(--color-bg-bottom));
}

.hero-preview::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--color-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-grid) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, var(--color-text) 55%, transparent);
  content: "";
}

.hero-glow {
  position: absolute;
  inset: -12% 22% auto;
  height: 58%;
  max-width: 100%;
  pointer-events: none;
  background: radial-gradient(closest-side, var(--color-glow), transparent);
  opacity: .7;
  animation: atmosphere-breathe 14s ease-in-out infinite alternate;
}

@keyframes atmosphere-breathe {
  from { opacity: .45; }
  to { opacity: .85; }
}

.hero-preview .wrap {
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-muted);
  background: var(--color-panel);
  box-shadow: var(--shadow-soft);
  font-family: var(--font-mono);
  font-size: 12px;
}

.hero-title {
  margin-top: 20px;
}

.highlight-word {
  background: linear-gradient(transparent 64%, var(--color-accent-soft) 64%, var(--color-accent-soft) 94%, transparent 94%);
}

.hero-subrow {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 18px;
}

.hero-subtitle {
  grid-column: 2;
  max-width: 760px;
  margin: 0;
  color: var(--color-muted);
  font-size: 18px;
  line-height: 1.55;
}

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

.hero-new-link {
  grid-column: 3;
  justify-self: end;
  min-height: 28px;
  color: var(--color-muted);
  font-size: 14px;
  white-space: nowrap;
}

.hero-new-link strong {
  margin-right: 6px;
  color: var(--color-text);
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 16px 0 0;
  padding: 0;
  color: var(--color-muted);
  font-size: 13px;
  list-style: none;
}

.hero-trust li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-trust li + li::before {
  margin: 0 10px;
  color: var(--color-faint);
  content: "·";
}

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

.platform-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin: 18px 0 0;
  padding: 0;
  color: var(--color-muted);
  list-style: none;
}

.platform-row li {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.platform-row svg,
.platform-icon {
  width: 18px;
  height: 18px;
}

.hero-device {
  position: relative;
  z-index: 1;
  margin-top: 28px;
}

.hero-device::before {
  position: absolute;
  z-index: 0;
  top: 28px;
  right: 24px;
  left: 24px;
  height: 280px;
  border-radius: 24px;
  background: var(--color-window-shadow);
  filter: blur(34px);
  content: "";
}

.client-window {
  position: relative;
  z-index: 1;
  display: flex;
  height: 396px;
  overflow: hidden;
  flex-direction: column;
  border-radius: var(--radius-medium);
  color: var(--color-window-text);
  background: linear-gradient(180deg, var(--color-window-top), var(--color-window));
  box-shadow: inset 0 0 0 1px var(--color-window-line), inset 0 1px 0 var(--color-window-highlight);
  mask-image: linear-gradient(180deg, var(--color-text) 78%, transparent);
}

.client-titlebar {
  display: flex;
  height: 40px;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  padding-inline: 16px;
  border-bottom: 1px solid var(--color-window-line);
}

.client-titlebar svg {
  width: 16px;
  height: 16px;
}

.client-caption {
  color: var(--color-window-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.client-caption strong {
  color: var(--color-window-text);
  font-weight: 500;
}

.client-status-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  margin-left: auto;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-ring);
}

.client-body {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: 200px minmax(0, 1fr) 220px;
}

.client-regions {
  min-width: 0;
  padding: 14px 10px;
  border-right: 1px solid var(--color-window-line);
}

.client-cap {
  padding: 0 8px 10px;
  color: var(--color-window-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.region-item {
  display: flex;
  height: 34px;
  align-items: center;
  gap: 10px;
  padding-inline: 8px;
  border-radius: 6px;
  color: var(--color-window-muted);
  font-size: 13px;
}

.region-item.is-current {
  color: var(--color-window-text);
  background: var(--color-window-row);
}

.region-item svg {
  width: 20px;
  height: 14px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px var(--color-window-line-strong);
}

.region-type {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
}

.client-main {
  min-width: 0;
  padding: 16px 18px;
}

.client-detail {
  height: 100%;
  padding: 16px 18px;
  border: 1px solid var(--color-window-line);
  border-radius: var(--radius-small);
  background: var(--color-window-card);
}

.client-detail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.client-detail h2 {
  margin: 0;
  color: var(--color-window-text);
  font-size: 18px;
  font-weight: 600;
}

.client-id {
  color: var(--color-window-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.client-data-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.client-label {
  color: var(--color-window-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.client-chips {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
}

.client-chip {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding-inline: 10px;
  border: 1px solid var(--color-window-line);
  border-radius: var(--radius-pill);
  color: var(--color-window-muted);
  font-size: 12px;
}

.client-chip.is-current {
  border-color: var(--color-window-line-strong);
  color: var(--color-window-text);
  background: var(--color-window-row);
}

.client-values {
  color: var(--color-window-text);
  font-size: 13px;
}

.client-values span + span::before {
  margin-inline: 8px;
  color: var(--color-window-muted);
  content: "·";
}

.client-note {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--color-window-line-strong);
  color: var(--color-window-muted);
  font-size: 12px;
}

.client-status {
  min-width: 0;
  padding: 14px 16px;
  border-left: 1px solid var(--color-window-line);
}

.client-status .client-cap {
  padding-inline: 0;
}

.client-stat {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--color-window-line);
  color: var(--color-window-text);
  font-size: 12px;
}

.client-stat:last-child {
  border-bottom: 0;
}

.client-stat svg {
  width: 16px;
  height: 16px;
  color: var(--color-window-muted);
}

.client-stat-label {
  color: var(--color-window-muted);
}

.device-float {
  position: absolute;
  z-index: 3;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-medium);
  background: var(--color-panel);
  box-shadow: var(--shadow-panel), inset 0 1px 0 var(--color-highlight);
}

.encryption-float {
  top: -22px;
  right: -28px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 10px;
}

.encryption-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  place-items: center;
  border-radius: var(--radius-small);
  color: var(--color-panel);
  background: var(--color-text);
}

.encryption-icon svg {
  width: 18px;
  height: 18px;
}

.encryption-copy strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}

.encryption-copy span {
  display: block;
  margin-top: 3px;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.flag-float {
  bottom: 36px;
  left: -28px;
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 14px;
  padding: 7px 16px 7px 14px;
  border-radius: var(--radius-pill);
}

.flag-caption {
  padding-right: 12px;
  border-right: 1px solid var(--color-border);
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.flag-list {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flag-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text);
  font-size: 12px;
  font-weight: 600;
}

.flag-list svg,
.flag-inline {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px var(--color-border-soft);
}

.flag-red { fill: var(--color-flag-red); }
.flag-white { fill: var(--color-flag-white); }
.flag-blue { fill: var(--color-flag-blue); }
.flag-navy { fill: var(--color-flag-navy); }
.flag-green { fill: var(--color-flag-green); }
.flag-white-stroke { stroke: var(--color-flag-white); }
.flag-red-stroke { stroke: var(--color-flag-red); }

.preview-peek {
  padding-top: 40px;
  padding-bottom: 64px;
}

.preview-fig {
  display: block;
  margin-bottom: 14px;
  color: var(--color-brand-deep);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
}

.preview-peek p {
  max-width: 760px;
  margin: 0;
  color: var(--color-muted);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.45;
}

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

.tab-list {
  display: flex;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-panel-sunk);
}

.tab-list [role="tab"] {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: var(--radius-small);
  color: var(--color-muted);
  background: transparent;
  font-weight: 700;
}

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

.tab-panel {
  padding-top: 24px;
}

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

.toc-tabs {
  position: sticky;
  z-index: 20;
  top: 12px;
  display: flex;
  max-width: 100%;
  overflow-x: auto;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-panel);
  box-shadow: var(--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-muted);
  font-size: 13px;
  font-weight: 600;
}

.toc-tabs a.is-current,
.toc-tabs a[aria-current="location"] {
  color: var(--color-text);
  background: var(--color-panel-sunk);
  box-shadow: inset 0 -2px 0 var(--color-accent);
}

body:has(.toc-tabs) section[id] {
  scroll-margin-top: var(--toc-offset);
}

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

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

.faq-item summary {
  position: relative;
  min-height: 56px;
  padding: 15px 48px 15px 18px;
  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: 18px;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  border-radius: 50%;
  color: var(--color-text);
  background: var(--color-panel-sunk);
  content: "+";
  font-family: var(--font-mono);
  line-height: 22px;
  text-align: center;
}

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

.faq-answer {
  padding: 0 18px 18px;
  color: var(--color-muted);
}

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

.price-card {
  position: relative;
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-panel);
  box-shadow: var(--shadow-soft), inset 0 1px 0 var(--color-highlight);
}

.price-card.is-featured {
  border-color: var(--color-accent-dark);
  box-shadow: 0 18px 44px var(--color-accent-glow), inset 0 3px 0 var(--color-accent);
}

.price-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  color: var(--color-text);
  background: var(--color-accent);
}

.price-name {
  margin: 0;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.price-value {
  margin: 20px 0 8px;
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
}

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

.price-features {
  min-height: 148px;
  margin: 24px 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--color-border);
  list-style: none;
}

.price-features li {
  padding: 5px 0;
  color: var(--color-muted);
}

.price-features li::before {
  margin-right: 8px;
  color: var(--color-success);
  content: "✓";
  font-weight: 800;
}

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

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

.route-table tbody tr:hover,
.compare-table tbody tr:hover,
.data-table tbody tr:hover {
  background: var(--color-bg-top);
}

.route-group td {
  color: var(--color-text);
  background: var(--color-panel-sunk);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.prose > .data-table {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  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-width: 0;
  min-height: 176px;
  align-items: flex-start;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-panel);
  box-shadow: inset 0 1px 0 var(--color-highlight);
}

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

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

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

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

.article-card {
  display: flex;
  min-width: 0;
  min-height: 260px;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-panel);
  box-shadow: var(--shadow-soft);
}

.article-card time {
  color: var(--color-faint);
  font-family: var(--font-mono);
  font-size: 11px;
}

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

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

.article-card-link {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  margin-top: auto;
  color: var(--color-text);
  font-weight: 700;
}

.callout {
  padding: 20px 22px;
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius-medium) var(--radius-medium) 0;
  color: var(--color-muted);
  background: var(--color-panel);
  box-shadow: var(--shadow-soft);
}

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

.promo-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 30px;
  border-radius: var(--radius-medium);
  color: var(--color-window-text);
  background: linear-gradient(145deg, var(--color-window-top), var(--color-window));
  box-shadow: var(--shadow-window);
}

.promo-block h2,
.promo-block h3 {
  color: var(--color-window-text);
}

.promo-block p {
  margin: 6px 0 0;
  color: var(--color-window-muted);
}

.float-cta {
  position: fixed;
  z-index: 80;
  right: max(18px, env(safe-area-inset-right, 0px));
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 18px 10px 12px;
  border: 1px solid var(--color-accent-dark);
  border-radius: var(--radius-pill);
  color: var(--color-text);
  background: var(--color-accent);
  box-shadow: 0 14px 34px var(--color-accent-glow);
  font-weight: 800;
}

.float-cta svg {
  width: 24px;
  height: 24px;
  padding: 5px;
  border-radius: 50%;
  background: var(--color-panel);
}

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

.preview-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.preview-section-head p {
  max-width: 540px;
  margin: 0;
  color: var(--color-muted);
}

.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: 76px;
}

.swatch-info {
  padding: 12px;
}

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

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

.swatch-bg { background: var(--color-bg); }
.swatch-panel { background: var(--color-panel); }
.swatch-sunk { background: var(--color-panel-sunk); }
.swatch-border { background: var(--color-border); }
.swatch-accent { background: var(--color-accent); }
.swatch-text { background: var(--color-text); }
.swatch-muted { background: var(--color-muted); }
.swatch-success { background: var(--color-success); }
.swatch-warning { background: var(--color-warning); }
.swatch-error { background: var(--color-error); }

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

.type-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.type-label {
  color: var(--color-faint);
  font-family: var(--font-mono);
  font-size: 11px;
}

.type-display {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.02em;
}

.type-heading {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
}

.type-body {
  max-width: 700px;
  color: var(--color-muted);
  font-size: 17px;
}

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

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

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

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

@media (max-width: 1024px) {
  .client-body {
    grid-template-columns: 180px minmax(0, 1fr) 200px;
  }

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

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

@media (max-width: 768px) {
  .hero-subrow {
    grid-template-columns: 1fr;
  }

  .hero-subtitle,
  .hero-new-link {
    grid-column: 1;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-new-link {
    justify-self: center;
    margin-top: 8px;
  }

  .platform-row {
    gap: 18px;
  }

  .hero-device {
    display: flex;
    flex-direction: column;
  }

  .hero-device::before {
    display: none;
  }

  .client-window {
    height: auto;
    order: 2;
  }

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

  .client-main {
    display: none;
  }

  .client-regions {
    border-right: 0;
  }

  .client-status {
    border-top: 1px solid var(--color-window-line);
    border-left: 0;
  }

  .client-stat:nth-of-type(n+4) {
    display: none;
  }

  .device-float {
    position: static;
  }

  .encryption-float {
    width: max-content;
    max-width: 100%;
    margin: 0 auto 14px;
    order: 1;
  }

  .flag-float {
    width: max-content;
    max-width: 100%;
    min-height: 0;
    flex-wrap: wrap;
    margin: 14px auto 0;
    order: 3;
    border-radius: var(--radius-medium);
  }

  .flag-list {
    flex-wrap: wrap;
    gap: 10px 14px;
  }

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

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

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

  .preview-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .hero-actions {
    width: 100%;
    flex-direction: column;
  }

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

  .hero-trust {
    display: grid;
    gap: 5px;
  }

  .hero-trust li + li::before {
    display: none;
  }

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

  .type-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .flag-caption {
    width: 100%;
    padding: 0 0 7px;
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
  }

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

@media (prefers-reduced-motion: reduce) {
  .hero-glow {
    animation: none;
  }
}