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

.hero-grid {
  display: grid;
  grid-template-columns: 46fr 54fr;
  gap: 56px;
  align-items: center;
  width: 100%;
}

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

.hero-copy .tag {
  margin-bottom: 20px;
}

.hero-copy h1 em {
  color: var(--color-accent);
  font-style: normal;
}

.hero-copy .button-row {
  margin-top: 26px;
  margin-bottom: 24px;
}

.hero-lede {
  max-width: 33em;
  margin-bottom: 12px;
  color: var(--color-ink-soft);
  font-size: 15.5px;
  line-height: 1.92;
}

.hero-lede strong {
  color: var(--color-ink);
  font-weight: 650;
}

.trust-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  color: var(--color-ink-soft);
  font-size: 13px;
}

.trust-separator {
  margin-inline: 10px;
  color: var(--color-line);
}

.hero-meta {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--color-line);
}

.platform-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 26px;
}

.platform-mark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--color-ink);
  font-size: 13px;
  font-weight: 650;
}

.platform-mark svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.flag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
}

.flag-chip {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  padding: 5px 13px 5px 7px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-canvas);
  color: var(--color-ink);
  font-size: 12.5px;
}

.flag-chip svg {
  width: 22px;
  height: 15px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 3px;
}

.hero-device {
  display: flex;
  height: 600px;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 56px 44px;
  border-radius: var(--radius-panel);
  background: linear-gradient(to top right, var(--color-encode-teal), var(--color-encode-amber));
}

.transcode-band {
  width: 100%;
}

.transcode-line {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 2px;
  border-top: 1px solid var(--color-hair-white);
  border-bottom: 1px solid var(--color-hair-white);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.transcode-plain {
  flex: 0 0 auto;
  color: var(--color-white);
  font-size: 13px;
  letter-spacing: 0.05em;
}

.transcode-code {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: var(--color-code-white);
  font-size: 12px;
  letter-spacing: 0.02em;
  text-align: center;
}

.transcode-gate {
  position: relative;
  width: 2px;
  height: 48px;
  flex: 0 0 auto;
  background: var(--color-white);
}

.transcode-gate::before,
.transcode-gate::after {
  position: absolute;
  left: -4px;
  width: 10px;
  height: 2px;
  background: var(--color-white);
  content: "";
}

.transcode-gate::before {
  top: -8px;
}

.transcode-gate::after {
  bottom: -8px;
}

.transcode-stations {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  font-family: var(--font-mono);
}

.transcode-station {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-white);
  font-size: 12.5px;
  letter-spacing: 0.06em;
}

.station-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border: 1.5px solid var(--color-white);
  border-radius: var(--radius-pill);
}

.station-dash {
  width: 14px;
  flex: 0 0 auto;
  border-top: 1.5px solid var(--color-white);
  opacity: 0.8;
}

.station-en {
  margin-left: 3px;
  color: var(--color-code-white);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.tabs {
  width: 100%;
}

.tab-list {
  display: inline-flex;
  max-width: 100%;
  gap: 4px;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-small);
  background: var(--color-surface);
  -webkit-overflow-scrolling: touch;
}

.tab-list [role="tab"] {
  min-height: 42px;
  flex: 0 0 auto;
  padding: 9px 18px;
  border: 0;
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--color-ink-soft);
  font-weight: 650;
}

.tab-list [role="tab"][aria-selected="true"],
.tab-list [role="tab"].is-active {
  background: var(--color-ink);
  color: var(--color-canvas);
}

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

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

.toc-tabs {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  max-width: 100%;
  gap: 6px;
  overflow-x: auto;
  padding: 9px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-small);
  background: var(--color-canvas);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.toc-tabs a {
  min-height: 40px;
  flex: 0 0 auto;
  padding: 9px 14px;
  border-radius: var(--radius-small);
  color: var(--color-ink-soft);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

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

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

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

.faq-item summary {
  position: relative;
  min-height: 64px;
  padding: 20px 46px 20px 0;
  color: var(--color-ink);
  font-weight: 650;
  list-style: none;
  cursor: pointer;
}

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

.faq-item summary::after {
  position: absolute;
  top: 19px;
  right: 4px;
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 21px;
  content: "+";
}

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

.faq-answer {
  max-width: 780px;
  padding: 0 46px 22px 0;
  color: var(--color-ink-soft);
}

.plan-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: 30px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-medium);
  background: var(--color-canvas);
}

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

.plan-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  max-width: calc(100% - 32px);
}

.plan-name {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
}

.plan-price strong {
  font-family: var(--font-display);
  font-size: clamp(42px, 5vw, 58px);
  font-weight: 400;
  line-height: 1;
}

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

.plan-note {
  min-height: 3em;
  color: var(--color-ink-soft);
  font-size: 14px;
}

.plan-features {
  margin: 22px 0 28px;
  padding: 20px 0 0;
  border-top: 1px solid var(--color-line);
  list-style: none;
}

.plan-features li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
}

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

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

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

.data-table,
.location-table,
.compare-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: var(--color-canvas);
  font-size: 14px;
}

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

