:root {
  --bg: #0f1115;
  --panel: #1a1d24;
  --line: #2a3140;
  --text: #e8eaed;
  --muted: #9aa3b2;
  --accent: #f37f13;
  --err: #e12127;
  --ok: #22c55e;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-top {
  position: sticky; top: 0; z-index: 100;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  padding: 12px 20px;
  background: rgba(15,17,21,.96);
  border-bottom: 1px solid var(--line);
}
.site-top strong { font-size: 14px; }
.site-top nav { display: flex; gap: 14px; margin-left: auto; font-size: 13px; font-weight: 600; }
.site-top nav a.active { color: var(--accent); }

.hero {
  max-width: 1100px; margin: 0 auto; padding: 32px 20px 16px;
}
.hero h1 { font-size: 24px; margin-bottom: 8px; }
.hero p { color: var(--muted); font-size: 14px; max-width: 720px; }

.notice {
  max-width: 1100px; margin: 0 auto 24px; padding: 0 20px;
}
.notice-inner {
  background: #1a2410; border: 1px solid #3a5020; border-radius: 10px;
  padding: 12px 16px; font-size: 13px; color: #b8d4a0;
}

.flow-main { max-width: 1100px; margin: 0 auto; padding: 0 20px 80px; }
.flow-main h2 {
  font-size: 18px; color: var(--accent); margin: 40px 0 16px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.flow-main h2:first-of-type { margin-top: 8px; }

.pipeline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 16px; background: var(--panel); border-radius: 12px;
  border: 1px solid var(--line); font-size: 12px; margin-bottom: 28px;
}
.pipeline .step {
  background: #252932; padding: 8px 12px; border-radius: 8px; white-space: nowrap;
}
.pipeline .arrow { color: var(--muted); }
.pipeline .ops { background: #2a2010; color: #fbbf24; border: 1px dashed #665520; }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
  gap: 24px;
}

.step-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.step-card-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: flex-start; gap: 12px;
}
.step-num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  background: var(--accent); color: #111;
  border-radius: 50%; font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.step-card-head h3 { font-size: 14px; margin-bottom: 4px; }
