/* ============ 煎蛋阅读器落地页共享样式 ============ */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --card: #ffffff;
  --fg: #17181c;
  --fg-2: #4b5563;
  --fg-3: #6b7280;
  --border: #e6e8ec;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff4ff;
  --ring: rgba(37, 99, 235, .4);
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 12px 32px -16px rgba(16, 24, 40, .14);
  --radius: 14px;
}
[data-theme="dark"] {
  --bg: #0f1115;
  --bg-soft: #16181f;
  --card: #15181f;
  --fg: #f2f4f7;
  --fg-2: #a3aab6;
  --fg-3: #8a919c;
  --border: #262b34;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-soft: #1b2536;
  --ring: rgba(96, 165, 250, .45);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -16px rgba(0, 0, 0, .5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115;
    --bg-soft: #16181f;
    --card: #15181f;
    --fg: #f2f4f7;
    --fg-2: #a3aab6;
    --fg-3: #8a919c;
    --border: #262b34;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-soft: #1b2536;
    --ring: rgba(96, 165, 250, .45);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -16px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 4px;
}
section[id] { scroll-margin-top: 4.5rem; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.prose { max-width: 760px; margin: 0 auto; }
.prose p { margin: 0 0 1rem; color: var(--fg-2); }
.prose p:last-child { margin-bottom: 0; }
.prose h3 { margin: 1.5rem 0 .5rem; font-size: 1.1rem; font-weight: 700; color: var(--fg); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: .5rem 1rem;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 3.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--fg);
}
.brand:hover { text-decoration: none; }
.brand-mark { font-size: 1.25rem; line-height: 1; }
.site-nav { display: flex; align-items: center; gap: .25rem; }
.nav-link {
  padding: .5rem .75rem;
  border-radius: 8px;
  color: var(--fg-2);
  font-size: .95rem;
}
.nav-link:hover { color: var(--fg); background: var(--bg-soft); text-decoration: none; }
.nav-cta { margin-left: .5rem; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  font-size: 1.25rem;
  line-height: 1;
  padding: .35rem .6rem;
  cursor: pointer;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; text-decoration: none; }
.btn-ghost { border-color: var(--border); color: var(--fg); background: transparent; }
.btn-ghost:hover { border-color: var(--fg-3); color: var(--fg); text-decoration: none; }
.btn-lg { padding: .9rem 2rem; font-size: 1.08rem; }

/* ============ Breadcrumb ============ */
.breadcrumb {
  padding: 1rem 0 0;
  font-size: .88rem;
  color: var(--fg-3);
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
}
.breadcrumb a { color: var(--fg-3); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current="page"] { color: var(--fg-2); }
.breadcrumb [aria-hidden="true"] { color: var(--fg-3); user-select: none; }

/* ============ Hero ============ */
.hero { padding: 3rem 0 3.5rem; text-align: center; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--fg-2);
  font-size: .88rem;
  font-weight: 500;
}
.hero h1 {
  margin: 1.4rem 0 .6rem;
  font-size: clamp(2rem, 5.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.hero-sub {
  margin: 0 auto;
  max-width: 620px;
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  color: var(--fg-2);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 2rem; }
.hero-note { margin-top: 1.4rem; color: var(--fg-3); font-size: .92rem; }

/* ============ Dropzone ============ */
.dropzone {
  position: relative;
  max-width: 560px;
  margin: 2rem auto 0;
  padding: 2.5rem 1.5rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.dropzone-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: .75rem;
}
.dropzone p { margin: 0 0 .35rem; font-weight: 600; color: var(--fg); }
.dropzone .dropzone-hint { margin: 0; font-size: .88rem; color: var(--fg-3); font-weight: 400; }
.dropzone input[type="file"] { display: none; }
.dropzone-error {
  max-width: 560px;
  margin: .75rem auto 0;
  padding: .6rem 1rem;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: .9rem;
  display: none;
}
.dropzone-error.show { display: block; }
[data-theme="dark"] .dropzone-error {
  background: rgba(220, 38, 38, .1);
  border-color: rgba(220, 38, 38, .3);
}

/* ============ Sections ============ */
.section { padding: 4rem 0; }
.section-alt { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 2.5rem; }
.section-label {
  display: block;
  margin-bottom: .6rem;
  color: var(--accent);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .08em;
}
.section h2 { margin: 0 0 .6rem; font-size: clamp(1.6rem, 3.2vw, 2.1rem); font-weight: 700; letter-spacing: -.01em; }
.section-lead { margin: 0; color: var(--fg-2); }

/* ============ Feature cards ============ */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 1rem;
}
.card h3 { margin: 0 0 .5rem; font-size: 1.12rem; font-weight: 700; }
.card p { margin: 0; color: var(--fg-2); font-size: .95rem; }

/* ============ Steps ============ */
ol.steps { list-style: none; margin: 0; padding: 0; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; counter-reset: step; }
.step { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  margin-bottom: .9rem;
}
.step h3 { margin: 0 0 .4rem; font-size: 1.05rem; font-weight: 700; }
.step p { margin: 0; color: var(--fg-2); font-size: .95rem; }

/* ============ FAQ ============ */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .75rem; background: var(--card); }
.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--fg);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq-item summary > h3 {
  display: inline;
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--fg-3);
  transition: transform .15s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 1.25rem 1.1rem; color: var(--fg-2); }
