.hero {
  position: relative;
  overflow-x: clip;
  text-align: center;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 920px;
  margin-inline: auto;
  padding: 38px var(--gutter) 0;
}

.hero-badge {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  background: var(--color-panel);
  box-shadow: var(--shadow-soft);
  color: var(--color-text-soft);
  font-size: 13px;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: var(--radius-pill);
  background: var(--color-success);
}

.hero-badge b {
  color: var(--color-text);
  font-family: var(--font-code);
}

.hero-title {
  margin: 18px 0 20px;
  font-size: clamp(52px, 5vw, 58px);
}

.hero .cta-row {
  justify-content: center;
}

.hero-sub {
  max-width: 640px;
  margin: 18px auto 0;
  color: var(--color-text-soft);
  font-size: 16px;
  line-height: 1.7;
}

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

.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.trust-chip svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--color-brand);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.platform-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin: 20px 0 6px;
}

.platform-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--color-text-soft);
  font-size: 13px;
  font-weight: 550;
}

.platform-item svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--color-text-soft);
}

.hero-art {
  width: 100%;
  height: auto;
  margin-top: -6px;
}

.hero-art .shore {
  fill: var(--color-panel-alt);
}

.hero-art .river {
  fill: url('#preview-river-gradient');
}

.hero-art .river-edge {
  fill: none;
  stroke: var(--color-water-edge);
  stroke-width: 2;
  opacity: 0.55;
}

.hero-art .ripple {
  fill: none;
  stroke: var(--color-panel);
  stroke-width: 1.4;
  opacity: 0.5;
}

.hero-art .stone {
  fill: var(--color-panel);
  stroke: var(--color-brand);
  stroke-width: 1.5;
}

.hero-art .stone-hot {
  stroke: var(--color-warning);
  stroke-width: 2;
}

.hero-art .stone-code {
  fill: var(--color-text);
  font-family: var(--font-code);
  font-size: 20px;
  font-weight: 700;
}

.hero-art .stone-code-hot {
  fill: var(--color-warning);
}

.hero-art .stone-name,
.hero-art .flag-name,
.hero-art .shore-note {
  fill: var(--color-text-soft);
  font-family: var(--font-code);
}

.hero-art .stone-name {
  font-size: 9.5px;
  letter-spacing: 0.08em;
}

.hero-art .flag-name,
.hero-art .shore-note {
  font-size: 10px;
}

.hero-art .shore-note {
  letter-spacing: 0.12em;
}

.hero-art .footsteps {
  fill: none;
  stroke: var(--color-warning);
  stroke-dasharray: 1 12;
  stroke-linecap: round;
  stroke-width: 2.6;
  animation: route-trek 7s linear infinite;
}

.hero-art .step-start,
.hero-art .hop-core {
  fill: var(--color-warning);
}

.hero-art .hop-pulse {
  fill: none;
  stroke: var(--color-warning);
  stroke-width: 2;
  animation: route-pulse 2.6s ease-in-out infinite;
}

.hero-art .pole {
  stroke: var(--color-text-soft);
  stroke-linecap: round;
  stroke-width: 1.5;
}

.hero-art .pole-cap {
  fill: var(--color-text-soft);
}

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

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

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

.hero-art .flag-frame {
  fill: none;
  stroke: var(--color-line);
}

.hero-art .flag-white-stroke {
  fill: none;
  stroke: var(--color-panel);
}

.hero-art .flag-red-stroke {
  fill: none;
  stroke: var(--color-flag-red);
}

.hero-art .water-stop-a {
  stop-color: var(--color-water-a);
}

.hero-art .water-stop-b {
  stop-color: var(--color-water-b);
}

@keyframes route-trek {
  to {
    stroke-dashoffset: -78;
  }
}

@keyframes route-pulse {
  0%,
  100% {
    opacity: 0.12;
  }

  50% {
    opacity: 0.6;
  }
}

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

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

.tab-list [role='tab'] {
  min-height: 42px;
  flex: 1 0 auto;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  padding: 8px 18px;
  background: transparent;
  color: var(--color-text-soft);
  font-weight: 700;
  white-space: nowrap;
}

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

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

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

