:root {
  color-scheme: dark;
  --bg: #070b11;
  --surface: #0d141d;
  --surface-2: #111b26;
  --surface-3: #172330;
  --text: #f5f7fa;
  --muted: #9aa8b7;
  --subtle: #6f7f90;
  --border: #263545;
  --gold: #e7b94e;
  --gold-strong: #f2c65e;
  --cyan: #36b6c9;
  --green: #38a978;
  --red: #e26f6f;
  --warning: #dfa94a;
  --header: rgba(7, 11, 17, 0.92);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7f9;
  --surface: #ffffff;
  --surface-2: #edf2f5;
  --surface-3: #e4ebef;
  --text: #13202d;
  --muted: #536372;
  --subtle: #738291;
  --border: #cfdae2;
  --gold: #9a6e13;
  --gold-strong: #7d580c;
  --cyan: #167b8c;
  --green: #18714d;
  --red: #b84444;
  --warning: #9a6715;
  --header: rgba(255, 255, 255, 0.93);
  --shadow: 0 16px 42px rgba(28, 47, 64, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0;
}
button, input { font: inherit; letter-spacing: 0; }
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.mono { font-family: Consolas, "SFMono-Regular", monospace; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 66px;
  border-bottom: 1px solid var(--border);
  background: var(--header);
  backdrop-filter: blur(16px);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; white-space: nowrap; }
.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 6px;
  color: var(--gold-strong);
  font-size: 13px;
}
.site-nav { display: flex; align-items: center; gap: 20px; min-width: 0; }
.site-nav a, .nav-command { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.site-nav a:hover, .nav-command:hover { color: var(--text); }
.nav-command, .theme-button { padding: 0; border: 0; background: none; cursor: pointer; }
.theme-button {
  min-width: 44px;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 750;
  cursor: pointer;
}
.button:focus-visible, input:focus-visible, .theme-button:focus-visible, .table-action:focus-visible {
  outline: 3px solid rgba(54, 182, 201, 0.35);
  outline-offset: 2px;
}
.button-primary { background: var(--gold-strong); border-color: var(--gold-strong); color: #17120a; }
.button-primary:hover { filter: brightness(1.06); }
.button-secondary { border-color: var(--border); background: var(--surface); color: var(--text); }
.button-secondary:hover { border-color: var(--cyan); }
.button-small { min-height: 36px; padding: 6px 12px; }

.eyebrow { margin: 0 0 10px; color: var(--gold); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.hero {
  position: relative;
  min-height: min(760px, calc(100svh - 66px));
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #080a0d;
}
.hero-media, .hero-shade { position: absolute; inset: 0; }
.hero-media {
  background-image: url("/static/images/ea001-market-workstation.png");
  background-size: cover;
  background-position: center;
}
.hero-shade { background: linear-gradient(90deg, rgba(4, 7, 10, 0.94) 0%, rgba(4, 7, 10, 0.76) 42%, rgba(4, 7, 10, 0.08) 78%); }
.hero-content { position: relative; z-index: 2; padding: 90px 0; }
.hero h1 { max-width: 650px; margin: 0; font-size: 58px; line-height: 1.08; letter-spacing: 0; color: #fff; }
.hero-copy { max-width: 620px; margin: 22px 0 0; color: #c1c9d1; font-size: 19px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero .button-secondary { background: rgba(8, 12, 16, 0.64); border-color: rgba(255,255,255,.25); color: #fff; }
.hero-note { max-width: 630px; margin: 18px 0 0; color: #929da7; font-size: 13px; }

.section-band { padding: 80px 0; background: var(--bg); }
.section-muted { background: var(--surface-2); border-block: 1px solid var(--border); }
.section-heading { max-width: 720px; margin: 0 auto 34px; text-align: center; }
.section-heading.align-left { margin-inline: 0; text-align: left; }
.section-heading h2, .product-copy h2, .table-heading h2, .payment-result h2 { margin: 0; font-size: 34px; line-height: 1.25; letter-spacing: 0; }
.section-heading p, .product-copy > p, .table-heading p { color: var(--muted); }
.product-layout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(480px, 1.1fr); gap: 58px; align-items: center; }
.product-copy > p { margin: 18px 0 0; }
.compact-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 28px; border: 1px solid var(--border); background: var(--border); }
.compact-points div { min-height: 110px; padding: 18px; background: var(--surface); }
.compact-points strong, .compact-points span { display: block; }
.compact-points span { margin-top: 6px; color: var(--muted); font-size: 14px; }
.product-preview { margin: 0; }
.preview-placeholder {
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, transparent 10%, rgba(5, 10, 15, .95) 100%),
    url("/static/images/ea001-market-workstation.png") center / cover;
  color: #fff;
}
.preview-placeholder strong { max-width: 500px; font-size: 21px; }
.preview-placeholder span:last-child { max-width: 560px; margin-top: 5px; color: #b8c1ca; font-size: 14px; }
.preview-kicker { color: #e7b94e !important; font-size: 12px !important; font-weight: 800; }
.product-preview figcaption { margin-top: 10px; color: var(--subtle); font-size: 12px; }

.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan-card { display: flex; min-height: 390px; flex-direction: column; padding: 26px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.plan-featured { border-color: var(--gold); box-shadow: inset 0 3px 0 var(--gold); }
.plan-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan-topline h3 { margin: 0; font-size: 20px; }
.badge { padding: 3px 8px; border-radius: 4px; background: rgba(231, 185, 78, .14); color: var(--gold); font-size: 12px; font-weight: 800; }
.plan-price { margin: 22px 0; font-size: 38px; line-height: 1; font-weight: 800; }
.plan-price span { margin-right: 3px; font-size: 18px; color: var(--muted); }
.plan-facts { margin: 0 0 26px; }
.plan-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.plan-facts dt { color: var(--muted); }
.plan-facts dd { margin: 0; font-weight: 700; }
.plan-card .button { width: 100%; margin-top: auto; }

.purchase-flow { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: 60px; }
.flow-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.flow-list li { display: grid; grid-template-columns: 54px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.flow-list > li > span { color: var(--gold); font-family: Consolas, monospace; font-weight: 800; }
.flow-list strong, .flow-list p { display: block; }
.flow-list p { margin: 3px 0 0; color: var(--muted); }

.auth-section { min-height: calc(100svh - 154px); display: grid; place-items: center; padding: 64px 20px; background: var(--surface-2); }
.auth-panel { width: min(440px, 100%); padding: 32px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.auth-panel h1 { margin: 0; font-size: 32px; line-height: 1.2; }
.auth-panel > p { color: var(--muted); }
.form-stack { display: grid; gap: 16px; margin-top: 26px; }
.form-stack label { display: grid; gap: 7px; font-size: 14px; font-weight: 700; }
.form-stack input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
}
.form-stack small { color: var(--subtle); font-weight: 400; }
.form-error { margin: 0; padding: 9px 11px; border-left: 3px solid var(--red); background: rgba(226,111,111,.1); color: var(--red) !important; font-size: 14px; }
.auth-switch { margin: 20px 0 0; text-align: center; font-size: 14px; }
.auth-switch a { color: var(--cyan); font-weight: 700; }

.account-header, .checkout-header { padding: 54px 0 34px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.account-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.account-heading h1, .checkout-header h1 { margin: 0; font-size: 38px; line-height: 1.2; }
.account-heading p, .checkout-header p { margin: 6px 0 0; color: var(--muted); }
.account-content { padding-top: 34px; }
.account-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--border); background: var(--border); gap: 1px; }
.account-summary div { min-height: 96px; padding: 18px; background: var(--surface); }
.account-summary span, .account-summary strong { display: block; }
.account-summary span { color: var(--muted); font-size: 13px; }
.account-summary strong { margin-top: 7px; overflow-wrap: anywhere; }
.table-heading { margin: 34px 0 16px; }
.table-heading h2 { font-size: 24px; }
.table-heading p { margin: 3px 0 0; }
.order-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.order-table { width: 100%; min-width: 940px; border-collapse: collapse; font-size: 14px; }
.order-table th, .order-table td { padding: 13px 14px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.order-table th { background: var(--surface-2); color: var(--muted); font-size: 12px; }
.order-table tr:last-child td { border-bottom: 0; }
.table-action { color: var(--cyan); font-weight: 750; text-decoration: none; }
.status { display: inline-flex; min-height: 27px; align-items: center; padding: 3px 8px; border: 1px solid var(--border); border-radius: 4px; white-space: nowrap; font-size: 12px; font-weight: 800; }
.status-paid { color: var(--green); border-color: rgba(56,169,120,.4); background: rgba(56,169,120,.1); }
.status-confirming, .status-activating { color: var(--warning); border-color: rgba(223,169,74,.4); background: rgba(223,169,74,.1); }
.status-cancelled { color: var(--subtle); }
.empty-state { padding: 42px 24px; border: 1px solid var(--border); text-align: center; }
.empty-state strong { font-size: 20px; }
.empty-state p { color: var(--muted); }

.checkout-section { padding-top: 34px; }
.checkout-shell { max-width: 1040px; }
.checkout-form, .payment-result { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); padding: 28px; }
.checkout-plan { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); }
.checkout-plan div { min-height: 84px; padding: 15px; border-right: 1px solid var(--border); }
.checkout-plan div:last-child { border-right: 0; }
.checkout-plan span, .checkout-plan strong { display: block; }
.checkout-plan span { color: var(--muted); font-size: 13px; }
.checkout-plan strong { margin-top: 7px; }
.checkout-plan .amount strong { color: var(--gold-strong); font-size: 22px; }
.payment-methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 26px 0; padding: 0; border: 0; }
.payment-methods legend { grid-column: 1 / -1; margin-bottom: 8px; font-weight: 800; }
.payment-methods label { position: relative; cursor: pointer; }
.payment-methods input { position: absolute; opacity: 0; pointer-events: none; }
.payment-methods span { display: block; min-height: 86px; padding: 14px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); }
.payment-methods strong, .payment-methods small { display: block; }
.payment-methods small { margin-top: 4px; color: var(--muted); }
.payment-methods input:checked + span { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.terms { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.terms input { margin-top: 5px; }
.checkout-form > .button { width: 100%; }
.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.payment-layout { display: grid; grid-template-columns: minmax(210px, .8fr) 300px minmax(260px, 1fr); gap: 22px; align-items: stretch; }
.payment-info, .payment-steps { min-width: 0; padding: 20px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); }
.payment-info h3, .payment-steps h3 { margin: 0 0 14px; font-size: 17px; }
.payment-info dl { margin: 0; }
.payment-info dl div { padding: 9px 0; border-bottom: 1px solid var(--border); }
.payment-info dl div:last-child { border-bottom: 0; }
.payment-info dt { color: var(--muted); font-size: 12px; }
.payment-info dd { margin: 3px 0 0; overflow-wrap: anywhere; font-weight: 750; }
.payment-qr-area { display: grid; place-items: center; min-width: 0; }
.payment-qr-card {
  width: 300px;
  max-width: 100%;
  min-height: 368px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #fff;
  color: #18222d;
  text-align: center;
}
.payment-qr-card img, .qr-placeholder { width: 260px; height: 260px; max-width: 100%; object-fit: contain; }
.qr-placeholder { display: grid; place-items: center; padding: 20px; border: 1px dashed #abb6bf; background: #f3f6f8; color: #66737d; font-size: 14px; }
.payment-qr-card strong { margin-top: 12px; }
.payment-qr-card span { color: #66737d; font-size: 12px; }
.payment-steps ol { margin: 0; padding-left: 22px; }
.payment-steps li { margin: 7px 0; }
.payment-steps > p { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.payment-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.payment-actions .form-error { width: 100%; }
.submit-note { margin: 11px 0 0; color: var(--muted); font-size: 13px; }
.license-result { margin-top: 20px; padding: 18px; border: 1px solid rgba(56,169,120,.45); background: rgba(56,169,120,.08); }
.license-result span, .license-result strong { display: block; }
.license-result strong { margin-top: 5px; overflow-wrap: anywhere; color: var(--green); font-size: 19px; }
.license-result p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; padding-block: 26px; color: var(--muted); font-size: 13px; }
.footer-inner p { max-width: 680px; margin: 0; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 50; max-width: min(420px, calc(100% - 40px)); padding: 12px 16px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-3); box-shadow: var(--shadow); }

@media (max-width: 900px) {
  .site-nav > a[href="/#product"] { display: none; }
  .hero h1 { font-size: 48px; }
  .product-layout, .purchase-flow { grid-template-columns: 1fr; gap: 34px; }
  .plan-grid { grid-template-columns: 1fr; max-width: 620px; margin-inline: auto; }
  .plan-card { min-height: 0; }
  .payment-layout { grid-template-columns: minmax(190px, .8fr) minmax(260px, 1fr); }
  .payment-steps { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  body { font-size: 15px; line-height: 1.55; }
  .shell { width: min(100% - 28px, 1180px); }
  .site-header { height: 54px; }
  .brand { gap: 8px; font-size: 13px; }
  .brand-mark { width: 28px; height: 28px; font-size: 12px; }
  .site-nav { gap: 10px; }
  .site-nav > a:not(.button), .nav-command { display: none; }
  .site-nav .button { min-height: 34px; padding: 5px 9px; font-size: 12px; }
  .theme-button { min-width: 38px; min-height: 34px; font-size: 12px; }
  .eyebrow { margin-bottom: 7px; font-size: 11px; }
  .hero { min-height: min(650px, calc(100svh - 86px)); align-items: flex-end; }
  .hero-media { background-position: 64% center; }
  .hero-shade { background: linear-gradient(180deg, rgba(4,7,10,.16) 8%, rgba(4,7,10,.95) 68%); }
  .hero-content { padding: 108px 0 28px; }
  .hero h1 { font-size: 32px; line-height: 1.12; }
  .hero-copy { margin-top: 11px; font-size: 15px; line-height: 1.55; }
  .hero-actions { gap: 10px; margin-top: 18px; }
  .hero-actions .button { min-height: 44px; flex: 1 1 140px; padding: 8px 12px; font-size: 14px; }
  .hero-note { margin-top: 13px; font-size: 12px; line-height: 1.5; }
  .section-band { padding: 36px 0; }
  .section-heading { margin-bottom: 18px; }
  .section-heading h2, .product-copy h2, .payment-result h2 { font-size: 24px; line-height: 1.28; }
  .section-heading > p:not(.eyebrow), .product-copy > p { margin: 10px 0 0; font-size: 14px; line-height: 1.55; }
  .product-layout, .purchase-flow { gap: 22px; }
  .compact-points { gap: 1px; margin-top: 16px; }
  .compact-points div { min-height: 84px; padding: 11px; }
  .compact-points strong { font-size: 13px; line-height: 1.35; }
  .compact-points span { margin-top: 4px; font-size: 11px; line-height: 1.4; }
  .preview-placeholder { padding: 14px; }
  .preview-placeholder strong { font-size: 15px; line-height: 1.4; }
  .preview-placeholder span:last-child { font-size: 12px; line-height: 1.45; }
  .product-preview figcaption { margin-top: 7px; font-size: 11px; line-height: 1.45; }
  .plan-grid { gap: 10px; }
  .plan-card { padding: 16px; }
  .plan-topline h3 { font-size: 18px; }
  .plan-price { margin: 12px 0; font-size: 30px; }
  .plan-price span { font-size: 14px; }
  .plan-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 14px; border-block: 1px solid var(--border); }
  .plan-facts div { display: block; min-width: 0; padding: 8px 4px; border-right: 1px solid var(--border); border-bottom: 0; text-align: center; }
  .plan-facts div:last-child { border-right: 0; }
  .plan-facts dt { font-size: 11px; line-height: 1.35; }
  .plan-facts dd { margin-top: 3px; overflow-wrap: anywhere; font-size: 13px; line-height: 1.35; }
  .plan-card .button { min-height: 42px; padding: 8px 10px; font-size: 14px; }
  .purchase-flow .section-heading { margin-bottom: 0; }
  .flow-list li { grid-template-columns: 34px 1fr; gap: 10px; padding: 12px 0; }
  .flow-list strong { font-size: 14px; }
  .flow-list p { font-size: 12px; line-height: 1.45; }
  .auth-section { padding: 28px 14px; }
  .auth-panel { padding: 20px 16px; }
  .auth-panel h1 { font-size: 26px; }
  .form-stack { gap: 13px; margin-top: 20px; }
  .account-header, .checkout-header { padding: 26px 0 20px; }
  .account-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .account-heading h1, .checkout-header h1 { font-size: 26px; }
  .account-summary { grid-template-columns: 1fr 1fr; }
  .account-summary div:last-child { grid-column: 1 / -1; }
  .account-summary div { min-height: 78px; padding: 14px; }
  .account-content, .checkout-section { padding-top: 24px; }
  .checkout-form, .payment-result { padding: 16px 14px; }
  .checkout-plan { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checkout-plan div { min-height: 68px; padding: 12px; }
  .checkout-plan div:nth-child(2) { border-right: 0; }
  .checkout-plan div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .payment-methods { grid-template-columns: 1fr; gap: 7px; margin: 20px 0; }
  .payment-methods span { min-height: 62px; padding: 11px; }
  .result-heading { align-items: flex-start; }
  .payment-layout { grid-template-columns: 1fr; gap: 12px; }
  .result-order-first { order: 1; }
  .payment-qr-area { order: 2; }
  .payment-steps { order: 3; grid-column: auto; }
  .payment-info, .payment-steps { padding: 16px; }
  .payment-qr-card { width: 260px; min-height: 318px; padding: 14px; }
  .payment-qr-card img, .qr-placeholder { width: 232px; height: 232px; }
  .payment-actions { flex-direction: column; }
  .payment-actions .button { width: 100%; }
  .footer-inner { flex-direction: column; gap: 8px; padding-block: 20px; font-size: 12px; line-height: 1.5; }
}

@media (max-width: 390px) {
  .compact-points { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 30px; }
  .checkout-plan strong { font-size: 14px; }
  .payment-qr-card { width: 250px; }
  .payment-qr-card img, .qr-placeholder { width: 222px; height: 222px; }
}
