@import url("tokens.css");

* { box-sizing: border-box; }
/* 属性驱动的显隐必须优先于任何 display 规则：
   否则 .modal{display:flex}/.dash{display:grid} 会把带 hidden 的元素显示出来（遮罩常驻、点击被吞） */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* 允许长词/URL 断行，避免窄屏被不可断字符串撑宽 */
  overflow-wrap: anywhere;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }

/* 无障碍：视觉隐藏 / 跳转到主内容 */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 400; background: #fff; color: var(--blue); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; font-weight: 700; font-size: var(--fs-sm); transition: top .15s ease; }
.skip-link:focus { top: 12px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: max(var(--s5), env(safe-area-inset-left)); padding-right: max(var(--s5), env(safe-area-inset-right)); }
/* 锚点跳转时预留吸顶导航高度，避免标题被遮挡 */
[id] { scroll-margin-top: 84px; }
.section { padding: var(--s9) 0; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  border: none; border-radius: var(--radius-pill);
  padding: 12px 22px; min-height: 44px; font-weight: 600; font-size: var(--fs-sm);
  cursor: pointer; font-family: inherit; transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, #3B78FF, #2F6BFF); color: #fff; box-shadow: 0 6px 18px rgba(47,107,255,.28); }
.btn.primary:hover { box-shadow: 0 10px 24px rgba(47,107,255,.36); transform: translateY(-1px); }
.btn.teal { background: var(--teal); color: #fff; box-shadow: var(--shadow-sm); }
.btn.ghost { background: #fff; color: var(--blue); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--blue); }
.btn.google { background: #fff; color: #1B1F24; border: 1px solid var(--line); }
.btn.google:hover { background: #F7F9FC; }
.btn.block { width: 100%; white-space: normal; }
.btn.lg { padding: 15px 28px; font-size: 16px; }
.btn.sm { padding: 8px 16px; min-height: 36px; }
.btn:disabled { opacity: .6; cursor: default; }
.g-ico { width: 18px; height: 18px; flex: none; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(247,249,252,.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: var(--s4); }
.brand { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; font-size: 19px; letter-spacing: -.3px; color: var(--ink); }
.brand span { color: var(--blue); }
.nav-actions { display: flex; align-items: center; gap: var(--s3); }
.nav-links { display: flex; align-items: center; gap: var(--s4); }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; padding: 10px 2px; transition: color .12s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--blue); }
.nav-toggle {
  display: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  width: 44px; height: 44px; font-size: 18px; cursor: pointer; color: var(--ink);
  align-items: center; justify-content: center;
}

/* ---------- Hero ---------- */
.hero { padding: var(--s9) 0 var(--s8); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--s7); align-items: center; }
.hero h1 { font-size: var(--fs-h1); line-height: 1.08; margin-bottom: var(--s4); }
.hero .accent { background: linear-gradient(90deg, #2F6BFF, #00C2A8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { color: var(--muted); font-size: 18px; max-width: 540px; margin-bottom: var(--s5); }
.hero .cta { display: flex; gap: var(--s3); flex-wrap: wrap; }
.privacy { display: flex; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s5); }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 6px 12px; font-size: var(--fs-sm); color: var(--muted); font-weight: 600;
}
.tag .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }

/* Hero 视觉：浏览器窗口 → PDF */
.preview {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: 18px; box-shadow: 0 24px 60px rgba(27,31,36,.16); overflow: hidden;
}
.preview .bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #FBFCFE; }
.preview .dots { display: flex; gap: 6px; }
.preview .dots i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.preview .dots i:nth-child(1){ background:#FF5F57; } .preview .dots i:nth-child(2){ background:#FEBC2E; } .preview .dots i:nth-child(3){ background:#28C840; }
.preview .url { flex: 1; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 12px; color: var(--muted); }
.preview .body { padding: 22px; }
.preview .skeleton { height: 12px; border-radius: 6px; background: linear-gradient(90deg,#EEF2F8,#F6F9FC,#EEF2F8); background-size: 200% 100%; animation: sk 1.4s infinite; margin-bottom: 10px; }
.preview .skeleton.w70{ width:70%; } .preview .skeleton.w90{ width:90%; } .preview .skeleton.w40{ width:40%; }
@keyframes sk { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.preview .pdf { position: absolute; right: -18px; bottom: -18px; width: 172px; height: 214px; background: linear-gradient(180deg,#FFFEFB,#F6F2E9); border: 1px solid #ECE5D6; border-radius: 12px; box-shadow: 0 20px 44px rgba(27,31,36,.20); transform: rotate(5deg); padding: 16px 14px; }
.preview .pdf::after { content:""; position:absolute; inset:0; border-radius:12px; pointer-events:none; background-image: radial-gradient(rgba(60,50,30,.05) 1px, transparent 1px); background-size: 5px 5px; opacity:.7; }
.preview .pdf .label { position: absolute; top: 12px; left: 14px; font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--muted); }
.preview .pdf .top { height: 22px; border-bottom: 2px solid var(--blue); width: 64%; margin: 20px 0 12px; }
.preview .pdf .ln { height: 8px; border-radius: 4px; background: #E7E1D4; margin-bottom: 8px; }
.preview .pdf .seal { position:absolute; top: -14px; right: 10px; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(180deg,#3B78FF,#2F6BFF); color:#fff; display:flex; align-items:center; justify-content:center; font-size:16px; box-shadow: 0 6px 16px rgba(47,107,255,.4); }

/* ---------- Demo ---------- */
.demo .card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: var(--s6); max-width: 760px; margin: 0 auto;
}
.modes { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-pill); margin-bottom: var(--s3); }
.mode {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  border: none; background: transparent; color: var(--muted); font-weight: 600; font-family: inherit;
  padding: 8px 16px; border-radius: var(--radius-pill); cursor: pointer; font-size: var(--fs-sm); transition: all .12s ease;
}
.mode.active { background: var(--blue); color: #fff; box-shadow: var(--shadow-sm); }
.mode-hint { font-size: var(--fs-sm); color: var(--muted); margin: 0 0 var(--s4); }
.tabs { display: flex; gap: var(--s2); margin-bottom: var(--s4); }
.tabs button {
  flex: 1; min-height: 44px; border: none; background: var(--bg); color: var(--muted);
  padding: 10px; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; font-family: inherit; transition: background .12s ease, color .12s ease;
}
.tabs button.active { background: var(--blue); color: #fff; }
.panel { display: none; }
.panel.active { display: block; }
.upgrade-banner {
  margin-top: var(--s3); padding: 12px 14px; border-radius: var(--radius-sm);
  background: #FFF7ED; border: 1px solid #FED7AA; color: #9A3412; font-size: var(--fs-sm); font-weight: 600;
}
.upgrade-banner a { color: var(--blue); text-decoration: underline; }
.demo textarea, .demo input[type=url], .demo input[type=text], .field {
  width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; font-family: inherit; font-size: var(--fs-sm); margin-bottom: var(--s3); resize: vertical; background: #fff; color: var(--ink);
}
.demo textarea:focus, .demo input:focus, .field:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,107,255,.15); }
.demo .options { display: flex; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s4); color: var(--muted); font-size: var(--fs-sm); }
.demo .options label { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; margin: 0; flex: none; }
.note { font-size: var(--fs-sm); color: var(--teal); font-weight: 600; margin-top: var(--s2); }

/* ---------- Page shells (login / pricing / account / success / cancel) ---------- */
.page { min-height: 72vh; min-height: 72svh; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: var(--s5);
  padding: var(--s8) max(var(--s5), env(safe-area-inset-right)) var(--s8) max(var(--s5), env(safe-area-inset-left)); }
.box { background: linear-gradient(180deg,#FFFFFF,#FCFBF7); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--s7); width: 100%; max-width: 460px; margin: 0 auto; text-align: center; }
.box.wide { max-width: 1040px; }
.box h1 { font-size: var(--fs-h2); margin-bottom: var(--s3); }
.box > p { color: var(--muted); }

/* Auth form */
.auth-form { text-align: left; margin-top: var(--s4); }
.auth-form .field { margin-bottom: var(--s3); }
.auth-sep { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: var(--s4) 0; }
.auth-sep::before, .auth-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-tabs { display: flex; gap: 8px; margin-bottom: var(--s4); }
.auth-tabs button { flex: 1; padding: 10px; border: 1px solid var(--line); background: #fff; border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; font-weight: 600; font-family: inherit; color: var(--muted); }
.auth-tabs button.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.auth-msg { margin-top: 12px; font-size: 14px; min-height: 20px; text-align: left; }
.auth-msg.err { color: var(--danger); }
.auth-msg.ok { color: var(--ok); }

/* ---------- 统一认证入口（单表单自动识别） ---------- */
.auth-box { max-width: 440px; text-align: left; }
.auth-box h1 { text-align: center; }
.auth-sub { text-align: center; color: var(--muted); margin: 0 0 var(--s5); font-size: var(--fs-sm); }
.field-group { margin-bottom: var(--s4); }
.field-group > label { display: block; font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.field-group .field { margin-bottom: 0; }
.field-with-action { position: relative; }
.field-with-action .field { padding-right: 56px; }
.pw-toggle {
  position: absolute; top: 50%; right: 2px; transform: translateY(-50%);
  width: 44px; height: 44px; border: none; background: transparent; border-radius: 10px;
  cursor: pointer; font-size: 16px; line-height: 1; color: var(--muted);
}
.pw-toggle:hover { background: var(--bg); color: var(--ink); }
.pw-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.field-hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
/* 预留错误行高度：提示出现/消失不引起布局跳动（避免下方控件位移） */
.field-err { font-size: 12px; color: var(--danger); margin: 6px 0 0; min-height: 16px; line-height: 16px; }
.field-group.has-error .field { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220,38,38,.12); }
.pw-strength { height: 4px; background: var(--line); border-radius: 999px; margin-top: 8px; overflow: hidden; }
.pw-strength i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--danger); transition: width .18s ease, background .18s ease; }
.pw-strength.mid i { background: #D97706; }
.pw-strength.strong i { background: var(--ok); }
.auth-alert { font-size: 13px; border-radius: var(--radius-sm); padding: 10px 12px; margin: var(--s3) 0 0; text-align: left; }
.auth-alert.err { color: var(--danger); background: rgba(220,38,38,.08); border: 1px solid rgba(220,38,38,.25); }
.auth-alert.ok { color: var(--ok); background: rgba(22,163,74,.10); border: 1px solid rgba(22,163,74,.28); }
.auth-fine { font-size: 12px; color: var(--muted); margin: var(--s4) 0 0; text-align: center; }
.auth-fine a, .auth-foot a { color: var(--blue); }
.auth-foot { margin-top: var(--s3); font-size: 13px; text-align: center; }

/* 提交加载态：保留按钮尺寸，用 spinner 替换文字 */
.btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%;
  animation: gcd-spin .7s linear infinite;
}
@keyframes gcd-spin { to { transform: rotate(360deg); } }
.btn:disabled { opacity: .65; cursor: not-allowed; }
.btn.google.disabled { pointer-events: none; opacity: .6; }

@media (prefers-reduced-motion: reduce) {
  .btn.loading::after { animation-duration: 1.8s; }
  .pw-strength i { transition: none; }
}

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); margin: var(--s6) 0; align-items: stretch; }
.plan { position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); text-align: left; background: linear-gradient(180deg,#FFFFFF,#FCFBF7); display: flex; flex-direction: column; cursor: pointer; transition: box-shadow .14s ease, border-color .14s ease, transform .14s ease; }
.plan:hover { border-color: rgba(47,107,255,.35); }
.plan.pro { background: linear-gradient(180deg,#FFFFFF,#F2F7FF); transform: translateY(-8px); }
/* 卡片选中态：蓝色描边光环 + 顶部「已选」徽标（仅实际选中的卡片） */
.plan.selected { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,107,255,.32), var(--shadow); }
.plan.pro.selected { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,107,255,.32), 0 18px 44px rgba(47,107,255,.20); }
.plan .sel { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; padding: 5px 14px; border-radius: 999px; box-shadow: var(--shadow-sm); white-space: nowrap; }
.plan.current { border-color: var(--ok); box-shadow: 0 0 0 3px rgba(22,163,74,.18), var(--shadow); }
.plan .cur { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--ok); color: #fff; font-size: 12px; font-weight: 700; padding: 5px 14px; border-radius: 999px; box-shadow: var(--shadow-sm); white-space: nowrap; }
.plan-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s2); }
.plan h3 { font-size: 20px; }
.ribbon { background: linear-gradient(180deg,#3B78FF,#2F6BFF); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.plan .price { font-size: 34px; font-weight: 800; letter-spacing: -1px; }
.plan .price small { font-size: 14px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.plan-sub { color: var(--muted); font-size: var(--fs-sm); margin: 0 0 var(--s3); min-height: 18px; }
.plan ul { list-style: none; padding: 0; margin: var(--s3) 0 var(--s4); color: var(--muted); font-size: var(--fs-sm); flex: 1; }
.plan li { padding: 6px 0; display: flex; gap: 8px; }
.plan li::before { content: "✓"; color: var(--ok); font-weight: 800; }
.cmp-title { font-size: var(--fs-h2); margin: var(--s7) 0 var(--s4); text-align: center; max-width: 1040px; margin-left: auto; margin-right: auto; }
.cmp { overflow-x: auto; max-width: 1040px; margin-left: auto; margin-right: auto; }
.cmp table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.cmp th, .cmp td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.cmp th { background: var(--bg); color: var(--blue); font-weight: 700; }
.cmp tbody td:first-child { color: var(--ink); font-weight: 600; }
.cmp tbody td:nth-child(2), .cmp tbody td:nth-child(3) { color: var(--muted); }
.fine { font-size: 13px; color: var(--muted); margin-top: var(--s5); max-width: 1040px; margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Account status ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.badge.pro { background: rgba(47,107,255,.12); color: var(--blue); }
.badge.free { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.acct-status { margin-top: var(--s4); padding: var(--s4); border: 1px solid var(--line); border-radius: var(--radius-sm); background: #FCFBF7; text-align: left; font-size: 14px; color: var(--muted); }
.acct-status .row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.acct-status .row span:first-child { color: var(--muted); }
.acct-status .row span:last-child { color: var(--ink); font-weight: 600; }
.acct-meta { margin-top: var(--s4); font-size: 13px; color: var(--muted); }

/* ---------- Success / Cancel ---------- */
.icon-circle { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto var(--s4); font-size: 34px; }
.icon-circle.ok { background: rgba(22,163,74,.12); color: var(--ok); }
.icon-circle.warn { background: rgba(234,179,8,.14); color: #B45309; }
.box .stack { display: flex; flex-direction: column; gap: var(--s3); margin-top: var(--s5); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: var(--s7) 0 0; margin-top: var(--s8); }
.footer .wrap { display: flex; justify-content: space-between; gap: var(--s5); flex-wrap: wrap; align-items: flex-start; }
.footer .wrap > div { min-width: 150px; }
.footer h4 { margin: 0 0 var(--s3); font-size: var(--fs-sm); }
.footer a, .footer span { color: var(--muted); font-size: var(--fs-sm); display: block; margin-bottom: 6px; }
.footer a:hover { color: var(--blue); }
.foot-cta { text-align: center; padding: var(--s6) 0; border-top: 1px solid var(--line); margin-top: var(--s6); }
.foot-cta h2 { font-size: var(--fs-h2); margin: 0 0 var(--s4); }
.foot-bottom { border-top: 1px solid var(--line); padding: var(--s4) 0; color: var(--muted); font-size: 13px; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s6); }
  .preview { order: -1; }
  .plans { grid-template-columns: 1fr; }
  .plan.pro { transform: none; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .tool-grid, .steps, .teaser-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) { .nav-links { gap: var(--s3); } }
@media (max-width: 768px) {
  :root { --fs-h1: 32px; --fs-h2: 24px; --s9: 40px; }
  .hero { padding: var(--s7) 0 var(--s6); }
  .nav-toggle { display: inline-flex; }
  .nav .wrap { flex-wrap: wrap; height: auto; padding-top: var(--s2); padding-bottom: var(--s2); row-gap: var(--s2); }
  .nav-links { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; }
  /* 展开后限制高度并允许内部滚动，避免横屏/小屏时菜单占满整屏 */
  .nav.nav-open .nav-links { display: flex; max-height: calc(100dvh - 66px); overflow: auto; overscroll-behavior: contain; }
  .nav-links a { padding: 14px 0; border-top: 1px solid var(--line); }
  .nav-actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; }

  /* iOS 聚焦会自动放大字号 <16px 的控件，故移动端统一 16px（需覆盖组件级 font-size） */
  input, select, textarea, .field { font-size: 16px !important; }

  /* 触摸目标 ≥44px：页脚类文本链接在移动端补足高度 */
  .footer a, .auth-foot a, .auth-fine a, .fine a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  .footer a { margin-bottom: 0; }
}
/* 横屏手机（高度受限）：收紧导航条目与弹窗，避免内容被裁切 */
@media (max-height: 480px) {
  .nav-links a { padding: 10px 0; }
  .modal { align-items: flex-start; padding-top: 12px; }
  .modal-card { max-height: calc(100dvh - 24px); }
}

/* ========== 首页重构：区块头 / 功能入口 / 步骤 / 定价速览 / FAQ ========== */
.sec-head { max-width: 720px; margin: 0 auto var(--s6); text-align: center; }
.sec-head h2 { font-size: var(--fs-h2); margin: 0 0 var(--s2); }
.sec-sub { color: var(--muted); font-size: var(--fs-sm); margin: 0; }

.hero-eyebrow { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); background: rgba(47,107,255,.10); border-radius: 999px; padding: 5px 12px; margin: 0 0 var(--s4); }
.hero-alt { display: inline-flex; align-items: center; min-height: 44px; margin-top: var(--s3); font-size: var(--fs-sm); font-weight: 600; color: var(--blue); }

/* 功能入口：4 张卡直达对应演示标签 */
.tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
.tool-card { display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); box-shadow: var(--shadow-sm); transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease; }
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(47,107,255,.35); }
.tool-ico { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: rgba(47,107,255,.10); color: var(--blue); }
.tool-ico svg { width: 22px; height: 22px; }
.tool-card b { font-size: 16px; }
.tool-desc { color: var(--muted); font-size: var(--fs-sm); flex: 1; }
.tool-go { font-size: 13px; font-weight: 700; color: var(--blue); }

/* 3 步上手 */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); margin: 0; padding: 0; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-sm); }
.step-n { width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
.steps li b { font-size: 15px; }
.steps li span:last-child { color: var(--muted); font-size: var(--fs-sm); }

/* 免费 / Pro 速览 */
.teaser-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); max-width: 760px; margin: 0 auto; }
.teaser-card { background: linear-gradient(180deg,#FFFFFF,#FCFBF7); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); box-shadow: var(--shadow-sm); }
.teaser-card.pro { border-color: var(--blue); background: linear-gradient(180deg,#FFFFFF,#F2F7FF); box-shadow: 0 14px 34px rgba(47,107,255,.16); }
.teaser-card h3 { font-size: 18px; margin-bottom: var(--s2); }
.teaser-price { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 var(--s3); }
.teaser-price small { font-size: 13px; color: var(--muted); font-weight: 600; }
.teaser-card ul { list-style: none; padding: 0; margin: 0 0 var(--s4); color: var(--muted); font-size: var(--fs-sm); }
.teaser-card li { padding: 5px 0 5px 24px; position: relative; }
.teaser-card li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.teaser-more { text-align: center; margin: var(--s5) 0 0; font-size: var(--fs-sm); }
.teaser-more a { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue); font-weight: 600; }

/* FAQ（原生 details，零 JS） */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-list details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 var(--s5); margin-bottom: var(--s3); }
.faq-list summary { cursor: pointer; list-style: none; padding: var(--s4) 0; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--blue); font-size: 20px; font-weight: 700; flex: none; }
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { margin: 0 0 var(--s4); color: var(--muted); font-size: var(--fs-sm); }

/* 页脚重排 */
.foot-brand { max-width: 260px; }
.foot-brand span { color: var(--muted); font-size: var(--fs-sm); }
.kbd-hint { margin: var(--s4) 0 0; font-size: 13px; color: var(--muted); }
kbd { font-family: inherit; font-size: 12px; background: #fff; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 2px 6px; }

/* 导航：快捷跳转（搜索） */
.nav-qj { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: var(--radius-pill); font-family: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; transition: border-color .12s ease, color .12s ease; }
.nav-qj:hover { border-color: var(--blue); color: var(--blue); }
.nav-qj svg { width: 16px; height: 16px; flex: none; }
.nav-qj kbd { display: none; }
@media (min-width: 768px) { .nav-qj kbd { display: inline-block; } }

/* 快捷跳转浮层（⌘K / Ctrl+K） */
.qj { position: fixed; inset: 0; z-index: 300; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; background: rgba(16,22,33,.45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.qj-card { width: 100%; max-width: 520px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 30px 80px rgba(16,22,33,.28); overflow: hidden; }
.qj-input { width: 100%; box-sizing: border-box; border: none; border-bottom: 1px solid var(--line); padding: 16px 18px; font-size: 16px; font-family: inherit; color: var(--ink); }
.qj-input:focus { outline: none; }
.qj-list { list-style: none; margin: 0; padding: 6px; max-height: min(56vh, 420px); overflow: auto; }
.qj-item { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--radius-sm); cursor: pointer; font-size: var(--fs-sm); min-height: 44px; }
.qj-kind { font-size: 11px; font-weight: 700; color: var(--blue); background: rgba(47,107,255,.10); border-radius: 999px; padding: 2px 8px; flex: none; }
.qj-desc { color: var(--muted); margin-left: auto; font-size: 12px; text-align: right; }
.qj-item.active, .qj-item:hover { background: var(--bg); }
.qj-empty { padding: 18px; color: var(--muted); font-size: var(--fs-sm); }
.qj-hint { border-top: 1px solid var(--line); padding: 10px 14px; color: var(--muted); font-size: 12px; }

/* ---------- Accessibility: 尊重 prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .preview .skeleton { animation: none; background: #EEF2F8; }
  .btn.primary:hover, .btn:hover, .btn.ghost:hover { transform: none; }
  .plan.pro { transform: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- Hero 次级价值钩子（A/B 文案位） ---------- */
.hero-hook { color: var(--muted); font-size: 15px; max-width: 520px; margin: 0 0 var(--s5); }

/* ---------- 情境化升级弹窗（额度耗尽痛点时刻转化） ---------- */
.up-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: rgba(16,22,33,.5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); padding: var(--s5); animation: upfade .18s ease; }
@keyframes upfade { from { opacity: 0 } to { opacity: 1 } }
.up-card { position: relative; width: 100%; max-width: 440px; background: linear-gradient(180deg,#FFFFFF,#FCFBF7); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 30px 80px rgba(16,22,33,.30); padding: var(--s6); text-align: center; }
.up-x { position: absolute; top: 8px; right: 12px; border: none; background: transparent; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; }
.up-badge { display: inline-block; background: rgba(47,107,255,.10); color: var(--blue); font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; margin-bottom: var(--s3); }
.up-card h3 { font-size: 20px; margin: 0 0 var(--s3); line-height: 1.25; }
.up-sub { color: var(--muted); font-size: 14px; margin: 0 0 var(--s4); }
.up-cmp { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--s2); margin: 0 0 var(--s4); }
.up-cmp > div { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 6px; }
.up-cmp span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.up-cmp b { font-size: 15px; }
.up-actions { display: flex; flex-direction: column; gap: var(--s2); margin: 0 0 var(--s3); }
.up-later { border: none; background: transparent; color: var(--muted); font-size: 13px; cursor: pointer; text-decoration: underline; margin: 2px auto 8px; }
.up-fine { font-size: 12px; color: var(--muted); margin: 0; }

/* ---------- 定价页计费切换（A/B） ---------- */
.billing-toggle { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-pill); margin: var(--s2) 0 var(--s3); }
.billing-toggle button { min-height: 44px; border: none; background: transparent; color: var(--muted); font-weight: 600; font-family: inherit; padding: 6px 16px; border-radius: var(--radius-pill); cursor: pointer; font-size: var(--fs-sm); transition: background .14s ease, color .14s ease, box-shadow .14s ease, transform .14s ease; }
.billing-toggle button:hover:not(.active) { color: var(--ink); }
.billing-toggle button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.billing-toggle button.active { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(47,107,255,.30); transform: translateY(-1px); }
.billing-toggle button.active::before { content: "✓"; margin-right: 6px; font-weight: 800; }

/* ---------- 账户仪表盘（额度 / 用量 / 历史） ---------- */
.box.wide { text-align: left; }
.lead { color: var(--muted); margin: 0 0 var(--s5); }
.dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: var(--s4); margin: var(--s5) 0; }
/* 栅格/弹性子项允许收缩，避免内容撑破容器造成横向溢出 */
.dash > *, .plan, .card, .hero-grid > * { min-width: 0; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); text-align: left; }
.card h3 { font-size: 15px; margin: 0 0 var(--s3); color: var(--ink); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: var(--s3); }
.status-pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(22,163,74,.12); color: #15803d; }
.status-pill.inactive { background: rgba(120,120,120,.14); color: var(--muted); }
.plan-card h3 { font-size: 18px; }
/* 账户头像：Google 登录时展示，无头像时前端隐藏并回退为邮箱展示 */
.acct-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; display: block; margin-bottom: var(--s3); background: var(--bg); border: 1px solid var(--line); }
.acct-avatar[hidden] { display: none; }
.acct-name { margin: 0 0 var(--s2); font-size: 15px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.acct-name[hidden] { display: none; }
.kv { margin: 0 0 var(--s4); }
.kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.kv dt { color: var(--muted); margin: 0; }
.kv dd { margin: 0; text-align: right; font-weight: 600; }
.quota-big { font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.quota-big small { font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.bar { height: 8px; background: rgba(120,120,120,.16); border-radius: 999px; overflow: hidden; margin: var(--s3) 0 var(--s2); }
.bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), #7aa6ff); border-radius: 999px; transition: width .4s ease; }
.muted.sm { font-size: 13px; } .muted.xs { font-size: 12px; }
#quota-note { margin-top: 6px; }
.stat-row { display: flex; gap: var(--s3); }
.stat { flex: 1; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--s3) 0; }
.stat b { display: block; font-size: 22px; }
.stat span { font-size: 12px; color: var(--muted); }
.history-card { grid-column: 1 / -1; }
.hist { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow: auto; }
.hist li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.hist li:first-child { border-top: none; }
.hist .h-type { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(47,107,255,.1); color: var(--blue); min-width: 46px; text-align: center; }
.hist .h-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist .h-time { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ---------- 订阅订单页 ---------- */
.orders-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: var(--s4); }
.orders-head .btn.ghost { white-space: nowrap; }
.filters { display: flex; flex-wrap: wrap; gap: var(--s3); margin-bottom: var(--s4); align-items: flex-end; }
.field-inline { display: flex; flex-direction: column; gap: 6px; flex: 1 1 150px; }
.field-inline.grow { flex: 2 1 220px; }
.field-inline label { font-size: 12px; font-weight: 700; color: var(--muted); }
.field-inline select, .field-inline input {
  width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--radius-sm);
  min-height: 44px; padding: 10px 12px; font-family: inherit; font-size: var(--fs-sm); background: #fff; color: var(--ink);
}
.field-inline select:focus, .field-inline input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,107,255,.15); }
.btn.sm { min-height: 44px; padding: 8px 16px; }
.demo-badge { font-size: 12px; color: #9A3412; background: #FFF7ED; border: 1px solid #FED7AA; border-radius: var(--radius-sm); padding: 8px 12px; margin: 0 0 var(--s4); }
.empty { color: var(--muted); text-align: center; padding: var(--s6) 0; }

.otable { width: 100%; }
.o-head, .o-row { display: grid; grid-template-columns: 1.5fr 1fr 1.7fr 1fr .9fr; gap: 12px; align-items: center; padding: 14px 12px; border-bottom: 1px solid var(--line); }
.o-head { font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: .03em; }
.o-row { cursor: pointer; transition: background .12s ease; }
.o-row:hover { background: var(--bg); }
.o-row:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.o-row .amount { font-weight: 700; }
.o-status { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.o-status.completed { background: rgba(22,163,74,.12); color: #15803d; }
.o-status.pending { background: rgba(217,119,6,.14); color: #B45309; }
.o-status.canceled { background: rgba(120,120,120,.16); color: #4B5563; }
.o-status.refunded { background: rgba(47,107,255,.12); color: var(--blue); }

.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: var(--s5); flex-wrap: wrap; }
.pg { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: var(--radius-sm); padding: 8px 16px; font-weight: 600; font-family: inherit; cursor: pointer; font-size: var(--fs-sm); transition: border-color .12s ease, color .12s ease; }
.pg:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.pg:disabled { opacity: .45; cursor: not-allowed; }
.pg-info { font-size: 13px; color: var(--muted); }

.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-mask { position: absolute; inset: 0; background: rgba(16,24,32,.5); }
.modal-card { position: relative; z-index: 1; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; max-width: 480px; max-height: 88vh; overflow: auto; padding: var(--s6); }
.modal-x { position: absolute; top: 8px; right: 6px; width: 44px; height: 44px; border: none; background: transparent; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; border-radius: 999px; }
.modal-x:hover { background: var(--bg); color: var(--ink); }
.modal-card .kv { margin: var(--s3) 0 0; }
.copy-btn { position: relative; margin-left: 8px; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 6px; padding: 2px 8px; font-size: 12px; cursor: pointer; font-family: inherit; transition: border-color .12s ease, color .12s ease; }
/* 视觉保持紧凑，但把可点热区扩展到 ≥44px（触摸可用性） */
.copy-btn::after { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }
.copy-btn:hover { border-color: var(--blue); color: var(--blue); }
.copy-btn:active { transform: translateY(1px); }
.link { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue); font-weight: 600; text-decoration: underline; }

/* 订单列表改卡片式：断点提前到 768px（641–768 区间 5 列时“订阅周期”会折行） */
@media (max-width: 768px) {
  .o-head { display: none; }
  .o-row { grid-template-columns: 1fr; gap: 6px; padding: 14px 4px; }
  .o-row > span { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
  .o-row > span::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 700; }
  .o-row > span.amount { font-weight: 700; }
}
@media (max-width: 640px) {
  .orders-head { flex-direction: column; }
  .field-inline, .field-inline.grow { flex: 1 1 100%; }
}

/* ---------- 小屏适配（折叠屏外屏 280px / iPhone SE 320px 等 ≤400px） ---------- */
@media (max-width: 400px) {
  :root { --fs-h1: 28px; --fs-h2: 22px; --fs-body: 15px; --s7: 32px; --s9: 32px; }
  .page { padding-top: var(--s6); padding-bottom: var(--s6); }
  .box { padding: var(--s5); }
  .hero p.sub { font-size: 16px; }
  .btn.lg { padding: 13px 20px; font-size: 15px; }
  .plan .price { font-size: 28px; }
  .quota-big { font-size: 28px; }
  .o-row { padding: 12px 0; }
}
.auth-step{font-size:12px;font-weight:650;color:#405ddb;letter-spacing:.02em;margin:0 0 12px}.auth-destination{font-size:13px;color:#60708a;padding:12px;background:#f3f6fd;border-radius:9px}.auth-session{padding:16px;background:#eef8f4;border:1px solid #cee6dd;border-radius:12px;margin:16px 0}.auth-session p{font-size:13px;color:#526c63}.auth-box #auth-continue{margin-top:14px}.auth-box [aria-disabled=true]{pointer-events:none;opacity:.6}.auth-box h1{font-size:28px;line-height:1.25}.auth-box .auth-sub{line-height:1.65}.auth-box #resend-code{margin-top:8px}.auth-box #code-hint{line-height:1.6}#account-retry{margin:12px 0}[hidden]{display:none!important}
