/* 对齐 Cursor 会员自助开通页：浅底、支付宝蓝、白卡片 */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }

:root {
  --brand: #1677ff;
  --brand-active: #0958d9;
  --brand-bg: #e6f4ff;
  --brand-border: #91caff;
  --brand-grad: linear-gradient(135deg, #1677ff 0%, #0958d9 100%);
  --ink: #1f2329;
  --sub: #4e5969;
  --muted: #86909c;
  --line: #e5e6eb;
  --bg: #f4f6fa;
  --card: #ffffff;
  --soft: #f7f8fa;
  --ok: #00b42a;
  --ok-bg: #e8ffea;
  --ok-border: #aff0b5;
  --err: #f53f3f;
  --err-bg: #ffece8;
  --err-border: #fdbbb0;
  --radius: 16px;
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 380px;
  background: radial-gradient(800px 240px at 50% -20px, rgba(22, 119, 255, 0.12), transparent 75%);
  pointer-events: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: 720px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
}
.brand { display: flex; align-items: center; gap: 8px; }
.logo {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--brand-grad); color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px;
  box-shadow: 0 2px 8px rgba(22, 119, 255, 0.35);
}
.brand-t { font-size: 15px; font-weight: 700; }

.wrap {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.hero { text-align: center; margin-bottom: 18px; }
.mark {
  width: 52px; height: 52px; margin: 0 auto 12px;
  border-radius: 16px; background: var(--brand-bg); color: var(--brand);
  display: grid; place-items: center;
}
.hero h1 { font-size: 20px; font-weight: 700; letter-spacing: -0.2px; }
.hero p { margin-top: 6px; font-size: 13px; color: var(--sub); line-height: 1.7; }
.hero code, .help code, .help kbd {
  font-family: var(--mono); font-size: 12px;
  background: var(--soft); border: 1px solid var(--line);
  border-radius: 4px; padding: 0 5px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.lab { font-size: 13px; font-weight: 600; color: var(--sub); }
.lab em { font-style: normal; font-weight: 400; color: var(--muted); margin-left: 6px; }
textarea {
  width: 100%; min-height: 120px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--soft); color: var(--ink);
  font-family: var(--mono); font-size: 13px; line-height: 1.55;
  resize: vertical; outline: none;
}
textarea:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12); }
textarea::placeholder { color: #c0c4cc; }

.btn-row { display: flex; gap: 10px; margin-top: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; font-size: 15px; font-weight: 600;
  cursor: pointer; border: none; font-family: inherit;
}
.btn.primary {
  flex: 1; height: 44px; color: #fff;
  background: var(--brand-grad);
  box-shadow: 0 6px 16px rgba(22, 119, 255, 0.28);
}
.btn.primary:hover:not(:disabled) { filter: brightness(1.05); }
.btn.primary:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.ghost {
  height: 44px; padding: 0 16px;
  background: #fff; color: var(--sub);
  border: 1px solid var(--line);
}
.btn.ghost:hover { color: var(--brand); border-color: var(--brand-border); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }

.flash { margin-top: 12px; padding: 10px 12px; border-radius: 8px; font-size: 13px; line-height: 1.6; }
.flash.ok { background: var(--ok-bg); color: #008026; border: 1px solid var(--ok-border); }
.flash.err { background: var(--err-bg); color: #cb2634; border: 1px solid var(--err-border); }

.result-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 12px;
}
.result-title { font-size: 14px; font-weight: 700; }

.results { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ri {
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--soft); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.ri.ok { background: #fff; border-color: var(--ok-border); }
.ri.fail { background: var(--err-bg); border-color: var(--err-border); }
.ri.wait { background: var(--brand-bg); border-color: var(--brand-border); }

.ri-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ri-email { font-size: 14px; font-weight: 650; word-break: break-all; }
.badge { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: #008026; }
.badge.fail { background: #fff; color: var(--err); }
.badge.wait { background: #fff; color: var(--brand); }

.ri-token pre {
  margin: 0; font-family: var(--mono); font-size: 12px; color: var(--sub);
  line-height: 1.55; white-space: pre-wrap; word-break: break-all;
  max-height: 42px; overflow: hidden;
}
.ri-token.open pre { max-height: none; }
.expand {
  margin-top: 4px; border: none; background: none;
  color: var(--brand); font-size: 12px; font-weight: 600; cursor: pointer; padding: 0;
}
.ri-btns { display: flex; }
.ri-reason { font-size: 13px; color: #cb2634; line-height: 1.6; }

.help summary {
  cursor: pointer; font-size: 14px; font-weight: 700; list-style: none;
}
.help summary::-webkit-details-marker { display: none; }
.help summary::before { content: "▸ "; color: var(--brand); }
.help[open] summary::before { content: "▾ "; }
.help ol { margin: 12px 0 0 18px; color: var(--sub); font-size: 13px; line-height: 1.8; }
.tip { margin-top: 10px; font-size: 12px; color: var(--muted); line-height: 1.7; }
