:root {
  color-scheme: light;
  --ink: #18212f;
  --muted: #667085;
  --line: #d9e1ec;
  --paper: #f7f5ef;
  --panel: #ffffff;
  --cinnabar: #b42318;
  --gold: #b88a2d;
  --jade: #0f766e;
  --blue: #1d4ed8;
  --shadow: 0 18px 50px rgba(24, 33, 47, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
}

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

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 42px;
  color: #ffffff;
  background: rgba(20, 29, 42, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.session-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.text-btn {
  border: 0;
  background: transparent;
  color: #fff4cf;
  cursor: pointer;
  font: inherit;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  background: #a92820;
  color: #fff4cf;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.25;
}

.brand strong {
  font-size: 16px;
}

.brand small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
}

.top-nav a {
  padding: 8px 0;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: #ffffff;
  background: #151d2b;
}

.hero-media {
  position: absolute;
  inset: 0;
  background-image: url("/assets/hero-kylin-software.png");
  background-size: cover;
  background-position: center;
  transform: scale(1.01);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.48) 48%, rgba(15, 23, 42, 0.2)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.04) 38%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(780px, calc(100% - 48px));
  margin-left: max(24px, 8vw);
  padding-top: 72px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: 0;
}

.lead {
  width: min(680px, 100%);
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
}

.primary-btn {
  background: var(--cinnabar);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.primary-btn.small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.primary-btn.dark {
  background: var(--ink);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.42);
}

.hero-strip {
  position: absolute;
  z-index: 3;
  left: max(24px, 8vw);
  right: max(24px, 8vw);
  bottom: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-strip span {
  padding: 14px 16px;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 14px;
}

.hero-strip span:last-child {
  border-right: 0;
}

.section {
  padding: 78px max(24px, 7vw);
}

.intro-band {
  background: var(--paper);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

.section-head.compact {
  display: block;
}

.section-head h2,
.contact h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.18;
  letter-spacing: 0;
}

.section-head p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 16px;
}

.product-shell {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  min-height: 570px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.product-list {
  display: grid;
  align-content: start;
  background: #18212f;
  color: #ffffff;
  border-right: 1px solid var(--line);
}

.product-tab {
  width: 100%;
  min-height: 94px;
  padding: 18px 20px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.product-tab strong,
.product-tab span {
  display: block;
}

.product-tab strong {
  font-size: 17px;
  line-height: 1.3;
}

.product-tab span {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  line-height: 1.45;
}

.product-tab.active {
  background: #ffffff;
  color: var(--ink);
}

.product-tab.active span {
  color: var(--muted);
}

.product-detail {
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 36px;
}

.product-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 30px;
  align-items: start;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.product-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.product-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--product-color, var(--cinnabar));
}

.product-detail h3 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: 0;
}

.product-detail .summary {
  margin: 18px 0 0;
  color: #475467;
  font-size: 17px;
  line-height: 1.85;
}

.release-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.release-meta span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #344054;
  font-size: 13px;
}

.product-badge {
  display: grid;
  gap: 10px;
  padding: 22px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--product-color, var(--cinnabar));
}

.product-badge small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.product-badge strong {
  font-size: 19px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
  gap: 28px;
  margin-top: 28px;
}

.detail-block h4 {
  margin: 0 0 12px;
  font-size: 18px;
}

.detail-block + .detail-block {
  margin-top: 24px;
}

.detail-block p {
  margin: 0;
  color: #475467;
  line-height: 1.8;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.chip {
  padding: 8px 11px;
  border-radius: 8px;
  background: #eef2f7;
  color: #344054;
  font-size: 13px;
}

.license-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.license-list li {
  padding: 12px 14px;
  border-left: 3px solid var(--product-color, var(--cinnabar));
  background: #f8fafc;
  color: #344054;
}

.download-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
}

.order-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(360px, 1fr);
  gap: 20px;
  margin-top: 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.product-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.product-cta strong,
.product-cta span {
  display: block;
}

.product-cta strong {
  font-size: 18px;
}

