/* JadeCompass - pricing and store block.
   It sits directly below the scene stack and is reached by scrolling past the
   final scene, so it dresses like a scene: pure black ground, sparse gold
   pixel stars, Fusion Pixel type throughout, 2px hard borders, invert-on-hover
   controls, and scene-style "< title >" section headers. Everything is scoped
   under .xh-pricing so no rule touches the app's own layout. */

/* The scene stack pins html/body to the viewport and, on some scenes, flips
   overflow-y to hidden — which silently disables native wheel and keyboard
   scrolling for the whole document. Both have to be forced open while the
   pricing block extends the page, or nothing below <main> is reachable. */
/* overscroll-behavior:none is the sneaky one: body stays a scroll container
   (overflow-y:auto) with nothing to scroll, wheel input latches onto it, and
   overscroll-behavior:none forbids chaining up to the viewport — native wheel
   scrolling dies document-wide while programmatic scrolling still works. */
html[data-xh-pricing="on"],
html[data-xh-pricing="on"] body {
  height: auto !important;
  overflow-y: auto !important;
  overscroll-behavior-y: auto !important;
}

html[data-xh-pricing="on"] main {
  height: 100svh;
}

/* The site footer moves to the end of the pricing block, where a footer
   belongs; the copy inside the final scene would otherwise sit awkwardly in
   the middle of the page. */
html[data-xh-pricing="on"] main footer {
  display: none !important;
}

.xh-pricing {
  --pg-line: rgba(255, 255, 255, 0.9);
  --pg-line-mid: rgba(255, 255, 255, 0.45);
  --pg-line-soft: rgba(255, 255, 255, 0.18);
  --pg-muted: #7a7a7a;
  --pg-gold: #d9b25c;
  --pg-pixel: "Fusion Pixel 12px Mono zh_hans", ui-monospace, SFMono-Regular, Menlo, monospace;

  background-color: #000;
  /* The same sparse gold-and-white pixel stars the scenes scatter around. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='520'%3E%3Cg fill='%23d9b25c'%3E%3Crect x='46' y='64' width='3' height='3'/%3E%3Crect x='318' y='28' width='2' height='2'/%3E%3Crect x='452' y='150' width='3' height='3'/%3E%3Crect x='128' y='318' width='2' height='2'/%3E%3Crect x='396' y='352' width='3' height='3'/%3E%3Crect x='224' y='456' width='2' height='2'/%3E%3C/g%3E%3Cg fill='%23ffffff' opacity='.5'%3E%3Crect x='96' y='182' width='2' height='2'/%3E%3Crect x='262' y='118' width='2' height='2'/%3E%3Crect x='348' y='252' width='2' height='2'/%3E%3Crect x='64' y='420' width='2' height='2'/%3E%3Crect x='486' y='440' width='2' height='2'/%3E%3C/g%3E%3C/svg%3E");
  border-top: 1px solid var(--pg-line-soft);
  color: #fff;
  display: block;
  font-family: var(--pg-pixel);
  image-rendering: pixelated;
  line-height: 1.75;
  position: relative;
  /* The scene stack leaves fixed, pointer-events:none overlays (the pixel-flow
     canvas and video) covering the viewport, so the block has to outrank them
     while still sitting under the header. */
  z-index: 20;
}

.xh-pricing *,
.xh-pricing *::before,
.xh-pricing *::after {
  box-sizing: border-box;
}

.xh-pricing .pg-panel-body {
  margin: 0 auto;
  max-width: 1120px;
  padding: 0 24px;
  width: 100%;
}

.pg-store-nav {
  align-items: center;
  display: none;
  gap: 20px;
  justify-content: center;
  margin: 20px 0 26px;
}

.pg-store-nav-btn {
  align-items: center;
  background: #000;
  border: 2px solid var(--pg-line);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 18px;
  height: 34px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  transition: background-color 0.15s steps(2), color 0.15s steps(2);
  width: 34px;
}

.pg-store-nav-btn:hover,
.pg-store-nav-btn:focus-visible {
  background: #fff;
  color: #000;
}

.pg-store-nav-label {
  font-size: 16px;
  letter-spacing: 0.1em;
  min-width: 14em;
  text-align: center;
}

/* The same swipe hint the scenes show at the bottom of the viewport. */
.pg-stage-hint {
  display: none;
}

