:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --ink: #142033;
  --muted: #637083;
  --line: #dce4ee;
  --primary: #11716f;
  --primary-strong: #0c5656;
  --accent: #d88a1d;
  --danger: #b93a32;
  --success: #23835f;
  --shadow: 0 20px 50px rgba(30, 44, 68, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Segoe UI",
    Arial,
    sans-serif;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 0 40px;
  border-bottom: 1px solid rgba(220, 228, 238, 0.8);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

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

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.main-nav a {
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--surface-2);
  color: var(--primary-strong);
}

.header-actions,
.hero-actions,
.download-actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-button,
.secondary-button,
.ghost-button,
.text-button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 16px;
  white-space: nowrap;
  font-weight: 700;
}

.primary-button {
  background: var(--primary);
  color: #fff;
}

.primary-button:hover {
  background: var(--primary-strong);
}

.secondary-button {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.secondary-button:hover,
.ghost-button:hover {
  border-color: #c5d3e4;
  background: var(--surface-2);
}

.ghost-button {
  border-color: var(--line);
  background: transparent;
  color: var(--primary-strong);
}

.text-button {
  min-height: auto;
  padding: 0;
  background: transparent;
  color: var(--primary-strong);
}

.large {
  min-height: 46px;
  padding: 0 20px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 28px;
  align-items: stretch;
  min-height: 470px;
}

.hero-copy,
.hero-panel,
.auth-card,
.workspace-panel,
.rule-grid article,
.contact-card,
.policy-card,
.filters,
.detail-shell,
.app-hero {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 56px);
}

.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

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

h1 {
  max-width: 680px;
  margin-bottom: 16px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(26px, 3.8vw, 40px);
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 14px;
  font-size: 18px;
}

h4 {
  margin-bottom: 0;
  font-size: 17px;
}

.hero-slogan {
  width: fit-content;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #fff4df;
  color: #8e5313;
  font-size: 22px;
  font-weight: 800;
}

.hero-text {
  max-width: 620px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 17px;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(17, 113, 111, 0.08), rgba(216, 138, 29, 0.08)),
    #fff;
}

.hero-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.hero-panel-head span,
.market-toolbar span,
.product-card small,
.order-list span,
.seller-list span,
.profile-lines span {
  color: var(--muted);
}

.hero-panel-head strong {
  font-size: 28px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}

.metric-grid div {
  min-height: 86px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.metric-grid span,
.metric-grid strong {
  display: block;
}

.metric-grid strong {
  margin-top: 6px;
  font-size: 28px;
}

.rig-visual {
  position: relative;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(20, 32, 51, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(20, 32, 51, 0.05) 1px, transparent 1px),
    #fbfdff;
  background-size: 18px 18px;
}

.rig-card {
  position: absolute;
  top: 30px;
  left: 28px;
  display: grid;
  grid-template-columns: repeat(4, 54px);
  gap: 10px;
}

.gpu-chip {
  display: block;
  height: 88px;
  border: 1px solid #a9bacd;
  border-radius: 7px;
  background:
    linear-gradient(180deg, #ffffff, #dae5ee),
    repeating-linear-gradient(90deg, transparent 0 8px, rgba(17, 113, 111, 0.14) 8px 10px);
}

.signal-lines {
  position: absolute;
  right: 24px;
  top: 36px;
  width: 95px;
}

.signal-lines span {
  display: block;
  height: 10px;
  margin-bottom: 20px;
  border-radius: 99px;
  background: var(--primary);
}

.signal-lines span:nth-child(2) {
  width: 70%;
  background: var(--accent);
}

.signal-lines span:nth-child(3) {
  width: 45%;
}

.search-bar {
  display: grid;
  grid-template-columns: 1.1fr 0.7fr 0.8fr auto;
  gap: 14px;
  align-items: end;
  margin: 22px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cad6e4;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 12px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(17, 113, 111, 0.14);
}

.section-block {
  margin-top: 26px;
}

.section-title,
.page-head,
.market-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.section-title span {
  font-size: 24px;
  font-weight: 800;
}

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

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

.product-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 270px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.product-card:hover {
  border-color: #b9c9dc;
  box-shadow: 0 18px 36px rgba(30, 44, 68, 0.1);
}

.product-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.product-card h3 {
  margin-bottom: 4px;
  font-size: 18px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
}

.tag {
  background: var(--surface-2);
  color: var(--primary-strong);
}

.status-pill.success {
  background: #e6f5ee;
  color: var(--success);
}

.status-pill.warning {
  background: #fff2db;
  color: #8d520f;
}

.status-pill.danger {
  background: #ffe9e7;
  color: var(--danger);
}

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

.spec-grid div {
  padding: 10px;
  border-radius: 6px;
  background: #f8fafc;
}

.spec-grid span,
.spec-grid strong {
  display: block;
}

.spec-grid span {
  color: var(--muted);
  font-size: 12px;
}

.price-line {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-top: auto;
  gap: 12px;
}

.price {
  color: var(--danger);
  font-size: 22px;
  font-weight: 900;
}

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

.feature-band div {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}

.feature-band strong,
.feature-band span {
  display: block;
}

.feature-band span {
  margin-top: 8px;
  color: var(--muted);
}

.market-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
}

.filters {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 18px;
  box-shadow: none;
}

.filters label,
.auth-card label,
.publish-form label {
  display: block;
  margin-bottom: 14px;
}

.check-line {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.check-line input {
  width: 18px;
  min-height: 18px;
}

.check-line span {
  margin: 0;
  color: var(--ink);
}

.detail-shell {
  padding: 24px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
}

.detail-visual {
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(17, 113, 111, 0.1), rgba(216, 138, 29, 0.12)),
    #fbfdff;
}

.detail-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}