.data-table th,
.location-table th,
.compare-table th {
  background: var(--color-surface-strong);
  color: var(--color-ink);
  font-weight: 720;
  white-space: nowrap;
}

.data-table tbody tr:nth-child(even),
.location-table tbody tr:nth-child(even),
.compare-table tbody tr:nth-child(even) {
  background: var(--color-surface);
}

.data-table tbody tr:hover,
.location-table tbody tr:hover,
.compare-table tbody tr:hover {
  background: var(--color-accent-tint);
}

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

.table-group-row th {
  background: var(--color-ink);
  color: var(--color-canvas);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
}

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

.platform-card {
  display: flex;
  min-height: 210px;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-medium);
  background: var(--color-canvas);
}

.platform-card-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  margin-bottom: 26px;
  place-items: center;
  border-radius: var(--radius-small);
  background: var(--color-ink);
  color: var(--color-canvas);
}

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

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

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

.platform-card .btn-small {
  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: 28px;
  border-top: 3px solid var(--color-accent);
  border-right: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  border-left: 1px solid var(--color-line);
  border-radius: var(--radius-small);
  background: var(--color-canvas);
}

.article-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--color-ink-soft);
  font-family: var(--font-mono);
  font-size: 11px;
}

.article-card h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
}

.article-card p {
  color: var(--color-ink-soft);
  font-size: 14px;
}

.article-card-link {
  margin-top: auto;
  font-weight: 650;
  text-decoration: none;
}

.callout {
  position: relative;
  margin: 28px 0;
  padding: 22px 24px 22px 54px;
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  background: var(--color-accent-tint);
}

.callout::before {
  position: absolute;
  top: 21px;
  left: 20px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-pill);
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 12px;
  content: "i";
}

.callout-warning {
  border-left-color: var(--color-warning);
  background: var(--color-warning-tint);
}

.callout-warning::before {
  border-color: var(--color-warning);
  color: var(--color-warning);
  content: "!";
}

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

.callout-success::before {
  border-color: var(--color-success);
  color: var(--color-success);
  content: "✓";
}

.promo-block {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: center;
  overflow: hidden;
  padding: clamp(30px, 5vw, 56px);
  border-radius: var(--radius-large);
  background: linear-gradient(115deg, var(--color-encode-teal), var(--color-encode-amber));
  color: var(--color-white);
}

.promo-block h2,
.promo-block h3,
.promo-block p {
  color: var(--color-white);
}

.promo-block h2,
.promo-block h3 {
  margin-bottom: 8px;
}

.promo-block p {
  max-width: 42em;
  margin-bottom: 0;
}

.promo-block .button {
  background: var(--color-white);
  color: var(--color-ink);
}

.promo-block .button:hover {
  color: var(--color-ink);
}

.float-cta {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 80;
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 9px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  background: var(--color-ink);
  box-shadow: 0 6px 20px var(--color-shadow);
  color: var(--color-canvas);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.float-cta:hover {
  color: var(--color-canvas);
  opacity: 0.88;
}

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

.preview-page {
  background: var(--color-canvas);
}

.preview-divider {
  border-top: 1px solid var(--color-line);
}

.preview-section-title {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 34px;
}

.preview-section-title span {
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.13em;
}

.preview-section-title h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
}

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

.swatch {
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-small);
  background: var(--color-canvas);
}

.swatch-color {
  height: 90px;
}

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

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

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

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

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

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

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

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

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

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

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

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

.swatch-info {
  padding: 12px;
}

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

.swatch-info strong {
  font-size: 13px;
}

.swatch-info code {
  color: var(--color-ink-soft);
  font-size: 11px;
}

.type-specimens {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-small);
  background: var(--color-line);
}

.type-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 28px;
  align-items: center;
  padding: 26px;
  background: var(--color-canvas);
}

.type-label {
  color: var(--color-ink-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.type-display {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.12;
}

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

.type-body {
  color: var(--color-ink-soft);
  font-size: 17px;
}

.type-mono {
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  white-space: nowrap;
}

.preview-button-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

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

.preview-component-head {
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.preview-footer {
  margin-top: var(--space-section);
}

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

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-device {
    height: 420px;
    padding: 36px 26px;
  }

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

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

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

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

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

@media (max-width: 640px) {
  .hero-preview {
    padding-top: 42px;
    padding-bottom: 54px;
  }

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

  .trust-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .trust-separator {
    display: none;
  }

  .platform-row {
    gap: 16px;
  }

  .hero-device {
    height: 330px;
    padding: 28px 18px;
    border-radius: var(--radius-large);
  }

  .transcode-line {
    gap: 9px;
  }

  .transcode-code {
    overflow: visible;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .transcode-plain {
    max-width: 82px;
    white-space: normal;
  }

  .transcode-plain:last-child {
    display: none;
  }

  .transcode-stations {
    gap: 8px;
  }

  .station-en,
  .station-dash {
    display: none;
  }

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

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

  .type-row {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 20px;
  }

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

  .preview-section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}