.product-cta span {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.order-panel strong,
.order-panel span {
  display: block;
}

.order-panel strong {
  font-size: 18px;
}

.order-panel span {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.order-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 2fr) auto;
  gap: 10px;
  align-items: end;
}

.order-form label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 12px;
}

.order-form input,
.order-form select {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
}

.plan-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.plan-field legend {
  margin-bottom: 6px;
  color: #344054;
  font-size: 12px;
}

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

.plan-card {
  min-height: 74px;
  cursor: pointer;
}

.plan-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan-card > span {
  display: grid;
  gap: 2px;
  height: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.plan-card input:checked + span {
  border-color: var(--product-color, var(--cinnabar));
  box-shadow: inset 0 0 0 1px var(--product-color, var(--cinnabar));
}

.plan-card strong,
.plan-card em,
.plan-card del,
.plan-card small {
  display: block;
  font-style: normal;
}

.plan-card strong {
  color: var(--ink);
  font-size: 14px;
}

.plan-card em {
  color: var(--product-color, var(--cinnabar));
  font-size: 20px;
  font-weight: 800;
}

.plan-card del,
.plan-card small {
  color: var(--muted);
  font-size: 12px;
}

.my-orders {
  margin-top: 28px;
}

.orders-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.orders-head h3 {
  margin: 0;
  font-size: 28px;
}

.orders-head span {
  color: var(--muted);
}

.orders-list {
  display: grid;
  gap: 12px;
}

.order-item {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.order-item strong,
.order-item span,
.order-item small,
.order-item code {
  display: block;
}

.order-item span,
.order-item small {
  margin-top: 7px;
  color: var(--muted);
}

.order-item code {
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  background: #18212f;
  color: #fff4cf;
  overflow-wrap: anywhere;
}

.payment-box {
	display: grid;
	grid-template-columns: minmax(312px, max-content) minmax(0, 1fr);
	gap: 14px;
	margin-top: 14px;
	padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
}

.payment-box > div {
	grid-column: 1 / -1;
}

.payment-qr-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(132px, 150px));
	gap: 12px;
	align-content: start;
}

.payment-qr-list figure {
	margin: 0;
}

.payment-qr-list figcaption {
	margin-top: 6px;
	color: var(--muted);
	font-size: 13px;
	text-align: center;
}

.payment-box strong,
.payment-box span {
	display: block;
}

.payment-box span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.payment-qr {
	display: block;
	width: 100%;
	max-width: 150px;
	height: auto;
	aspect-ratio: 1;
	object-fit: contain;
	border: 1px solid var(--line);
	border-radius: 8px;
  background: #ffffff;
}

.payment-proof-form {
  display: grid;
  gap: 10px;
  align-content: start;
}

.payment-proof-form input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.download-item strong,
.download-item span {
  display: block;
}

.download-item strong {
  font-size: 15px;
}

.download-item span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.download-panel strong,
.download-panel span {
  display: block;
}

.download-panel strong {
  font-size: 18px;
}

.download-panel span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.login-panel {
  align-items: flex-start;
}

.login-form {
  display: grid;
  grid-template-columns: 150px 120px auto auto;
  gap: 10px;
  align-items: end;
}

.login-form label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 12px;
}

.login-form input {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
}

.auth-modal[hidden] {
  display: none;
}

body.modal-open {
  overflow: hidden;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 17, 30, 0.58);
}

.auth-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
}