.restriction-list {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.restriction-list span {
  display: block;
  padding: 10px 12px;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: #fff8ed;
}

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

.form-section {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.form-section.wide,
.form-actions {
  grid-column: 1 / -1;
}

.auth-shell {
  display: grid;
  min-height: 620px;
  place-items: center;
}

.auth-card {
  width: min(440px, 100%);
  padding: 28px;
}

.auth-card .primary-button {
  width: 100%;
  margin: 8px 0 16px;
}

.app-hero {
  display: grid;
  grid-template-columns: 1fr 260px 210px;
  gap: 24px;
  align-items: center;
  padding: 34px;
}

.app-hero p {
  max-width: 620px;
  color: var(--muted);
  font-size: 17px;
}

.phone-preview {
  width: 210px;
  height: 410px;
  margin: 0 auto;
  border: 9px solid #172235;
  border-radius: 28px;
  background: #172235;
  box-shadow: 0 24px 44px rgba(20, 32, 51, 0.18);
}

.phone-top {
  width: 72px;
  height: 8px;
  margin: 10px auto;
  border-radius: 999px;
  background: #344157;
}

.phone-screen {
  height: 352px;
  border-radius: 18px;
  padding: 20px;
  background: linear-gradient(180deg, #eef8f6, #ffffff);
}

.phone-screen strong,
.phone-screen span {
  display: block;
}

.phone-screen span {
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 800;
}

.mini-list {
  display: grid;
  gap: 12px;
  margin-top: 32px;
}

.mini-list i {
  display: block;
  height: 56px;
  border-radius: 8px;
  background: #dceae9;
}

.qr-box {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}

.qr-grid {
  width: 150px;
  height: 150px;
  background:
    linear-gradient(90deg, #142033 50%, transparent 50%),
    linear-gradient(#142033 50%, transparent 50%);
  background-size: 20px 20px;
  border: 12px solid #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 18px;
}

.workspace-panel {
  padding: 20px;
  box-shadow: none;
}

.order-list,
.seller-list,
.profile-lines {
  display: grid;
  gap: 12px;
}

.order-list div,
.seller-list div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfe;
}

.order-list strong,
.order-list span,
.seller-list strong,
.seller-list span,
.profile-lines span {
  display: block;
}

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

.rule-grid article {
  padding: 22px;
  box-shadow: none;
}

.rule-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 18px;
}

.contact-card {
  padding: 24px;
  box-shadow: none;
}

.contact-main p {
  color: var(--muted);
}

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

.contact-methods div {
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfe;
}

.contact-methods span,
.contact-methods strong {
  display: block;
}

.contact-methods span {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.contact-form label {
  display: block;
  margin-bottom: 14px;
}

.contact-form .primary-button {
  width: 100%;
}

.trusted-service {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid #bcd7cf;
  border-radius: var(--radius);
  background: #f5fbf8;
}

.trusted-service-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.trusted-service-head h4 {
  margin-top: 10px;
}

.trusted-service-head > strong {
  padding: 8px 10px;
  border: 1px solid #bcd7cf;
  border-radius: 6px;
  background: #ffffff;
  color: var(--primary-strong);
  font-size: 13px;
}

.trusted-service p {
  margin: 14px 0;
  color: var(--muted);
}

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

.trust-grid div {
  min-height: 78px;
  padding: 12px;
  border: 1px solid #d8e8e3;
  border-radius: 6px;
  background: #ffffff;
}

.trust-grid span,
.trust-grid strong,
.trusted-ticket {
  display: block;
}

.trust-grid span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.trust-grid strong {
  color: var(--ink);
}

.trusted-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.trusted-ticket {
  margin-top: 12px;
  padding: 12px;
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  background: #ffffff;
  color: var(--primary-strong);
  font-weight: 800;
}

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

.policy-card {
  padding: 22px;
  box-shadow: none;
}

.policy-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 28px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}

.site-footer strong,
.site-footer span,
.site-footer small {
  display: block;
}

.site-footer span,
.site-footer small {
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.site-footer small {
  grid-column: 1 / -1;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  max-width: min(360px, calc(100% - 44px));
  padding: 14px 16px;
  border: 1px solid #bfd2ca;
  border-radius: 8px;
  background: #f4fbf8;
  color: var(--primary-strong);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: auto auto;
    padding: 0 18px;
  }

  .nav-toggle {
    display: block;
    justify-self: end;
  }

  .main-nav,
  .header-actions {
    display: none;
  }

  .main-nav.open,
  .header-actions.open {
    display: flex;
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding-bottom: 12px;
  }

  .hero,
  .market-layout,
  .detail-grid,
  .app-hero,
  .contact-layout,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .search-bar,
  .publish-form,
  .product-grid,
  .product-grid.compact,
  .feature-band,
  .contact-methods,
  .trust-grid,
  .policy-layout,
  .rule-grid {
    grid-template-columns: 1fr 1fr;
  }

  .filters {
    position: static;
  }
}

@media (max-width: 680px) {
  main {
    width: min(100% - 20px, 1180px);
    padding-top: 16px;
  }

  .site-header {
    min-height: 64px;
  }

  .brand {
    min-width: 0;
  }

  .brand small {
    display: none;
  }

  .hero-copy,
  .hero-panel,
  .detail-shell,
  .app-hero {
    padding: 20px;
  }

  .hero-actions,
  .download-actions,
  .form-actions,
  .section-title,
  .page-head,
  .market-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-bar,
  .publish-form,
  .product-grid,
  .product-grid.compact,
  .feature-band,
  .contact-methods,
  .trust-grid,
  .policy-layout,
  .rule-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  .rig-card {
    grid-template-columns: repeat(2, 54px);
  }

  .signal-lines {
    right: 18px;
    width: 70px;
  }
}