/* ---------- sections ---------- */
.xh-pricing .pg-block {
  padding: 40px 0 64px;
}

/* The membership section is the first thing after the scenes, so it fills the
   viewport and centers like one. */
.xh-pricing .pg-block--plans {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100svh;
  padding: 72px 0;
}

.xh-pricing .pg-section-lede {
  font-size: clamp(20px, 2.6vw, 30px);
  letter-spacing: 0.05em;
  line-height: 1.5;
  margin: 0 0 14px;
  text-shadow: -2px 3px 0 #000;
}

.xh-pricing .pg-section-head {
  margin-bottom: 36px;
  text-align: center;
}

/* Scene headers frame their titles in angle brackets; these follow suit. */
.xh-pricing .pg-section-title {
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 400;
  letter-spacing: 0.14em;
  margin: 0 0 10px;
}

.xh-pricing .pg-section-title::before {
  color: var(--pg-muted);
  content: "<  ";
}

.xh-pricing .pg-section-title::after {
  color: var(--pg-muted);
  content: "  >";
}

.xh-pricing .pg-section-sub {
  color: var(--pg-muted);
  font-size: 13px;
  margin: 0;
}

/* ---------- billing toggle ---------- */
.xh-pricing .pg-billing {
  border: 2px solid var(--pg-line);
  display: inline-flex;
  margin-top: 22px;
}

.xh-pricing .pg-billing-option {
  background: #000;
  border: 0;
  color: var(--pg-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
  padding: 11px 18px;
  transition: background-color 0.15s steps(2), color 0.15s steps(2);
  white-space: nowrap;
}

.xh-pricing .pg-billing-option.is-active {
  background: #fff;
  color: #000;
}

.xh-pricing .pg-billing-option:not(.is-active):hover {
  color: #fff;
}

/* ---------- plans ---------- */
.xh-pricing .pg-plans {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, 1fr);
}

.xh-pricing .pg-plan {
  background: #000;
  border: 2px solid var(--pg-line-mid);
  display: flex;
  flex-direction: column;
  padding: 26px 22px 28px;
  position: relative;
}

/* The featured tier gets the hard offset shadow the pixel cards use. */
.xh-pricing .pg-plan--featured {
  border-color: var(--pg-line);
  box-shadow: 8px 8px 0 rgba(255, 255, 255, 0.14);
}

.xh-pricing .pg-plan-badge {
  background: #fff;
  color: #000;
  font-size: 11px;
  letter-spacing: 0.1em;
  line-height: 1;
  margin: 0;
  padding: 6px 10px;
  position: absolute;
  right: -2px;
  top: -13px;
}

.xh-pricing .pg-plan-name {
  align-items: baseline;
  display: flex;
  font-weight: 400;
  gap: 10px;
  margin: 0 0 10px;
}

.xh-pricing .pg-plan-name-latin {
  font-size: 20px;
  letter-spacing: 0.05em;
}

.xh-pricing .pg-plan-name-seal {
  color: var(--pg-gold);
  font-size: 13px;
}

.xh-pricing .pg-plan-tagline {
  color: var(--pg-muted);
  font-size: 13px;
  margin: 0;
  min-height: 46px;
}

.xh-pricing .pg-plan-price {
  align-items: baseline;
  border-bottom: 1px solid var(--pg-line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 18px 0;
  padding-bottom: 18px;
}

.xh-pricing .pg-plan-amount {
  font-size: 34px;
  line-height: 1;
  text-shadow: -2px 3px 0 #000;
}

.xh-pricing .pg-plan-unit {
  color: var(--pg-muted);
  font-size: 13px;
}

.xh-pricing .pg-plan-period {
  color: var(--pg-muted);
  flex-basis: 100%;
  font-size: 11px;
  min-height: 19px;
}

/* Actions follow the scene entry buttons: black, 2px white border, invert on
   hover. The featured tier ships pre-inverted, like the footer CTA. */
.xh-pricing .pg-plan-action {
  background: #000;
  border: 2px solid var(--pg-line);
  color: #fff;
  display: block;
  font-size: 14px;
  line-height: 1;
  padding: 13px 12px;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s steps(2), color 0.15s steps(2);
}

.xh-pricing .pg-plan-action:hover,
.xh-pricing .pg-plan-action:focus-visible {
  background: #fff;
  color: #000;
}

.xh-pricing .pg-plan--featured .pg-plan-action {
  background: #fff;
  color: #000;
}

.xh-pricing .pg-plan--featured .pg-plan-action:hover,
.xh-pricing .pg-plan--featured .pg-plan-action:focus-visible {
  background: #000;
  color: #fff;
}

.xh-pricing .pg-plan-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
}