.auth-dialog h2 {
  margin: 4px 0 18px;
  font-size: 24px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.modal-login-form {
  grid-template-columns: 1fr 130px;
}

.modal-login-form label:first-child {
  grid-column: 1 / -1;
}

.modal-login-form .primary-btn {
  min-height: 42px;
}

.ghost-form-btn {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.form-message {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: 0;
  color: var(--cinnabar);
  font-size: 13px;
}

.delivery {
  background: #ffffff;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.step {
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.step span {
  color: var(--cinnabar);
  font-weight: 800;
}

.step h3 {
  margin: 18px 0 10px;
  font-size: 20px;
}

.step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.contact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  color: #ffffff;
  background: #1b2534;
}

.contact .eyebrow {
  color: #e9c46a;
}

.center-body {
  min-height: 100vh;
  background: #eef2f7;
}

.center-header {
  position: sticky;
  background: #18212f;
}

.center-main {
  display: grid;
  gap: 22px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.center-title {
  display: grid;
  gap: 8px;
}

.center-title h1 {
  margin: 0;
  font-size: 36px;
}

.center-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.center-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.45fr);
  gap: 18px;
  align-items: start;
}

.center-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.account-panel {
  display: grid;
  gap: 16px;
}

.account-panel h2,
.center-panel h2 {
  margin: 0;
  font-size: 22px;
}

.account-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.account-card span,
.center-empty {
  color: var(--muted);
}

.center-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.center-form label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 12px;
}

.center-form input,
.center-form select {
  width: 100%;
  height: 44px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
}

.downloads-panel {
  grid-column: 2;
}

.center-download-grid {
  margin-top: 16px;
}

.center-orders-panel {
  margin-top: 2px;
}

.center-login-form {
  grid-template-columns: 1fr;
}

@media (max-width: 980px) {
  .site-header {
    position: relative;
    height: auto;
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 24px;
    background: #18212f;
  }

  .top-nav {
    gap: 16px;
    flex-wrap: wrap;
  }

  .session-badge {
    align-self: flex-start;
  }

  .hero {
    min-height: auto;
    align-items: start;
  }

  .hero-content {
    width: calc(100% - 48px);
    margin: 0 24px;
    padding: 64px 0 26px;
  }

  .hero-strip,
  .section-head,
  .product-shell,
  .product-hero,
  .detail-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .hero-strip {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: calc(100% - 48px);
    margin: 0 24px 24px;
  }

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

  .product-tab {
    min-height: 108px;
  }

  .download-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .product-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .order-panel,
  .order-form {
    grid-template-columns: 1fr;
  }

  .center-main {
    width: min(100% - 32px, 760px);
  }

  .center-grid {
    grid-template-columns: 1fr;
  }

  .downloads-panel {
    grid-column: auto;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .login-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 14px 16px;
  }

  .brand {
    width: 100%;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand strong {
    font-size: 14px;
  }

  .brand small {
    font-size: 11px;
  }

  .top-nav {
    width: 100%;
    font-size: 13px;
    gap: 8px;
  }

  .top-nav a {
    padding: 7px 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
  }

  .session-badge {
    width: 100%;
    justify-content: space-between;
  }

  .hero-content {
    width: calc(100% - 32px);
    margin: 0 16px;
    padding: 46px 0 22px;
  }

  .hero h1 {
    font-size: 36px;
    line-height: 1.12;
  }

  .lead {
    font-size: 16px;
    line-height: 1.75;
  }

  .hero-actions {
    gap: 10px;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .hero-strip {
    grid-template-columns: 1fr 1fr;
    width: calc(100% - 32px);
    margin: 0 16px 18px;
  }

  .hero-strip span:nth-child(2) {
    border-right: 0;
  }

  .section {
    padding: 52px 16px;
  }

  .center-main {
    width: calc(100% - 28px);
    padding-top: 24px;
  }

  .center-title h1 {
    font-size: 30px;
  }

  .section-head h2,
  .contact h2 {
    font-size: 28px;
  }

  .product-list {
    grid-template-columns: 1fr;
  }

  .product-tab {
    min-height: 82px;
    padding: 14px 16px;
  }

  .product-detail {
    padding: 18px;
  }

  .product-detail h3 {
    font-size: 30px;
  }

  .product-badge {
    padding: 18px;
  }

  .chip {
    max-width: 100%;
  }

  .orders-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .order-item {
    padding: 14px;
  }

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

	.payment-box {
		grid-template-columns: 1fr;
	}

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

	.payment-qr {
		max-width: none;
	}

  .contact {
    align-items: flex-start;
    flex-direction: column;
  }

  .login-form {
    grid-template-columns: 1fr;
  }

  .auth-dialog {
    padding: 20px;
  }
}
