:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-alt: #f0f4fa;
  --border: #dfe5f0;
  --text: #0f172a;
  --muted: #526075;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #059669;
  --success-bg: #ecfdf5;
  --error: #dc2626;
  --error-bg: #fef2f2;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

code {
  background: #edf2f9;
  color: #1e3a8a;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.88em;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.hidden {
  display: none !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
}

.brand strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

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

.nav-links {
  display: flex;
  gap: 20px;
  font-size: 14px;
  font-weight: 500;
}

.nav-links a {
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pill-muted {
  background: #e9eef7;
  color: var(--muted);
}

.pill-success {
  background: var(--success-bg);
  color: var(--success);
}

.pill-error {
  background: var(--error-bg);
  color: var(--error);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
  text-decoration: none !important;
}

.btn:active {
  transform: translateY(1px);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 13px;
  border-radius: 8px;
}

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

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

.btn-secondary {
  background: #e8eefb;
  color: #1e40af;
}

.btn-secondary:hover {
  background: #dbe6fb;
}

.btn-ghost {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--surface-alt);
}

.btn-danger-outline {
  background: #fff;
  color: var(--error);
  border-color: #fecaca;
}

.btn-danger-outline:hover {
  background: var(--error-bg);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.hero {
  padding: 48px 0 40px;
  background: radial-gradient(circle at 80% 10%, rgba(37, 99, 235, 0.10), transparent 52%),
              linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 32px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: #e8f0fe;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.lead {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}

.arch-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.arch-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 14px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.dot-green {
  background: var(--success);
}

.arch-hub {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #fff;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  margin-bottom: 14px;
}

.hub-title {
  font-size: 12px;
  color: #93c5fd;
  font-weight: 600;
}

.hub-domain {
  font-size: 18px;
  font-weight: 700;
  margin: 4px 0;
}

.hub-sub {
  font-size: 12px;
  color: #cbd5e1;
}

.arch-spokes {
  display: grid;
  gap: 10px;
}

.spoke {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}

.spoke strong {
  display: block;
  font-size: 14px;
}

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

.spoke-badge {
  min-width: 68px;
  text-align: center;
  padding: 4px 8px;
  border-radius: 8px;
  background: #e8eefb;
  color: #1e40af;
  font-size: 12px;
  font-weight: 700;
}

.section {
  padding: 44px 0;
}

.section-alt {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.demo-split {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 24px;
  align-items: start;
}

.demo-card h3 {
  margin: 0 0 8px;
}

.muted {
  color: var(--muted);
}

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

.flow-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
}

.flow-step span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.tip-box {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 14px;
}

.tip-box h4 {
  margin: 0 0 8px;
}

.tip-box ol {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.tip-box li + li {
  margin-top: 6px;
}

.alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 500;
}

.alert-error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid #fecaca;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid #a7f3d0;
}

.profile-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.profile-id {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-name-row h3 {
  margin: 0;
}

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

.tag {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #edf2f9;
  color: #334155;
}

.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.tab {
  background: none;
  border: none;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.code-panel {
  position: relative;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  overflow-x: auto;
}

.code-panel pre {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  max-height: 360px;
  overflow: auto;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

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

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.card-head h3 {
  margin: 6px 0 0;
}

.platform-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.tag-android {
  background: #dcfce7;
  color: #166534;
}

.tag-ios {
  background: #e0e7ff;
  color: #3730a3;
}

.android-download-row {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  flex-shrink: 0;
}

.qr-canvas svg,
.qr-canvas img {
  display: block;
  width: 136px;
  height: 136px;
}

.artifact-name {
  font-weight: 700;
  font-size: 14px;
}

.artifact-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  word-break: break-all;
}

.mini-steps {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}

.mini-steps li + li {
  margin-top: 4px;
}

.notice-box {
  margin-top: 14px;
  padding: 10px 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  font-size: 13px;
  color: #1e3a8a;
}

.ios-artifacts {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.artifact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}

.checksum-bar {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tr:last-child td {
  border-bottom: none;
}

.mt-16 {
  margin-top: 16px;
}

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

.footer {
  padding: 24px 0 36px;
  border-top: 1px solid var(--border);
  background: #fff;
  font-size: 13px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 900px) {
  .hero-grid,
  .demo-split,
  .platform-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}

@media (max-width: 540px) {
  .android-download-row,
  .artifact-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .flow-steps {
    grid-template-columns: 1fr;
  }
}