.xh-pricing .pg-plan-list li {
  color: rgba(255, 255, 255, 0.86);
  display: flex;
  font-size: 13px;
  gap: 9px;
  line-height: 1.7;
}

.xh-pricing .pg-tick {
  color: var(--pg-gold);
  flex: 0 0 auto;
  font-size: 12px;
  line-height: 1.8;
}

/* ---------- comparison table ---------- */
.xh-pricing .pg-table-scroll {
  border: 2px solid var(--pg-line-mid);
  overflow-x: auto;
}

.xh-pricing .pg-table {
  border-collapse: collapse;
  min-width: 720px;
  width: 100%;
}

.xh-pricing .pg-table th,
.xh-pricing .pg-table td {
  padding: 13px 16px;
  text-align: left;
  vertical-align: top;
}

.xh-pricing .pg-th-label {
  width: 38%;
}

.xh-pricing .pg-th-plan {
  border-bottom: 1px solid var(--pg-line-mid);
  font-weight: 400;
  text-align: center;
  width: 20.6%;
}

.xh-pricing .pg-th-plan.is-featured {
  background: rgba(255, 255, 255, 0.07);
}

.xh-pricing .pg-th-name {
  display: block;
  font-size: 15px;
  letter-spacing: 0.05em;
}

.xh-pricing .pg-th-seal {
  color: var(--pg-gold);
  display: block;
  font-size: 11px;
}

