/* Minimal, fast, and accessible styling */
:root {
  color-scheme: dark;
  --bg: #0b1220;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-2: rgba(255, 255, 255, 0.04);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.68);
  --border: rgba(255, 255, 255, 0.12);
  --brand: #22c55e;
  --brand2: #3b82f6;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 700px at 20% -10%, rgba(59, 130, 246, 0.25), transparent 55%),
    radial-gradient(900px 600px at 90% 10%, rgba(34, 197, 94, 0.18), transparent 50%),
    linear-gradient(180deg, #080d18 0%, #0b1220 55%, #070b14 100%);
  line-height: 1.55;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

.container {
  max-width: var(--container);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  padding: 10px 12px;
  background: #111827;
  border: 1px solid var(--border);
  border-radius: 10px;
  z-index: 1000;
}

.skip-link:focus {
  left: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(11, 18, 32, 0.72);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top, 0);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  position: relative;
}

/* 移动端菜单：按钮 + site.js（避免微信等 WebView 下 checkbox 失效） */
.nav-burger {
  display: none;
  box-sizing: border-box;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 11px 10px;
  margin: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font: inherit;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.08);
}

.nav-burger span {
  display: block;
  height: 2px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-burger:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.55);
  outline-offset: 2px;
}

.site-header.nav-is-open .nav-burger span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-header.nav-is-open .nav-burger span:nth-child(2) {
  opacity: 0;
}

.site-header.nav-is-open .nav-burger span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

body.nav-menu-lock {
  overflow: hidden;
}

@media (min-width: 1025px) {
  .header-inner {
    display: flex;
  }

  .site-header .header-inner > .nav-burger {
    display: none !important;
  }

  .nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: auto;
    margin: 0;
    padding: 0;
    border-top: none;
    grid-column: unset;
    grid-row: unset;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

@media (min-width: 1025px) {
  .brand {
    min-width: 200px;
    flex: 0 1 auto;
  }
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-weight: 800;
  letter-spacing: 0.8px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(59, 130, 246, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.9);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(13px, 3.2vw, 16px);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.nav a {
  padding: 8px 10px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  border: 1px solid transparent;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.08);
}

.nav a:hover,
.nav a:focus-visible {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

.site-main {
  padding-bottom: 56px;
}

.content-page {
  padding-top: 36px;
}

.breadcrumb {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 16px;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.86);
}

.content-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-2);
  padding: 16px;
  margin-bottom: 12px;
}

.content-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.content-card h3 {
  margin: 12px 0 8px;
}

.muted {
  color: var(--muted);
}

.hero {
  padding: 64px 0 32px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 26px;
  align-items: start;
}

h1,
h2,
h3 {
  line-height: 1.15;
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(22px, 5.5vw, 44px);
  letter-spacing: -0.4px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.lead {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 18px);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  font-weight: 700;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.08);
}

.btn.primary {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(59, 130, 246, 0.95));
  border-color: rgba(255, 255, 255, 0.18);
  color: #0b1220;
}

.btn.primary:hover {
  filter: brightness(1.05);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

.trust-list {
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  list-style: none;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.trust-list li {
  padding-left: 18px;
  position: relative;
}

.trust-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.03);
}

.hero-card .card {
  padding: 18px 18px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  box-shadow: var(--shadow);
}

.card-title {
  margin: 2px 0 10px;
  font-size: 18px;
}

.steps {
  margin: 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.8);
}

.note {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.section {
  padding: 44px 0;
}

.section-alt {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.section-subtitle {
  margin: 10px 0 18px;
  color: var(--muted);
  max-width: 78ch;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tile {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-2);
  padding: 16px 16px 14px;
}

.tile h3 {
  margin: 2px 0 8px;
  font-size: 16px;
}

.tile p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.74);
}

.bullets {
  margin: 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.78);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-2);
  padding: 16px;
}

.result-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
  padding: 16px;
  max-width: 720px;
}

.result-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  align-items: start;
}

.result-row:first-child {
  border-top: 0;
}

.label {
  color: rgba(255, 255, 255, 0.7);
}

.value {
  color: rgba(255, 255, 255, 0.92);
}

.balls {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  font-weight: 800;
  color: rgba(11, 18, 32, 0.95);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(59, 130, 246, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.faq details {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-2);
  padding: 12px 14px;
  margin-bottom: 10px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  display: flex;
  align-items: center;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.08);
}

.faq p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
  padding: 26px 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 14px;
  align-items: start;
}

.footer-title {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.footer-desc {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.68);
}

.disclaimer {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
}

.meta {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.meta a {
  color: rgba(255, 255, 255, 0.82);
}

/* 文章正文（OpenClaw HTML） */
.article-content {
  margin-top: 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.article-content img,
.article-content video,
.article-content iframe {
  max-width: 100%;
  height: auto;
}

.article-content pre,
.article-content code {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.article-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 920px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 36px 0 24px;
  }

  .section {
    padding: 28px 0;
  }

  .content-page {
    padding-top: 20px;
  }

  .result-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .result-row .label {
    font-size: 13px;
    font-weight: 600;
  }

  .result-box {
    max-width: none;
  }

  .site-footer {
    padding: 20px 0 max(20px, env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 480px) {
  .trust-list {
    grid-template-columns: 1fr;
  }

  .ball {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .content-card {
    padding: 14px;
  }

  .content-card h2 {
    font-size: 18px;
  }

  .breadcrumb {
    font-size: 12px;
    line-height: 1.45;
  }
}

/* 顶栏 ≤1024px：汉堡 + JS 折叠（不依赖 checkbox，兼容微信内置浏览器） */
@media screen and (max-width: 1024px) {
  .site-header .header-inner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    column-gap: 10px !important;
    row-gap: 0 !important;
    padding: 10px 0 12px !important;
  }

  .site-header .header-inner > .brand {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .site-header .header-inner > .nav-burger {
    display: flex !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    z-index: 2;
    touch-action: manipulation;
  }

  .site-header:not(.nav-is-open) .header-inner > #main-nav.nav {
    display: none !important;
  }

  .site-header.nav-is-open .header-inner > #main-nav.nav {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 4px !important;
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    margin: 10px 0 0 !important;
    padding: 10px 0 6px !important;
    border-top: 1px solid var(--border) !important;
  }

  .site-header .header-inner > #main-nav.nav a {
    width: 100% !important;
    justify-content: flex-start !important;
    padding: 12px 14px !important;
    font-size: 15px !important;
    border-radius: 10px !important;
  }
}

@media screen and (min-width: 1025px) {
  .site-header .header-inner > #main-nav.nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border-top: none !important;
    grid-column: unset !important;
    grid-row: unset !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

