:root {
  --bg: #f7f9f6;
  --surface: #ffffff;
  --surface-soft: #eef5ef;
  --ink: #121614;
  --muted: #5e6962;
  --line: #dfe7e1;
  --green: #078841;
  --green-dark: #066934;
  --green-soft: #ddf4e4;
  --coral: #f06445;
  --blue: #2d75dd;
  --shadow: 0 24px 80px rgba(22, 38, 28, 0.10);
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  letter-spacing: 0;
}

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

button,
input,
select {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
  padding: 0 48px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 24px;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
}

.nav a:hover {
  color: var(--green);
}

.github-link {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 520px);
  gap: 56px;
  align-items: center;
  max-width: 1220px;
  min-height: min(760px, calc(100vh - 72px));
  margin: 0 auto;
  padding: 52px 36px 28px;
}

.hero-copy {
  max-width: 640px;
}

.proof-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 16px;
  font-weight: 760;
  margin-bottom: 24px;
}

.proof-line svg,
.mini-icon {
  width: 20px;
  height: 20px;
}

h1 {
  margin: 0;
  font-size: clamp(52px, 6.5vw, 90px);
  line-height: 0.98;
  letter-spacing: 0;
  font-weight: 850;
}

.green-text {
  color: var(--green);
}

.hero-copy p {
  max-width: 520px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.75;
}

.actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 17px;
  font-weight: 780;
  box-shadow: none;
  cursor: pointer;
}

.button.primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  box-shadow: 0 16px 36px rgba(7, 136, 65, 0.24);
}

.button:hover {
  transform: translateY(-1px);
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-top: 42px;
}

.feature-item {
  display: grid;
  gap: 8px;
}

.feature-item strong {
  color: var(--green);
  font-size: 15px;
}

.feature-item span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.phone-wrap {
  display: grid;
  place-items: center;
}

.phone {
  width: min(100%, 360px);
  aspect-ratio: 0.52;
  padding: 14px;
  border-radius: 46px;
  background: #0f1412;
  box-shadow: var(--shadow);
  position: relative;
}

.phone::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 18px;
  width: 74px;
  height: 22px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #0f1412;
  z-index: 2;
}

.phone-screen {
  height: 100%;
  border-radius: 34px;
  background: #fbfcfa;
  padding: 34px 18px 18px;
  overflow: hidden;
}

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

.phone-head strong {
  font-size: 22px;
}

.phone-list {
  display: grid;
  gap: 14px;
}

.rule-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #fff;
}

.rule-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.rule-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.switch {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--green);
  position: relative;
}

.switch::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 3px;
  right: 3px;
  border-radius: 50%;
  background: #fff;
}

.rule-card small {
  display: block;
  margin: 10px 0;
  color: var(--muted);
  line-height: 1.45;
}

.meter {
  height: 6px;
  border-radius: 99px;
  background: #e9eee9;
  overflow: hidden;
}

.meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.pricing,
.section,
.footer {
  max-width: 1220px;
  margin: 0 auto;
  padding: 44px 36px;
}

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

.price-card {
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.price-card.recommended {
  border: 2px solid var(--green);
  box-shadow: 0 18px 50px rgba(7, 136, 65, 0.12);
}

.price-card.early {
  border-color: rgba(240, 100, 69, 0.34);
}

.price-card h2,
.price-card h3,
.section h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.price {
  margin: 16px 0 12px;
  font-size: 38px;
  font-weight: 850;
}

.price small {
  font-size: 15px;
  color: var(--muted);
  font-weight: 650;
}

.price-card ul,
.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.price-card li::before,
.check-list li::before {
  content: "✓";
  color: var(--green);
  font-weight: 850;
  margin-right: 8px;
}

.split-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
  align-items: start;
}

.section p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 17px;
}

.experiment-list {
  display: grid;
  gap: 10px;
}