.step-card-head p { font-size: 12px; color: var(--muted); }
.step-card-head .badge {
  margin-left: auto; font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; white-space: nowrap;
}
.badge-brand { background: #1e3a5f; color: #93c5fd; }
.badge-ops { background: #3a2a10; color: #fbbf24; }
.badge-landing { background: #1a3a2a; color: #6ee7b7; }
.badge-site { background: #3a1a3a; color: #e879f9; }
.badge-fail { background: #3a1010; color: #f87171; }

.mock-wrap { padding: 16px; background: #080a0e; display: flex; justify-content: center; }

/* 悬停 / 点击展示业务逻辑 */
.mock-interactive {
  position: relative;
  cursor: help;
}
.mock-interactive::after {
  content: "悬停查看业务逻辑";
  position: absolute;
  top: 10px; right: 10px;
  font-size: 10px; font-weight: 700;
  color: var(--accent);
  background: rgba(0,0,0,.75);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(243,127,19,.35);
  pointer-events: none;
  opacity: .85;
  z-index: 2;
  transition: opacity .2s;
}
.mock-interactive.is-open::after,
.mock-interactive:hover::after { opacity: 0; }

.logic-panel {
  position: absolute;
  inset: 12px;
  z-index: 5;
  background: rgba(10,12,18,.96);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 14px 16px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
  box-shadow: 0 12px 40px rgba(0,0,0,.55);
  pointer-events: none;
}
.logic-panel h4 {
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.logic-panel dl { font-size: 11px; line-height: 1.55; }
.logic-panel dt {
  color: var(--muted);
  font-weight: 700;
  margin-top: 8px;
}
.logic-panel dt:first-child { margin-top: 0; }
.logic-panel dd {
  color: #c8cdd4;
  margin: 3px 0 0;
  padding-left: 0;
}
.logic-panel .req {
  margin-top: 10px;
  font-size: 10px;
  color: #888;
}
.logic-panel .req code {
  color: #fbbf24;
  background: rgba(243,127,19,.12);
  padding: 1px 5px;
  border-radius: 4px;
}

.mock-interactive:hover .logic-panel,
.mock-interactive.is-open .logic-panel,
.mock-interactive:focus-within .logic-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

@media (hover: none) {
  .mock-interactive::after { content: "点击查看业务逻辑"; }
  .mock-interactive:hover .logic-panel { opacity: 0; visibility: hidden; }
  .mock-interactive.is-open .logic-panel {
    opacity: 1; visibility: visible; transform: none; pointer-events: auto;
  }
}

.flow-hint {
  max-width: 1100px;
  margin: -8px auto 20px;
  padding: 0 20px;
  font-size: 12px;
  color: var(--muted);
}
.flow-hint strong { color: var(--accent); }

/* PC browser chrome */
.browser {
  width: 100%; max-width: 520px;
  border: 2px solid #3a4254; border-radius: 12px; overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
}
.browser-bar {
  background: #2a2f38; padding: 8px 10px;
  display: flex; align-items: center; gap: 8px;
}
.browser-dots { display: flex; gap: 5px; }
.browser-dots span { width: 9px; height: 9px; border-radius: 50%; }
.browser-dots span:nth-child(1) { background: #ff5f57; }
.browser-dots span:nth-child(2) { background: #febc2e; }
.browser-dots span:nth-child(3) { background: #28c840; }
.browser-url {
  flex: 1; background: #1a1d24; border-radius: 6px;
  padding: 6px 10px; font-size: 11px; color: #93c5fd;
  font-family: ui-monospace, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.browser-url .lock { color: var(--ok); margin-right: 4px; }
.browser-body {
  min-height: 220px; background: #fff; color: #111;
  position: relative; display: flex; flex-direction: column;
}
.browser-body.dark { background: #121212; color: #eee; min-height: 260px; }

/* H5 phone */
.phone {
  width: 280px; border: 2px solid #3a4254; border-radius: 24px;
  overflow: hidden; background: #121212;
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
}
.phone-status {
  height: 22px; background: #000; font-size: 9px;
  display: flex; align-items: center; justify-content: center; color: #666;
}
.phone-url {
  background: #1a1d24; padding: 6px 10px; font-size: 9px;
  color: #93c5fd; font-family: ui-monospace, monospace;
  text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.phone-body { min-height: 400px; position: relative; }

/* Shared mock content */
.mock-brand {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1a365d, #2d3748); color: #fff; padding: 24px;
}
.mock-brand .logo { font-size: 28px; font-weight: 900; letter-spacing: 2px; }
.mock-brand .sub { font-size: 11px; opacity: .7; margin-top: 8px; }

.mock-redirect {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #f8fafc; padding: 20px;
}
.mock-redirect .spin {
  width: 36px; height: 36px; border: 3px solid #e2e8f0;
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 1s linear infinite; margin-bottom: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.mock-redirect p { font-size: 12px; color: #64748b; }

.mock-loading-bar {
  height: 44px; background: #1a1a1a; border-bottom: 1px solid #333;
  display: flex; align-items: center; padding: 0 12px; gap: 8px; font-size: 11px; color: #aaa;
}
.mock-loading-bar .dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: .3; } 50% { opacity: 1; } }

.mock-empty { flex: 1; background: #fff; }
.mock-empty.dark { background: #0a0a0a; }

.mock-toast {
  position: absolute; top: 56px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.85); color: #fbbf24; font-size: 11px;
  padding: 8px 14px; border-radius: 8px; white-space: nowrap; z-index: 2;
}

.mock-fullscreen {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #121212; padding: 24px; text-align: center;
}
.mock-fullscreen .icon { font-size: 36px; margin-bottom: 12px; opacity: .6; }
.mock-fullscreen h4 { font-size: 14px; margin-bottom: 8px; }
.mock-fullscreen p { font-size: 11px; color: #888; margin-bottom: 16px; }
.mock-fullscreen .btn {
  background: var(--accent); color: #111; border: none;
  padding: 10px 24px; border-radius: 8px; font-size: 12px; font-weight: 700;
}

.mock-site {
  flex: 1; background: #0d1117;
}
.mock-site-header {
  height: 48px; background: linear-gradient(90deg, #1a1a2e, #16213e);
  display: flex; align-items: center; padding: 0 12px; gap: 8px;
}
.mock-site-header .brand { font-size: 14px; font-weight: 800; color: var(--accent); }
.mock-site-nav { display: flex; gap: 8px; margin-left: auto; font-size: 9px; color: #888; }
.mock-site-banner {
  height: 100px; margin: 8px; border-radius: 8px;
  background: linear-gradient(135deg, #f37f13, #e12127);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
}
.mock-site-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 8px;
}
.mock-site-cards div {
  height: 56px; background: #1a1d24; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; font-size: 9px; color: #666;
}

.annot {
  padding: 12px 16px; font-size: 12px; color: var(--muted);
  border-top: 1px solid var(--line); background: #151820;
}
.annot strong { color: var(--text); }

.out-scope {
  margin-top: 48px; padding: 20px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px;
}
.out-scope h3 { font-size: 14px; margin-bottom: 10px; color: var(--muted); }
.out-scope ul { font-size: 13px; color: var(--muted); padding-left: 20px; }
.out-scope li { margin: 6px 0; }

@media (max-width: 520px) {
  .steps-grid { grid-template-columns: 1fr; }
  .pipeline { flex-direction: column; align-items: stretch; }
  .pipeline .arrow { text-align: center; }
}