.toc-tabs {
  position: sticky;
  top: 0;
  z-index: 70;
  display: flex;
  max-width: 100%;
  gap: 6px;
  overflow-x: auto;
  border-block: 1px solid var(--color-line);
  padding: 8px var(--gutter);
  background: var(--color-panel);
  box-shadow: var(--shadow-soft);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.toc-tabs a {
  flex: 0 0 auto;
  border-radius: var(--radius-pill);
  padding: 7px 13px;
  color: var(--color-text-soft);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.toc-tabs a:hover,
.toc-tabs a.is-current,
.toc-tabs a[aria-current='location'] {
  background: var(--color-panel-alt);
  color: var(--color-brand);
}

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-line);
  border-radius: var(--radius-sm);
  background: var(--color-panel);
  box-shadow: var(--shadow-soft);
}

.faq-item summary {
  position: relative;
  min-height: 54px;
  cursor: pointer;
  list-style: none;
  padding: 15px 52px 15px 18px;
  color: var(--color-text);
  font-weight: 700;
}

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

.faq-item summary::after {
  position: absolute;
  top: 50%;
  right: 18px;
  content: '+';
  color: var(--color-brand);
  font-family: var(--font-code);
  font-size: 22px;
  line-height: 1;
  transform: translateY(-50%);
}

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

.faq-answer {
  border-top: 1px solid var(--color-line);
  padding: 16px 18px 18px;
  color: var(--color-text-soft);
}

.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;
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 26px;
  background: var(--color-panel);
  box-shadow: var(--shadow-soft);
}

.plan-card.is-featured {
  border: 2px solid var(--color-brand);
  box-shadow: var(--shadow-action);
}

.plan-card__ribbon {
  position: absolute;
  top: -13px;
  right: 18px;
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  background: var(--color-warning);
  color: var(--color-panel);
  font-size: 12px;
  font-weight: 800;
}

.plan-card__code {
  margin-bottom: 18px;
  color: var(--color-brand);
  font-family: var(--font-code);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.plan-card__price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 12px 0;
}

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

.plan-card__price span {
  color: var(--color-text-soft);
}

.plan-card__features {
  display: grid;
  gap: 9px;
  margin-bottom: 24px;
  padding: 0;
  list-style: none;
  color: var(--color-text-soft);
}

.plan-card__features li {
  position: relative;
  padding-left: 20px;
}

.plan-card__features li::before {
  position: absolute;
  left: 0;
  content: '✓';
  color: var(--color-brand);
  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-line);
  border-radius: var(--radius-sm);
  background: var(--color-panel);
  -webkit-overflow-scrolling: touch;
}

.data-table,
.route-table,
.compare-table {
  width: 100%;
  min-width: 720px;
  margin: 0;
  border-collapse: collapse;
  color: var(--color-text);
  font-size: 14px;
}

.data-table th,
.data-table td,
.route-table th,
.route-table td,
.compare-table th,
.compare-table td {
  border-bottom: 1px solid var(--color-line);
  padding: 13px 16px;
  text-align: left;
  vertical-align: top;
}

.data-table th,
.route-table th,
.compare-table th {
  background: var(--color-panel-alt);
  color: var(--color-text);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.route-group td {
  background: var(--color-panel-alt);
  color: var(--color-brand);
  font-family: var(--font-code);
  font-weight: 750;
  letter-spacing: 0.08em;
}

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

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

.platform-card__icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 18px;
  border-radius: var(--radius-sm);
  background: var(--color-panel-alt);
  color: var(--color-brand);
}

.platform-card__icon svg {
  width: 24px;
  height: 24px;
}

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

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

.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;
  flex-direction: column;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 22px;
  background: var(--color-panel);
  box-shadow: var(--shadow-soft);
  transition:
    border-color var(--motion-fast) ease,
    transform var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease;
}

.article-card:hover {
  border-color: var(--color-brand);
  box-shadow: var(--shadow-card);
  transform: translateY(-3px);
}

.article-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--color-text-soft);
  font-family: var(--font-code);
  font-size: 11px;
}

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

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

.article-card__link {
  margin-top: auto;
  font-weight: 750;
}

.callout {
  position: relative;
  border: 1px solid var(--color-line);
  border-left: 4px solid var(--color-brand);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  background: var(--color-panel);
  color: var(--color-text-soft);
  box-shadow: var(--shadow-soft);
}

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

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

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

