/* ============================================================
   LaTeX 医生 — 中文落地页
   配色：primary #0d9488, accent #0f172a, bg #ffffff
   ============================================================ */

:root {
  --primary: #0d9488;
  --primary-600: #0f766e;
  --primary-50: #f0fdfa;
  --primary-100: #ccfbf1;
  --accent: #0f172a;
  --muted: #475569;
  --muted-2: #64748b;
  --border: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --ok: #16a34a;
  --warn: #d97706;
  --err: #dc2626;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 20px 40px -20px rgba(13, 148, 136, 0.35), 0 8px 16px rgba(15, 23, 42, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--accent);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--primary); text-decoration: none; transition: color 120ms ease; }
a:hover { color: var(--primary-600); }

h1, h2, h3 { color: var(--accent); margin: 0; line-height: 1.3; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0; color: var(--muted); }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
  transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--primary-600); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-sm { padding: 8px 16px; font-size: 0.875rem; }
.btn-ghost {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary-100);
}
.btn-ghost:hover { background: var(--primary-50); color: var(--primary-600); }

/* ----- Nav ----- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-weight: 700;
  font-size: 1.05rem;
}
.brand:hover { color: var(--accent); }
.logo {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}
.nav-links {
  display: flex;
  gap: 22px;
  align-items: center;
}
.nav-links a {
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--accent); }

/* ----- Hero ----- */
.hero {
  padding: 64px 0 80px;
  background:
    radial-gradient(1200px 500px at 90% -100px, var(--primary-50) 0%, transparent 60%),
    radial-gradient(800px 400px at -10% 0%, #f0fdfa 0%, transparent 50%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--primary-600);
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 { margin-bottom: 18px; }
.grad {
  background: linear-gradient(90deg, var(--primary) 0%, #14b8a6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sub {
  font-size: 1.07rem;
  color: var(--muted);
  margin-bottom: 28px;
  max-width: 560px;
  line-height: 1.75;
}
.email-form {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin-bottom: 12px;
}
.email-form.lg { max-width: 540px; margin: 24px auto 0; }
.email-form input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: var(--accent);
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.email-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}
.microcopy {
  font-size: 0.85rem;
  color: var(--muted-2);
  margin-bottom: 18px;
}
.hero-trust {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.hero-trust li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}
.hero-trust span {
  color: var(--ok);
  font-weight: 700;
}

/* ----- Browser mock ----- */
.browser {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.browser.sm { box-shadow: var(--shadow-md); border-radius: var(--radius); }
.browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
}
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot-r { background: #ef4444; }
.dot-y { background: #f59e0b; }
.dot-g { background: #22c55e; }
.addr {
  flex: 1;
  margin-left: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.78rem;
  color: var(--muted-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browser-body {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 320px;
}
.ide-left {
  background: #fafdfc;
  border-right: 1px solid var(--border);
  padding: 14px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.83rem;
  color: var(--accent);
}
.ide-line {
  padding: 2px 14px 2px 0;
  white-space: nowrap;
}
.ide-line.err { background: rgba(220, 38, 38, 0.08); border-left: 3px solid var(--err); padding-left: 0; }
.ln {
  display: inline-block;
  width: 36px;
  text-align: right;
  color: #cbd5e1;
  margin-right: 12px;
  user-select: none;
}
.kw { color: var(--primary); }
.ide-right {
  padding: 14px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.log-title {
  font-size: 0.85rem;
  color: var(--muted-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.log-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}
.log-tag.err { background: #fee2e2; color: var(--err); }
.log {
  margin: 0;
  padding: 10px 12px;
  background: #0f172a;
  color: #fca5a5;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.suggestion {
  border: 1px solid var(--primary-100);
  background: var(--primary-50);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.sug-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--primary-600);
  margin-bottom: 6px;
}
.sparkle { font-size: 0.95rem; }
.sug-body {
  font-size: 0.88rem;
  color: var(--accent);
  margin-bottom: 10px;
  line-height: 1.65;
}
.sug-body code, .panel-text code, .diff-row code, .check-list code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  background: #fff;
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 4px;
}
.sug-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 120ms ease;
}
.sug-btn:hover { background: var(--primary-600); }
.sug-btn.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  margin-left: 6px;
}

/* ----- Problem ----- */
.problem { padding: 80px 0; background: var(--bg-soft); }
.section-title { text-align: center; margin-bottom: 48px; }
.section-title.alt { text-align: left; margin-bottom: 24px; }
.pain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pain {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.pain:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.pain-icon { font-size: 2rem; margin-bottom: 14px; line-height: 1; }
.pain h3 { margin-bottom: 8px; }

/* ----- Features ----- */
.features { padding: 96px 0; }
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 80px;
}
.feature:last-child { margin-bottom: 0; }
.feature.reverse .feature-copy { order: 2; }
.feature.reverse .feature-mock { order: 1; }
.step-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-600);
  background: var(--primary-50);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
  letter-spacing: 0.05em;
}
.feature-copy h3 { font-size: 1.4rem; margin-bottom: 12px; }
.feature-copy p { margin-bottom: 18px; line-height: 1.75; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li {
  position: relative;
  padding-left: 28px;
  color: var(--muted);
  margin-bottom: 10px;
  font-size: 0.95rem;
  line-height: 1.6;
}
.check-list li::before {
  content: "\2713";
  position: absolute;
  left: 0; top: 5px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--primary-50);
  color: var(--primary-600);
  font-size: 0.75rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* feature mock variants */
.panel { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.panel-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
}
.badge-err { background: #fee2e2; color: var(--err); }
.badge-warn { background: #fef3c7; color: var(--warn); }
.badge-ok { background: #dcfce7; color: var(--ok); }
.panel-text { font-size: 0.88rem; color: var(--accent); line-height: 1.6; }

.diff {
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
}
.diff-row { padding: 4px 10px; border-radius: 4px; margin-bottom: 2px; }
.diff-row.del { background: #fef2f2; color: #991b1b; }
.diff-row.add { background: #f0fdf4; color: #166534; }
.diff-row.ctx { color: var(--muted); }
.diff-actions { margin-top: 12px; }

.privacy { padding: 14px; }
.pv-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.pv-row:last-child { border-bottom: none; }
.pv-key { color: var(--accent); }
.pv-yes { color: var(--ok); font-weight: 600; font-size: 0.82rem; }
.pv-no { color: var(--muted-2); font-weight: 600; font-size: 0.82rem; }

/* ----- How it works ----- */
.how { padding: 96px 0; background: var(--bg-soft); }
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.steps li {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
}
.step-num {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  box-shadow: 0 6px 14px rgba(13, 148, 136, 0.3);
}
.steps h3 { margin-bottom: 8px; }

/* ----- Pricing ----- */
.pricing { padding: 96px 0; }
.plans {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 820px;
  margin: 0 auto;
}
.plan {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}
.plan-pro {
  border-color: var(--primary);
  position: relative;
  box-shadow: var(--shadow-lg);
}
.ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.plan h3 { margin-bottom: 12px; }
.price { margin-bottom: 6px; }
.price .amt { font-size: 2.4rem; font-weight: 800; color: var(--accent); }
.price .per { color: var(--muted-2); font-size: 0.95rem; margin-left: 4px; }
.annual-hint {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 18px;
}
.annual-hint strong { color: var(--accent); }
.save {
  display: inline-block;
  background: #fef3c7;
  color: var(--warn);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 4px;
}
.plan-feats { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.plan-feats li {
  padding: 9px 0 9px 26px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.93rem;
  position: relative;
}
.plan-feats li:last-child { border-bottom: none; }
.plan-feats li::before {
  content: "\2713";
  color: var(--primary);
  font-weight: 700;
  position: absolute;
  left: 0; top: 9px;
}
.plan .btn { width: 100%; }
.micro-center {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted-2);
  margin-top: 24px;
}

/* ----- Community / QR ----- */
.community { padding: 96px 0; background: linear-gradient(180deg, #ffffff 0%, var(--primary-50) 100%); }
.community-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.community-copy p { margin-bottom: 18px; color: var(--muted); }
.community-codes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.qr-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.qr-placeholder {
  aspect-ratio: 1 / 1;
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
  display: grid;
  place-items: center;
}
.qr-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 4px;
}
.qr-grid span {
  background: var(--accent);
  border-radius: 2px;
  opacity: 0.85;
}
.qr-grid span:nth-child(2),
.qr-grid span:nth-child(4),
.qr-grid span:nth-child(7),
.qr-grid span:nth-child(9),
.qr-grid span:nth-child(13),
.qr-grid span:nth-child(15),
.qr-grid span:nth-child(17),
.qr-grid span:nth-child(20),
.qr-grid span:nth-child(22),
.qr-grid span:nth-child(24) { background: #fff; }
.qr-label {
  font-weight: 600;
  color: var(--accent);
  font-size: 0.95rem;
}
.qr-sub {
  color: var(--muted-2);
  font-size: 0.82rem;
  margin-top: 2px;
}

/* ----- Signup ----- */
.signup { padding: 80px 0; background: linear-gradient(135deg, var(--primary-50), #ffffff 70%); }
.signup-box {
  max-width: 680px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  box-shadow: var(--shadow-md);
}
.signup-box h2 { margin-bottom: 12px; }
.signup-box p { margin-bottom: 8px; }
.thanks {
  margin-top: 16px;
  color: var(--ok);
  font-weight: 600;
}

/* ----- FAQ ----- */
.faq { padding: 96px 0; }
.faq-list { max-width: 760px; margin: 0 auto; }
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin-bottom: 12px;
  background: #fff;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.faq details[open] { border-color: var(--primary-100); box-shadow: var(--shadow-sm); }
.faq summary {
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 28px;
  font-size: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0; top: -2px;
  font-size: 1.3rem;
  color: var(--primary);
  font-weight: 400;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin-top: 10px; color: var(--muted); font-size: 0.95rem; line-height: 1.75; }

/* ----- Footer ----- */
.footer {
  background: var(--accent);
  color: #cbd5e1;
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
}
.footer-brand .logo { background: #fff; color: var(--primary); }
.footer-nav { display: flex; gap: 24px; }
.footer-nav a { color: #cbd5e1; font-size: 0.9rem; }
.footer-nav a:hover { color: #fff; }
.copy { color: #94a3b8; font-size: 0.85rem; margin: 0; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 920px) {
  .hero { padding: 48px 0 64px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .feature { grid-template-columns: 1fr; gap: 32px; margin-bottom: 56px; }
  .feature.reverse .feature-copy { order: 1; }
  .feature.reverse .feature-mock { order: 2; }
  .pain-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .community-inner { grid-template-columns: 1fr; gap: 32px; }
  .community-codes { max-width: 460px; margin: 0 auto; }
  .browser-body { grid-template-columns: 1fr; min-height: auto; }
  .ide-left { border-right: none; border-bottom: 1px solid var(--border); }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .container { padding: 0 18px; }
  .problem, .features, .how, .pricing, .community, .signup, .faq { padding: 64px 0; }
  .email-form { flex-direction: column; }
  .email-form input, .email-form button { width: 100%; }
  .footer-inner { flex-direction: column; text-align: center; }
  .signup-box { padding: 36px 22px; }
}

@media (max-width: 380px) {
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.3rem; }
  .container { padding: 0 14px; }
}