.experiment-row {
  display: grid;
  grid-template-columns: 150px 70px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.experiment-row strong {
  font-size: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 760;
}

.tag.none {
  background: #eef1ef;
  color: var(--muted);
}

.tag.mid {
  background: #fff0e8;
  color: var(--coral);
}

.download-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 22px;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.download-panel.pulse {
  border-color: var(--green);
  box-shadow: 0 0 0 5px rgba(7, 136, 65, 0.12);
}

.download-panel code {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer a {
  color: var(--green);
  font-weight: 720;
}

.admin-body {
  background: #f4f6f5;
}

.admin-shell {
  display: grid;
  grid-template-columns: 238px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 22px;
}

.sidebar .brand {
  font-size: 21px;
  margin-bottom: 34px;
}

.side-nav {
  display: grid;
  gap: 6px;
}

.side-nav button,
.side-nav a {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: var(--radius);
  color: var(--muted);
  text-align: left;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 720;
  cursor: pointer;
}

.side-nav .active {
  color: var(--green);
  background: var(--green-soft);
}

.admin-main {
  padding: 28px;
  min-width: 0;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.admin-header h1 {
  font-size: 34px;
  line-height: 1.1;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  min-width: 0;
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  margin: 0;
  font-size: 18px;
}

.filter-tabs {
  display: flex;
  gap: 6px;
}

.filter-tabs button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 720;
  cursor: pointer;
}

.filter-tabs button.active {
  color: var(--green);
  border-color: var(--green);
  background: var(--green-soft);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

th {
  color: var(--muted);
  font-weight: 780;
  background: #fbfcfb;
}

td strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

td span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

td i {
  font-style: normal;
  color: var(--blue);
  font-weight: 750;
}

mark {
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 800;
}

mark.ai-无 {
  background: #eef1ef;
  color: var(--muted);
}

mark.ai-中 {
  background: #fff0e8;
  color: var(--coral);
}

.meta-card,
.warning-card,
.metric-card {
  margin: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.meta-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.meta-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 13px;
}

.schema-list {
  display: grid;
  gap: 8px;
}

.schema-list code {
  display: block;
  padding: 9px 10px;
  border-radius: 6px;
  background: #f6f9f7;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.event-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.event-tags span {
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 760;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 0 18px 18px;
}

.metric-card {
  margin: 0;
}

.metric-card strong {
  display: block;
  font-size: 24px;
  margin-top: 8px;
}

.metric-card span,
.meta-row span {
  color: var(--muted);
  font-size: 13px;
}

.ops-panel {
  margin-bottom: 18px;
}

.ops-auth {
  display: grid;
  gap: 8px;
  min-width: min(100%, 620px);
}

.ops-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 88px auto;
  gap: 8px;
  align-items: center;
}

.ops-login {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(130px, 1fr) auto auto minmax(130px, 1fr);
  gap: 8px;
  align-items: center;
}

.ops-controls input,
.ops-controls select,
.ops-controls button,
.ops-login input,
.ops-login button {
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-size: 13px;
}

.ops-controls button,
.ops-login button {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  font-weight: 780;
  cursor: pointer;
}

.ops-login button[data-ops-logout] {
  background: #fff;
  color: var(--ink);
}

.ops-status {
  margin: 14px 18px 0;
  color: var(--muted);
  font-size: 13px;
}

.ops-status[data-state="ok"] {
  color: var(--green-dark);
}

.ops-status[data-state="error"] {
  color: var(--coral);
}

.live-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 14px 18px 4px;
}

.live-summary div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfb;
}

.live-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.live-summary strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

.summary-table {
  min-width: 1040px;
}

.meta-row {
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.meta-row:last-child {
  border-bottom: 0;
}

.meta-row button {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  overflow-wrap: anywhere;
  word-break: break-word;
  cursor: copy;
}

.meta-row span {
  overflow-wrap: anywhere;
}

.meta-row button.copied {
  color: var(--green);
}

.meta-row button.copy-failed {
  color: var(--coral);
}

.warning-card {
  border-color: rgba(240, 100, 69, 0.28);
  background: #fff7f4;
  color: #95341f;
  line-height: 1.6;
}

.legal-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px 36px 56px;
}

.legal-hero {
  max-width: 760px;
  margin-bottom: 36px;
}

.legal-hero h1 {
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1.02;
}

.legal-hero p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

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

.legal-section {
  min-height: 260px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.legal-section h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.legal-section p {
  color: var(--muted);
  line-height: 1.75;
}

.link-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.link-list a,
.link-list span {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfb;
  color: var(--ink);
}

@media (max-width: 920px) {
  .topbar {
    padding: 0 20px;
  }

  .nav {
    display: none;
  }

  .hero,
  .split-section,
  .dashboard-grid,
  .admin-shell,
  .download-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 36px;
  }

  .feature-row,
  .pricing-grid,
  .metric-grid,
  .live-summary,
  .legal-grid {
    grid-template-columns: 1fr;
  }

  .ops-controls,
  .ops-login {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .footer {
    flex-direction: column;
  }

  .admin-main {
    padding: 20px;
  }

  .admin-header,
  .panel-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .admin-header h1 {
    font-size: 30px;
  }

  .admin-actions {
    align-self: flex-start;
  }

  .filter-tabs {
    flex-wrap: wrap;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .meta-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