.xh-pricing .pg-td-group {
  background: rgba(255, 255, 255, 0.05);
  color: var(--pg-gold);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.xh-pricing .pg-td-label {
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 400;
}

.xh-pricing .pg-td {
  color: var(--pg-muted);
  font-size: 12px;
  text-align: center;
}

.xh-pricing .pg-td.is-featured {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.xh-pricing .pg-td.is-yes {
  color: var(--pg-gold);
  font-size: 14px;
}

.xh-pricing .pg-td.is-no {
  color: rgba(255, 255, 255, 0.24);
}

.xh-pricing .pg-table tbody tr + tr th,
.xh-pricing .pg-table tbody tr + tr td {
  border-top: 1px solid var(--pg-line-soft);
}

/* ---------- store ---------- */
.xh-pricing .pg-store {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.xh-pricing .pg-store-head {
  border-top: 2px solid var(--pg-line-mid);
  padding-top: 16px;
  text-align: left;
}

.xh-pricing .pg-store-title {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.08em;
  margin: 0 0 6px;
}

.xh-pricing .pg-store-title::before {
  color: var(--pg-gold);
  content: "▸ ";
}

.xh-pricing .pg-store-note {
  color: var(--pg-muted);
  font-size: 12px;
  margin: 0 0 20px;
}

.xh-pricing .pg-store-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr);
}

.xh-pricing .pg-item {
  background: #000;
  border: 2px solid var(--pg-line-mid);
  padding: 18px 20px 20px;
  transition: border-color 0.15s steps(2);
}

.xh-pricing .pg-item:hover {
  border-color: var(--pg-line);
}

.xh-pricing .pg-item-top {
  align-items: baseline;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.xh-pricing .pg-item-name {
  font-size: 15px;
  font-weight: 400;
  margin: 0;
}

.xh-pricing .pg-item-price {
  align-items: baseline;
  display: flex;
  gap: 5px;
  margin: 0;
  white-space: nowrap;
}

.xh-pricing .pg-item-from {
  color: var(--pg-muted);
  font-size: 11px;
}

.xh-pricing .pg-item-amount {
  color: var(--pg-gold);
  font-size: 20px;
  line-height: 1;
}

.xh-pricing .pg-item-meta {
  color: var(--pg-muted);
  font-size: 11px;
  letter-spacing: 0.14em;
  margin: 8px 0 0;
}

.xh-pricing .pg-item-desc {
  color: var(--pg-muted);
  font-size: 13px;
  margin: 10px 0 0;
}

/* ---------- before you buy ---------- */
.xh-pricing .pg-faq {
  display: grid;
  gap: 14px 36px;
  grid-template-columns: repeat(2, 1fr);
  text-align: left;
}

.xh-pricing .pg-faq-item {
  border-top: 1px solid var(--pg-line-soft);
  padding: 16px 0 4px;
}

.xh-pricing .pg-faq-q {
  font-size: 14px;
  font-weight: 400;
  margin: 0 0 8px;
}

.xh-pricing .pg-faq-q::before {
  color: var(--pg-muted);
  content: "> ";
}

.xh-pricing .pg-faq-a {
  color: var(--pg-muted);
  font-size: 13px;
  margin: 0;
}

/* ---------- closing ---------- */
.xh-pricing .pg-cta {
  border-top: 1px solid var(--pg-line-soft);
  padding: 56px 0 48px;
  text-align: center;
}

.xh-pricing .pg-cta-line {
  font-size: clamp(16px, 2vw, 21px);
  letter-spacing: 0.06em;
  margin: 0 0 28px;
  text-shadow: -2px 3px 0 #000;
}

/* Same white pill as the footer's "开始解读 >" button. */
.xh-pricing .pg-cta-button {
  background: #fff;
  color: #000;
  display: inline-block;
  font-size: 14px;
  line-height: 1;
  padding: 16px 32px;
  text-decoration: none;
  transition: background-color 0.15s steps(2), color 0.15s steps(2);
}

.xh-pricing .pg-cta-button::after {
  content: " >";
}

.xh-pricing .pg-cta-button:hover,
.xh-pricing .pg-cta-button:focus-visible {
  background: #000;
  box-shadow: inset 0 0 0 2px #fff;
  color: #fff;
}

/* ---------- site footer, relocated here ---------- */
.xh-pricing .pg-footer {
  border-top: 1px solid var(--pg-line-soft);
  padding: 48px 0 40px;
}

.xh-pricing .pg-footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 64px;
  justify-content: space-between;
}

.xh-pricing .pg-footer-brand-name {
  font-size: 15px;
  letter-spacing: 0.05em;
  margin: 0 0 12px;
}

.xh-pricing .pg-footer-line {
  color: var(--pg-muted);
  font-size: 13px;
  margin: 0 0 6px;
}

.xh-pricing .pg-footer-cols {
  display: flex;
  gap: 72px;
}

.xh-pricing .pg-footer-col-title {
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  margin: 0 0 14px;
}

.xh-pricing .pg-footer-col a {
  color: var(--pg-muted);
  display: block;
  font-size: 13px;
  margin-bottom: 10px;
  text-decoration: none;
  transition: color 0.15s steps(2);
}

.xh-pricing .pg-footer-col a:hover {
  color: #fff;
}

.xh-pricing .pg-fine {
  border-top: 1px solid var(--pg-line-soft);
  color: var(--pg-muted);
  font-size: 11px;
  margin: 40px 0 0;
  padding-top: 18px;
}

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  .xh-pricing .pg-plans {
    grid-template-columns: 1fr;
  }

  .xh-pricing .pg-plan-tagline {
    min-height: 0;
  }

  .xh-pricing .pg-faq {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .xh-pricing .pg-inner {
    padding: 0 18px 24px;
  }

  .xh-pricing .pg-footer-cols {
    gap: 40px;
  }

  .xh-pricing .pg-block {
    padding: 28px 0 48px;
  }

  .xh-pricing .pg-store-grid {
    grid-template-columns: 1fr;
  }

  .xh-pricing .pg-billing {
    display: flex;
    width: 100%;
  }

  .xh-pricing .pg-billing-option {
    flex: 1;
    font-size: 12px;
    padding: 11px 6px;
  }
}

/* ==================== paged-mode overrides ====================
   Kept at the end of the file: they share specificity with the base rules
   above, so source order is what makes them win. */

/* ---------- panel stage ----------
   Wide screens: the stage is one viewport, panels crossfade like the scenes
   above. Narrow screens: these wrappers are plain divs and the same DOM
   stacks and scrolls normally. */
.xh-pricing--paged .pg-stage {
  height: 100svh;
  overflow: hidden;
  position: relative;
}

.xh-pricing--paged .pg-panel {
  display: flex;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity 0.2s ease;
  visibility: hidden;
}

.xh-pricing--paged .pg-panel.is-active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.xh-pricing--paged .pg-panel-scroll {
  display: flex;
  max-height: 100svh;
  overflow-y: auto;
  padding: 48px 0;
  width: 100%;
}

.xh-pricing--paged .pg-panel-body {
  margin: auto;
}

/* Panels center their content; the stacked paddings would double up. */
.xh-pricing--paged .pg-block {
  padding: 0;
}

.xh-pricing--paged .pg-block--plans {
  min-height: 0;
  padding: 0;
}

.xh-pricing--paged .pg-cta {
  padding: 28px 0 24px;
}

.xh-pricing--paged .pg-footer {
  padding: 24px 0 0;
}

.xh-pricing--paged .pg-fine {
  margin-top: 24px;
}

.xh-pricing--paged .pg-faq {
  gap: 6px 32px;
}

/* Paged mode compacts spacing so each beat fits one viewport; anything that
   still overflows (the table on short windows) scrolls inside its panel. */
.xh-pricing--paged .pg-panel-scroll {
  padding: 16px 0;
}

.xh-pricing--paged .pg-section-head {
  margin-bottom: 14px;
}

.xh-pricing--paged .pg-section-title {
  font-size: clamp(16px, 2vw, 22px);
}

.xh-pricing--paged .pg-plan-name {
  margin-bottom: 6px;
}

.xh-pricing--paged .pg-plan-tagline {
  font-size: 12px;
  line-height: 1.5;
}

.xh-pricing--paged .pg-plan-list {
  gap: 7px;
}

.xh-pricing--paged .pg-plan-list li {
  line-height: 1.55;
}

.xh-pricing--paged .pg-plan-action {
  padding: 11px 12px;
}

.xh-pricing--paged .pg-billing-option {
  padding: 9px 16px;
}

.xh-pricing--paged .pg-section-lede {
  font-size: clamp(17px, 2vw, 22px);
  margin: 0 0 8px;
}

.xh-pricing--paged .pg-billing {
  margin-top: 14px;
}

.xh-pricing--paged .pg-plan {
  padding: 16px 20px 18px;
}

.xh-pricing--paged .pg-plan-tagline {
  min-height: 0;
}

.xh-pricing--paged .pg-plan-price {
  margin: 12px 0;
  padding-bottom: 12px;
}

.xh-pricing--paged .pg-plan-amount {
  font-size: 30px;
}

.xh-pricing--paged .pg-plan-list {
  gap: 8px;
  margin-top: 14px;
}

.xh-pricing--paged .pg-table th,
.xh-pricing--paged .pg-table td {
  padding: 8px 14px;
}

.xh-pricing--paged .pg-faq-item {
  padding: 10px 0 2px;
}

.xh-pricing--paged .pg-cta {
  padding: 20px 0 16px;
}

.xh-pricing--paged .pg-cta-line {
  margin-bottom: 16px;
}

.xh-pricing--paged .pg-cta-button {
  padding: 13px 28px;
}

.xh-pricing--paged .pg-footer {
  padding: 16px 0 0;
}

.xh-pricing--paged .pg-footer-row {
  gap: 20px 64px;
}

.xh-pricing--paged .pg-footer-col a {
  margin-bottom: 7px;
}

.xh-pricing--paged .pg-fine {
  margin-top: 14px;
  padding-top: 12px;
}

/* Store panel shows one category at a time, browsed with the arrows. */
.xh-pricing--paged .pg-store-block {
  display: none;
}

.xh-pricing--paged .pg-store-block.is-active {
  display: block;
}

.xh-pricing--paged .pg-store-head {
  border-top: 0;
  padding-top: 0;
  text-align: center;
}

.xh-pricing--paged .pg-store-title {
  display: none;
}

.xh-pricing--paged .pg-store-nav {
  display: flex;
}

.xh-pricing--paged .pg-stage-hint {
  bottom: 20px;
  color: var(--pg-muted);
  display: block;
  font-size: 12px;
  left: 50%;
  letter-spacing: 0.22em;
  margin: 0;
  position: absolute;
  transform: translateX(-50%);
  z-index: 2;
}

.xh-pricing--paged .pg-stage-hint::before {
  content: "\2307  ";
}

.xh-pricing--paged .pg-stage-hint[hidden] {
  display: none;
}

/* Full-screen pixel-dissolve overlay used by the panel stage; matches the
   scene stack's own transition layer (which also sits above the header). */
.pg-wipe {
  height: 100vh;
  inset: 0;
  pointer-events: none;
  position: fixed;
  width: 100vw;
  z-index: 9999;
}