.faq-item .faq-body p { margin: 0 0 .75rem; }
.faq-item .faq-body p:last-child { margin-bottom: 0; }

/* ============ Related Readers ============ */
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.related-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  color: var(--fg);
  font-weight: 600;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.related-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--fg);
}
.related-card .related-ext {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: .15rem .55rem;
  border-radius: 6px;
  margin-bottom: .5rem;
}
.related-card .related-desc { display: block; font-weight: 400; font-size: .88rem; color: var(--fg-3); margin-top: .25rem; }
.related-card.related-current {
  background: var(--bg-soft);
  border-style: dashed;
  cursor: default;
  opacity: .75;
}
.related-card.related-current:hover { border-color: var(--border); box-shadow: none; }
.related-home {
  text-align: center;
  margin-top: 1.5rem;
  font-size: .95rem;
  color: var(--fg-3);
}

/* ============ Comparison table ============ */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; -webkit-overflow-scrolling: touch; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  background: var(--card);
}
.compare-table th,
.compare-table td {
  border: 1px solid var(--border);
  padding: .65rem .85rem;
  text-align: left;
  vertical-align: top;
}
.compare-table thead th {
  background: var(--bg-soft);
  font-weight: 700;
  color: var(--fg);
  white-space: nowrap;
}
.compare-table tbody td { color: var(--fg-2); }
.compare-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--bg-soft) 55%, transparent); }
.compare-note { font-size: .9rem; color: var(--fg-3); margin: 0 0 1rem; }

/* ============ Final CTA ============ */
.final-cta { text-align: center; padding: 4.5rem 0; }
.final-cta h2 { margin: 0 0 .6rem; font-size: clamp(1.6rem, 3.2vw, 2.1rem); font-weight: 700; }
.final-cta p { margin: 0 auto 2rem; max-width: 560px; color: var(--fg-2); }

/* ============ Footer ============ */
.site-footer { border-top: 1px solid var(--border); padding: 3rem 0 2.5rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: flex-start; }
.footer-brand { font-weight: 700; font-size: 1.05rem; margin-bottom: .3rem; }
.footer-tagline { margin: 0; color: var(--fg-3); font-size: .92rem; max-width: 320px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-links a { color: var(--fg-2); font-size: .95rem; }
.footer-links a:hover { color: var(--fg); }
.footer-copy { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); color: var(--fg-3); font-size: .85rem; }
    .footer-beian { margin: .5rem 0 0; color: var(--fg-3); font-size: .82rem; }
    .footer-beian a { color: var(--fg-3); }
    .footer-beian a:hover { color: var(--fg-2); }

/* ============ Responsive ============ */
@media (max-width: 767px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: .5rem 1.25rem 1rem;
    display: none;
  }
  .site-nav.open { display: flex; }
  .nav-link { padding: .7rem .5rem; font-size: 1rem; }
  .nav-cta { margin: .5rem 0 0; }
  .hero { padding: 2.5rem 0 2.5rem; }
  .section { padding: 3rem 0; }
  .btn-lg { padding: .85rem 1.6rem; }
  .dropzone { padding: 2rem 1rem; }
}

/* ============ 404 ============ */
.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 3rem;
  padding-bottom: 3rem;
}
.error-code {
  margin: 0;
  font-size: clamp(4rem, 18vw, 8rem);
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
}
.error-page h1 { margin: .5rem 0 0; font-size: 1.8rem; }
.error-text { max-width: 30rem; margin: 1rem auto 0; color: var(--fg-2); }
.error-actions { display: flex; gap: .75rem; margin-top: 2rem; flex-wrap: wrap; justify-content: center; }
.error-links {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  font-size: .95rem;
}