.article-promo {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
  margin-top: 56px;
  border: 1px solid var(--color-brand);
  border-radius: var(--radius-md);
  padding: 28px;
  background: var(--color-panel);
  box-shadow: var(--shadow-action);
}

.article-promo__brand {
  margin-bottom: 6px;
  color: var(--color-brand);
  font-family: var(--font-code);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.article-promo h2 {
  margin-bottom: 8px;
  font-size: 28px;
}

.article-promo p {
  margin-bottom: 0;
  color: var(--color-text-soft);
}

.float-cta {
  position: fixed;
  right: 26px;
  bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  border-radius: var(--radius-pill);
  padding: 12px 22px;
  background: var(--color-brand);
  color: var(--color-panel);
  box-shadow: var(--shadow-action);
  font-size: 15px;
  font-weight: 800;
}

.float-cta:hover {
  background: var(--color-brand-deep);
  color: var(--color-panel);
  transform: translateY(-1px);
}

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

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

.feature-stones {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 38px 24px;
}

.feature-stones::before {
  position: absolute;
  inset: 50% 4%;
  border-top: 2px dashed var(--color-brand);
  content: '';
  opacity: 0.18;
}

.feature-stone {
  position: relative;
  z-index: 1;
  min-width: 0;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 24px;
  background: var(--color-panel);
  box-shadow: var(--shadow-soft);
  transition:
    transform var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease;
}

.feature-stone:nth-child(even) {
  transform: translateY(24px);
}

.feature-stone:hover {
  border-color: var(--color-brand);
  box-shadow: var(--shadow-card);
  transform: translateY(-3px);
}

.feature-stone:nth-child(even):hover {
  transform: translateY(21px);
}

.feature-stone__code {
  display: inline-flex;
  margin-bottom: 18px;
  border: 1px solid var(--color-brand);
  border-radius: var(--radius-xs);
  padding: 4px 8px;
  color: var(--color-brand);
  font-family: var(--font-code);
  font-size: 12px;
  font-weight: 750;
}

.feature-stone p {
  margin-bottom: 0;
  color: var(--color-text-soft);
}

.preview-page {
  padding-bottom: 80px;
}

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

.preview-section--panel {
  border-block: 1px solid var(--color-line);
  background: var(--color-panel);
}

.preview-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.preview-kicker {
  margin-bottom: 8px;
  color: var(--color-brand);
  font-family: var(--font-code);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

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

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

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

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

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

.preview-swatch__color {
  height: 72px;
}

.preview-swatch__meta {
  padding: 10px;
  font-family: var(--font-code);
  font-size: 11px;
}

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

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

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

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

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

.preview-color-brand-deep {
  background: var(--color-brand-deep);
}

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

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

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

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

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

.preview-color-water {
  background: linear-gradient(90deg, var(--color-water-a), var(--color-water-b));
}

.preview-type-sample {
  border-bottom: 1px solid var(--color-line);
  padding: 18px 0;
}

.preview-type-sample:last-child {
  border-bottom: 0;
}

.preview-type-label {
  margin-bottom: 8px;
  color: var(--color-text-soft);
  font-family: var(--font-code);
  font-size: 11px;
}

.preview-mono-sample {
  font-family: var(--font-code);
  font-size: 18px;
}

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

.preview-flag-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}

.preview-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-soft);
  font-size: 12px;
}

.preview-flag svg {
  width: 34px;
  height: 24px;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-xs);
}

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

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

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

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

@media (max-width: 768px) {
  .hero-copy {
    padding-top: 30px;
  }

  .hero-title {
    font-size: clamp(34px, 9.4vw, 40px);
  }

  .hero-art {
    width: 150%;
    max-width: none;
    margin-left: -25%;
  }

  .platform-row {
    gap: 13px 18px;
  }

  .feature-stones {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-left: 18px;
  }

  .feature-stones::before {
    inset: 0 auto 0 5px;
    border-top: 0;
    border-left: 2px dashed var(--color-brand);
  }

  .feature-stone:nth-child(even),
  .feature-stone:nth-child(even):hover {
    transform: none;
  }

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

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

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

  .plan-card.is-featured {
    margin-top: 10px;
  }

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

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

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

  .hero-badge {
    padding-inline: 12px;
    text-align: left;
  }

  .hero-art {
    width: 210%;
    margin-left: -55%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-art .footsteps,
  .hero-art .hop-pulse {
    animation: none;
  }
}