:root {
  --ink: #111c27;
  --soft: #56667a;
  --muted: #7c8998;
  --line: rgba(17, 28, 39, 0.11);
  --blue: #2f73e8;
  --blue-dark: #194fae;
  --green: #247253;
  --paper: #ffffff;
  --wash: #f3f6f2;
  --warning: #fff6df;
  --warning-line: #e8c66b;
  --shadow: 0 24px 70px rgba(28, 42, 56, 0.12);
  --container: min(1180px, calc(100vw - 48px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 3%, rgba(47, 115, 232, 0.1), transparent 26%),
    radial-gradient(circle at 4% 32%, rgba(36, 114, 83, 0.08), transparent 24%),
    var(--wash);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

button,
a,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

.pay-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: var(--container);
  min-height: 76px;
  margin: 0 auto;
  background: rgba(243, 246, 242, 0.86);
  backdrop-filter: blur(18px);
}

.pay-brand,
.header-actions,
.language-switch,
.plan-topline,
.price-row,
.summary-row,
footer {
  display: flex;
  align-items: center;
}

.pay-brand {
  gap: 12px;
}

.pay-brand img {
  border-radius: 10px;
}

.pay-brand > span {
  display: grid;
  line-height: 1.15;
}

.pay-brand b {
  font-size: 1.05rem;
}

.pay-brand small {
  color: var(--soft);
}

.header-actions {
  gap: 18px;
}

.back-link {
  color: var(--soft);
  font-size: 0.9rem;
}

.back-link:hover {
  color: var(--blue);
}

.language-switch {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
}

.language-switch button {
  min-width: 48px;
  padding: 7px 11px;
  border: 0;
  border-radius: 999px;
  color: var(--soft);
  background: transparent;
}

.language-switch button.is-active {
  color: #fff;
  background: var(--ink);
}

main {
  width: var(--container);
  margin: 0 auto;
}

.purchase-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.65fr);
  gap: 64px;
  align-items: center;
  min-height: 570px;
  padding: clamp(52px, 8vw, 96px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 88% 16%, rgba(47, 115, 232, 0.13), transparent 28%),
    rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue-dark);
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 26px;
  font-size: clamp(3rem, 5.6vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: 0;
  text-wrap: balance;
}

html[lang="zh-CN"] h1 {
  white-space: nowrap;
}

html[lang="en"] h1 {
  max-width: 720px;
  letter-spacing: -0.035em;
}

.hero-intro {
  max-width: 700px;
  margin-bottom: 32px;
  color: var(--soft);
  font-size: 1.12rem;
}

.device-alert {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  max-width: 760px;
  padding: 20px;
  border: 1px solid var(--warning-line);
  border-radius: 16px;
  background: var(--warning);
}

.device-alert > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  background: #b07808;
  font-weight: 800;
}

.device-alert p {
  margin: 4px 0 0;
  color: #745b25;
}

.hero-mark {
  display: grid;
  place-items: center;
  gap: 24px;
  min-height: 330px;
  border-left: 1px solid var(--line);
}

.hero-mark img {
  width: min(180px, 70%);
  height: auto;
  padding: 16px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 24px 44px rgba(22, 43, 67, 0.15);
}

.hero-mark span {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--green);
  background: rgba(36, 114, 83, 0.1);
  font-size: 0.86rem;
  font-weight: 700;
}

.plans-section,
.features-section {
  padding: 110px 0 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 42px;
}

.section-heading.compact {
  max-width: 860px;
}

.section-heading h2,
.checkout-section h2 {
  margin-bottom: 16px;
  font-size: clamp(2.2rem, 4.6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

#checkoutTitle {
  max-width: 560px;
  margin-bottom: 30px;
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  line-height: 1.18;
  letter-spacing: 0;
  text-wrap: balance;
}

html[lang="en"] #checkoutTitle {
  max-width: 520px;
  letter-spacing: -0.02em;
}

.section-heading > p:last-child {
  color: var(--soft);
  font-size: 1.04rem;
}

.plans-section > .section-heading {
  margin-bottom: 24px;
}

.license-feature-note {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 14px;
  max-width: 920px;
  margin-bottom: 34px;
  padding: 18px 20px;
  border: 1px solid rgba(36, 114, 83, 0.22);
  border-radius: 8px;
  color: var(--green);
  background: rgba(232, 245, 238, 0.72);
}

.license-feature-note svg {
  margin-top: 2px;
}

.license-feature-note strong {
  display: block;
  color: var(--ink);
  font-size: 1.02rem;
}

