* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  color-scheme: dark;
}
body {
  --page-pad: clamp(16px, 2.2vw, 40px);
  --ink: #e8ecf5;
  --muted: #a7afc7;
  --line: #2c3352;
  --line-strong: #3a4160;
  --card: #242b45;
  --accent: #7c3aed;
  --accent-hover: #8b5cf6;
  --focus: #a78bfa;
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background-color: #1b2036;
  background-image:
    radial-gradient(ellipse 72% 42% at -8% -12%, rgba(124, 58, 237, 0.34), transparent 58%),
    radial-gradient(ellipse 48% 36% at 108% -6%, rgba(192, 132, 252, 0.16), transparent 52%),
    radial-gradient(ellipse 42% 32% at 78% 108%, rgba(109, 40, 217, 0.2), transparent 54%);
  color: var(--ink);
  font: 17px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.skip {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 30;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip:focus { transform: translateY(0); }
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(27, 32, 54, 0.86);
  backdrop-filter: blur(18px);
}
.bar-inner, .wrap {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--page-pad);
}
.bar-inner {
  display: flex;
  align-items: center;
  gap: 12px 20px;
  min-height: 68px;
  flex-wrap: wrap;
}
.brand, .bar-cta, .site-nav a {
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.brand:hover, .bar-cta:hover { color: #fff; }
.logo {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #a855f7, #6d28d9);
  color: #fff;
}
.logo svg, .browser svg { display: block; flex: none; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.site-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: color 180ms ease, background-color 180ms ease;
}
.site-nav a:hover { color: #fff; background: var(--card); }
.bar-cta {
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease;
}
.bar-cta:hover { border-color: var(--focus); background: #2c3352; }
.wrap { padding-top: clamp(36px, 5vw, 72px); padding-bottom: clamp(48px, 6vw, 88px); }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(28px, 3.6vw, 72px);
  align-items: start;
}
.hero > * { min-width: 0; }
h1 {
  margin: 0;
  max-width: 12em;
  font-size: clamp(36px, 3.5vw, 64px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.title-rest {
  display: block;
  margin-top: 0.16em;
  color: #c4b5fd;
  font-size: 0.58em;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.title-dot {
  display: inline-block;
  width: 0.32em;
  height: 0.32em;
  margin-inline: 0.42em;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 0.06em;
}
#product-description {
  margin: 18px 0 0;
  max-width: 38em;
  color: var(--muted);
  font-size: clamp(16px, 1.15vw, 18px);
}
.demo {
  --esb-bg: #2a2244;
  --esb-text: #f5f3ff;
  --esb-accent: #c084fc;
  --esb-accent-text: #d8b4fe;
  --esb-on-accent: #1b1030;
  --esb-muted: #ddd6fe;
  --esb-note: #ede9fe;
  --esb-note-bg: #3b2f63;
  --esb-border: #6d5aa8;
  --esb-slash: #a78bfa;
  --esb-hl: rgba(192, 132, 252, 0.28);
  padding: clamp(22px, 2vw, 36px);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #242b45;
  box-shadow: 0 24px 60px rgba(8, 6, 20, 0.28);
  color: #f5f3ff;
}
.demo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.reading-kicker {
  margin: 0;
  color: #c4b5fd;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.demo-stage {
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.55;
}
.demo-plain,
.demo-result { min-width: 0; }
.demo-result { display: none; }
.demo[data-stage="result"] .demo-plain { display: none; }
.demo[data-stage="result"] .demo-result { display: block; }
.demo-lead,
.demo-tail,
.demo-sentence { margin: 0; overflow-wrap: anywhere; }
.demo-lead,
.demo-tail { color: var(--muted); }
.demo-line { position: relative; margin: 0.75em 0 2.8em; }
.demo-sentence {
  color: #f5f3ff;
  font-size: 1.12em;
  line-height: 1.55;
  border-radius: 3px;
  background-image: linear-gradient(rgba(167, 139, 250, 0.45), rgba(167, 139, 250, 0.45));
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 0% 86%;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition: background-size 1.15s ease;
}
.demo[data-stage="select"] .demo-sentence,
.demo[data-stage="button"] .demo-sentence,
.demo[data-stage="busy"] .demo-sentence { background-size: 100% 86%; }
.demo[data-stage="read"] .demo-sentence,
.demo[data-stage="restore"] .demo-sentence { transition: none; background-size: 0% 86%; }
.demo-float {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px 9px 14px;
  border-radius: 999px;
  background: #2b3350;
  color: #e8ecf5;
  font: 500 15px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0.2px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.demo[data-stage="button"] .demo-float,
.demo[data-stage="busy"] .demo-float { opacity: 1; transform: translateY(calc(100% + 8px)); }
.demo-float svg { width: 17px; height: 17px; display: block; flex: none; }
.demo-float .spin,
.demo[data-stage="busy"] .demo-float .spark,
.demo[data-stage="busy"] .lbl-idle,
.lbl-busy { display: none; }
.demo[data-stage="busy"] .demo-float .spin { display: block; animation: demo-spin 0.9s linear infinite; }
.demo[data-stage="busy"] .lbl-busy { display: inline; }
@keyframes demo-spin { to { transform: rotate(360deg); } }
.demo .esb-root {
  display: block;
  box-sizing: border-box;
  margin: 0.75em 0;
  padding: 0.7em 0.85em 0.6em;
  border-left: 3px solid var(--esb-accent);
  border-radius: 6px;
  background: var(--esb-bg);
  color: var(--esb-text);
  line-height: 1.45;
  text-align: left;
}
.demo .esb-sentence {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  row-gap: 0.75em;
  column-gap: 0.2em;
}
.demo .esb-chunk {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  max-width: 100%;
  padding: 0 0.15em;
  border-radius: 4px;
}
.demo .esb-chunk-first { grid-template-columns: minmax(0, 1fr); }
.demo .esb-text {
  display: block;
  grid-column: 2;
  overflow-wrap: anywhere;
}
.demo .esb-chunk-first .esb-text,
.demo .esb-chunk-first .esb-meaning,
.demo .esb-chunk-first .esb-notes { grid-column: 1; }
.demo .esb-slash {
  display: block;
  grid-column: 1;
  grid-row: 1;
  padding: 0 0.45em 0 0.1em;
  color: var(--esb-slash);
  font-weight: 300;
  user-select: none;
}
.demo .esb-meaning {
  display: block;
  grid-column: 2;
  margin-top: 0.2em;
  font-size: 0.78em;
  line-height: 1.35;
  color: var(--esb-muted);
}
.demo .esb-notes {
  display: flex;
  grid-column: 2;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2em;
  margin-top: 0.3em;
}
.demo .esb-note {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.45em;
  padding: 0.12em 0.5em;
  border-radius: 4px;
  background: var(--esb-note-bg);
  font-size: 0.72em;
  line-height: 1.4;
  color: var(--esb-note);
  cursor: default;
  transition: background 0.12s ease;
}
.demo .esb-note-phrase { color: var(--esb-accent-text); font-weight: 600; }
.demo .esb-order {
  display: inline-grid;
  place-items: center;
  min-width: 1.5em;
  height: 1.5em;
  padding: 0 0.3em;
  margin-right: 0.4em;
  border-radius: 999px;
  border: 1px solid var(--esb-border);
  background: var(--esb-note-bg);
  color: var(--esb-accent-text);
  font-size: 0.62em;
  font-weight: 700;
  line-height: 1;
  vertical-align: 0.15em;
  box-sizing: border-box;
}
.demo .esb-order-moved {
  background: var(--esb-accent);
  border-color: var(--esb-accent);
  color: var(--esb-on-accent);
}
.demo .esb-term {
  text-decoration: underline dotted var(--esb-accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  border-radius: 3px;
  cursor: help;
  transition: background 0.12s ease;
}
.demo .esb-term.esb-hl,
.demo .esb-note.esb-hl { background: var(--esb-hl); }
.demo .esb-sent-translation {
  flex: 1 0 100%;
  margin-top: 0.55em;
  font-size: 0.95em;
  line-height: 1.5;
}
.demo .esb-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.7em;
  pointer-events: none;
}
.demo .esb-speak,
.demo .esb-restore {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  margin-left: 0.5em;
  padding: 0.25em 0.7em;
  border: 1px solid var(--esb-border);
  border-radius: 999px;
  font-size: 0.72em;
  line-height: 1.4;
  color: var(--esb-accent-text);
}
.demo .esb-restore::before { content: "↺"; font-size: 1.1em; }
.demo[data-stage="result"] .esb-chunk,
.demo[data-stage="result"] .esb-sent-translation,
.demo[data-stage="result"] .esb-bar {
  animation: demo-rise 0.6s ease both;
}
.demo[data-stage="result"] .esb-chunk:nth-child(2) { animation-delay: 0.22s; }
.demo[data-stage="result"] .esb-chunk:nth-child(3) { animation-delay: 0.44s; }
.demo[data-stage="result"] .esb-chunk:nth-child(4) { animation-delay: 0.66s; }
.demo[data-stage="result"] .esb-chunk:nth-child(5) { animation-delay: 0.88s; }
.demo[data-stage="result"] .esb-sent-translation { animation-delay: 1.15s; }
.demo[data-stage="result"] .esb-bar { animation-delay: 1.4s; }
@keyframes demo-rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.install { margin-top: clamp(28px, 3vw, 40px); }
.install h2 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}
.steps {
  margin-top: clamp(64px, 8vw, 112px);
  margin-inline: calc(var(--page-pad) * -1);
  padding: clamp(36px, 4.5vw, 64px) var(--page-pad);
  border-block: 1px solid var(--line);
  background: rgba(36, 43, 69, 0.55);
}
.buy { margin-top: clamp(56px, 7vw, 96px); }
.trial { margin-top: clamp(56px, 7vw, 96px); }
.trial p { max-width: 40em; }
h2 {
  margin: 0 0 16px;
  font-size: clamp(28px, 2.2vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.buy {
  display: grid;
  row-gap: 16px;
}
.buy h2 { margin-bottom: 0; }
#billing-rule { margin: 0; max-width: 40em; color: var(--muted); }
.browsers, .steps ol, .packs { display: grid; gap: clamp(12px, 1.2vw, 16px); }
.browsers { grid-template-columns: 1fr; }
.steps ol, .packs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.packs { margin-top: 8px; }
.steps ol { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 100%;
  padding: clamp(18px, 1.6vw, 24px);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #1b2036;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 4px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.steps strong { font-size: 17px; }
.steps span { color: var(--muted); }
.browser, button, .pack {
  cursor: pointer;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}
.browser {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 56px;
  padding: 12px 16px;
  text-align: center;
  text-decoration: none;
}
.browser:not([aria-disabled="true"]):hover,
button:not(:disabled):hover,
.pack:hover { border-color: var(--focus); }
.browser-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.browser-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.browser small {
  padding: 2px 8px;
  border-radius: 999px;
  background: #1b2036;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.chrome-trust:not([open]) { display: none; }
.chrome-trust[open] {
  display: block;
  width: min(860px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: clamp(18px, 2vw, 28px);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #242b45;
  color: var(--ink);
}
.chrome-trust::backdrop { background: rgba(12, 14, 28, 0.72); }
.chrome-trust-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.chrome-trust-sample {
  padding: 16px 16px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #2a314c;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}
.chrome-trust-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 8px;
  font-weight: 700;
  line-height: 1.4;
}
.chrome-trust-shield {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: #f5c451;
}
.chrome-trust-detail {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.chrome-trust-detail span { color: #8ab4f8; }
.chrome-trust-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 14px 0 0;
}
.chrome-trust-actions span {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}
.chrome-trust-actions span:first-child {
  border: 1px solid #8ab4f8;
  color: #8ab4f8;
}
.chrome-trust-actions span:last-child {
  background: #1a73e8;
  color: #fff;
}
.chrome-trust-kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 14px;
}
.chrome-trust h2 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.chrome-trust-copy p { margin: 0 0 10px; color: var(--muted); }
.chrome-trust-copy .chrome-trust-go {
  margin: 0 0 16px;
  color: var(--ink);
  font-weight: 650;
}
#chrome-trust-confirm {
  align-self: flex-start;
  min-height: 44px;
  padding: 10px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 650;
}
#chrome-trust-confirm:hover { background: var(--accent-hover); }
@media (min-width: 721px) {
  .chrome-trust[open] {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    gap: 12px clamp(18px, 2.4vw, 36px);
    align-items: center;
  }
  .chrome-trust-sample { grid-row: 1 / span 2; }
}
button:disabled,
.browser[aria-disabled="true"] {
  cursor: not-allowed;
  color: var(--muted);
  background: var(--card);
  border-color: var(--line-strong);
}
button:disabled:hover,
.browser[aria-disabled="true"]:hover,
.browser-primary[aria-disabled="true"],
.browser-primary[aria-disabled="true"]:hover {
  color: var(--muted);
  background: var(--card);
  border-color: var(--line-strong);
}
.pack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 148px;
  height: 100%;
  padding: clamp(18px, 1.6vw, 24px);
  text-align: left;
}
.pack-price {
  font-size: clamp(28px, 2vw, 36px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.pack-count { color: var(--muted); font-weight: 500; }
.pack::after {
  content: "选择这档";
  margin-top: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.pack[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.pack[aria-pressed="true"] .pack-count,
.pack[aria-pressed="true"]::after { color: #fff; }
.pack[aria-pressed="true"]::after { content: "已选"; }
.pack[aria-pressed="true"]:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.key-box {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 12px 20px;
  align-items: end;
  margin-top: 12px;
  padding: clamp(18px, 2vw, 28px);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--card);
}
label { display: block; margin: 0; font-weight: 650; }
.key-box label { grid-column: 1 / -1; }
input {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #1b2036;
  color: var(--ink);
  font: inherit;
}
input::placeholder { color: var(--muted); }
.key-box input { grid-column: 1; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.key-box .modes { grid-column: 2; }
.modes button { min-height: 48px; padding: 12px 16px; }
#mode-new { background: var(--accent); border-color: var(--accent); color: #fff; }
#mode-new:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
#mode-topup:not(:disabled) { border-color: var(--focus); }
#mode-topup:disabled { color: var(--muted); }
#pay-result { min-height: 1.6em; margin: 4px 0 0; color: var(--muted); }
.key-box #pay-result { grid-column: 1 / -1; }
#pay-result:not(:empty) {
  padding: 12px 14px;
  border-radius: 10px;
  background: #1b2036;
  color: var(--ink);
}
footer {
  margin-top: clamp(48px, 6vw, 80px);
  margin-inline: calc(var(--page-pad) * -1);
  padding: 24px var(--page-pad) 0;
  border-top: 1px solid var(--line);
}
footer p { margin: 0; color: var(--muted); font-size: 14px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
#product-title, #install, #steps, #buy { scroll-margin-top: 88px; }
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 28px; }
  h1 { max-width: 16em; }
  .browsers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .key-box { grid-template-columns: 1fr; }
  .key-box label, .key-box input, .key-box .modes, .key-box #pay-result { grid-column: 1; }
  .chrome-trust[open] { width: min(860px, calc(100vw - 24px)); }
}
@media (max-width: 640px) {
  .browsers, .steps ol, .packs, .modes { grid-template-columns: 1fr; }
  .demo { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .browser, button, .pack, .bar-cta, .site-nav a, .demo-sentence, .demo-plain, .demo-result, .demo-float, .demo .esb-note, .demo .esb-term { transition: none; }
  .demo-plain { display: none; }
  .demo-result { display: block; }
  .demo .esb-chunk,
  .demo .esb-sent-translation,
  .demo .esb-bar,
  .demo-float .spin { animation: none; }
}