.license-feature-note p {
  margin: 3px 0 0;
  color: var(--soft);
}

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

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.plan-card.is-selected {
  border-color: rgba(47, 115, 232, 0.58);
  box-shadow: 0 22px 55px rgba(47, 115, 232, 0.13);
  transform: translateY(-4px);
}

.plan-topline {
  justify-content: space-between;
  gap: 12px;
}

.plan-label,
.device-chip {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 750;
}

.plan-label {
  color: #fff;
  background: var(--blue);
}

.plan-label.education {
  color: #72530c;
  background: #f7dfa0;
}

.device-chip {
  color: var(--soft);
  background: #edf1f4;
}

.plan-card h3 {
  margin: 28px 0 8px;
  font-size: 2rem;
}

.plan-audience {
  min-height: 52px;
  color: var(--soft);
}

.price-row {
  align-items: baseline;
  gap: 12px;
  margin: 30px 0;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.price {
  color: var(--ink);
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  font-weight: 780;
  line-height: 1;
  letter-spacing: -0.04em;
}

.plan-card ul {
  display: grid;
  gap: 13px;
  min-height: 190px;
  margin: 0 0 34px;
  padding: 0;
  list-style: none;
}

.plan-card li {
  position: relative;
  padding-left: 25px;
  color: var(--soft);
}

.plan-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 800;
}

.plan-card .select-plan {
  margin-top: auto;
}

.select-plan,
.purchase-button {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--ink);
  font-weight: 750;
}

.select-plan.secondary {
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fff;
}

.select-plan:hover,
.purchase-button:not(:disabled):hover {
  background: var(--blue-dark);
}

.features-section {
  padding-bottom: 110px;
}

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

.feature-grid article {
  min-height: 230px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.feature-grid article > span {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
}

.feature-grid h3 {
  margin: 36px 0 10px;
  font-size: 1.2rem;
}

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

.checkout-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.8fr);
  gap: clamp(40px, 7vw, 90px);
  margin-bottom: 80px;
  padding: clamp(36px, 6vw, 72px);
  border-radius: 28px;
  color: #fff;
  background: var(--ink);
  box-shadow: var(--shadow);
}

.checkout-section .eyebrow {
  color: #8bb5ff;
}

.summary-row {
  justify-content: space-between;
  gap: 24px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
}

.summary-row b {
  color: #fff;
  text-align: right;
}

.price-summary {
  margin-top: 14px;
  border-bottom: 0;
}

.price-summary b {
  font-size: 2rem;
}

.checkout-action {
  align-self: center;
}

.agreement-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  color: rgba(255, 255, 255, 0.76);
}

.agreement-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--blue);
}

.purchase-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  background: var(--blue);
  text-decoration: none;
}

.purchase-button.is-disabled {
  cursor: not-allowed;
  opacity: 0.42;
  pointer-events: none;
}

.purchase-button[hidden] {
  display: none;
}

.checkout-help {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.8rem;
}

.dealer-section {
  width: var(--container);
  margin: 0 auto;
  padding: 24px 0 8px;
}

.dealer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--soft);
  font-size: 0.85rem;
}

.dealer-badge {
  padding: 2px 10px;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-weight: 650;
  font-size: 0.75rem;
  white-space: nowrap;
}

.dealer-inner a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

.dealer-inner a:hover {
  text-decoration: underline;
}

footer {
  justify-content: space-between;
  width: var(--container);
  margin: 0 auto;
  padding: 26px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 0.85rem;
}

footer a:hover {
  color: var(--blue);
}

@media (max-width: 900px) {
  .purchase-hero,
  .checkout-section {
    grid-template-columns: 1fr;
  }

  .hero-mark {
    min-height: 230px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

@media (max-width: 680px) {
  :root {
    --container: calc(100vw - 24px);
  }

  .pay-header {
    min-height: 68px;
  }

  .pay-brand small,
  .back-link {
    display: none;
  }

  .purchase-hero {
    gap: 34px;
    min-height: 0;
    padding: 36px 22px;
    border-radius: 20px;
  }

  h1 {
    font-size: clamp(2.45rem, 12vw, 3.35rem);
    line-height: 1.12;
  }

  html[lang="zh-CN"] h1 {
    white-space: normal;
  }

  .hero-mark {
    min-height: 190px;
  }

  .plans-section,
  .features-section {
    padding-top: 76px;
  }

  .plan-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .plan-card ul {
    min-height: 0;
  }

  .checkout-section {
    gap: 34px;
    padding: 30px 22px;
  }

  #checkoutTitle {
    margin-bottom: 24px;
    font-size: clamp(1.8rem, 9vw, 2.25rem);
  }

  .summary-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .summary-row b {
    text-align: left;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .dealer-inner {
    flex-wrap: wrap;
    gap: 8px;
  }
}
