/* ============================================
   知了笔记官网 · 页面样式
   移动优先；断点：≤640 / 641–1024 / ≥1025
   ============================================ */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--c-bg);
}

body {
  font-family: var(--font-stack);
  color: var(--c-ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

.container {
  max-width: var(--w-page);
  margin: 0 auto;
  padding-left: var(--sp-gutter);
  padding-right: var(--sp-gutter);
}

/* ---------- 顶部导航 ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--c-ink);
}

.nav-brand img { width: 32px; height: 32px; border-radius: 8px; }

.nav-brand span { font-size: 17px; font-weight: 600; letter-spacing: 0.02em; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
}

.nav-links a {
  color: var(--c-ink);
  text-decoration: none;
}

.nav-links a:hover { color: var(--c-primary); }

.nav-links a.nav-ext { color: var(--c-muted); }
.nav-links a.nav-ext:hover { color: var(--c-primary); }
.nav-ext sup { font-size: 11px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--c-ink);
  margin: 4px 0;
  border-radius: 1px;
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--r-card);
    padding: 8px;
    box-shadow: 0 12px 32px rgba(35, 32, 29, 0.10);
    z-index: 50;
  }
  .nav-links a { padding: 12px 14px; border-radius: 8px; }
  .nav-links a:hover { background: var(--c-primary-tint); }
  .nav-links.open { display: flex; }
  .nav { position: relative; }
}

/* ---------- Hero ---------- */
.hero {
  padding-top: 72px;
  padding-bottom: 64px;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: var(--fs-hero);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
}

.hero .hero-claim {
  margin: 18px auto 0;
  max-width: 620px;
  font-size: clamp(17px, 2.8vw, 22px);
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: 0.02em;
  color: var(--c-ink);
}

.hero .hero-sub {
  margin: 20px auto 0;
  max-width: 560px;
  font-size: clamp(15px, 2.4vw, 18px);
  line-height: 1.9;
  color: var(--c-muted);
}

.hero .hero-claim + .hero-sub { margin-top: 10px; }

.hero-cta {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  padding: 13px 32px;
  border-radius: var(--r-btn);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-align: center;
}

.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-hover); }

.btn-secondary { background: var(--c-primary-tint); color: #B45817; }
.btn-secondary:hover { background: #F5E3D2; }

@media (max-width: 640px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
}

.hero-note {
  margin: 16px 0 0;
  font-size: var(--fs-small);
  color: var(--c-muted);
}

.hero-visual {
  margin: 44px auto 0;
  max-width: 920px;
}

/* 设备切换分段控件 */
.device-switch {
  display: flex;
  width: max-content;
  gap: 4px;
  margin: 0 auto 28px;
  padding: 4px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-pill);
}

.device-tab {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--c-muted);
  padding: 8px 26px;
  border-radius: var(--r-pill);
  cursor: pointer;
}

.device-tab.is-active { background: var(--c-primary); color: #fff; }

.device-stage { display: flex; justify-content: center; }

.stage-panel { display: none; width: 100%; }
.stage-panel.is-active { display: block; }

.hero-visual .visual-mac {
  max-width: 766px; /* 按截图比例 1.837 调至与 iPhone 视图等高（≈417px） */
  margin: 0 auto;
  border: 1px solid var(--c-line);
  border-radius: var(--r-visual);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(35, 32, 29, 0.08);
}

.hero-visual .visual-phones {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 820px;
  margin: 0 auto;
}

.hero-visual .phone-shot {
  border: 1px solid var(--c-line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(35, 32, 29, 0.10);
  background: var(--c-bg);
}

@media (max-width: 640px) {
  .hero-visual .visual-phones { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

/* ---------- 分段通用 ---------- */
.section { padding-top: var(--sp-section); padding-bottom: var(--sp-section); }

.section-title {
  margin: 0 0 8px;
  font-size: var(--fs-h2);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.section-lead {
  margin: 0 0 48px;
  font-size: var(--fs-body);
  color: var(--c-muted);
  line-height: 1.9;
}

/* ---------- 四大主张 ---------- */
.claims {
  border-top: 1px solid var(--c-line);
  background: var(--c-surface);
}

.claims-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 44px 64px;
  padding-top: 80px;
  padding-bottom: 88px;
}

@media (max-width: 640px) {
  .claims-grid { grid-template-columns: 1fr; gap: 40px; }
}

.claim-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-icon);
  background: var(--c-primary-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.claim h3 {
  margin: 0 0 14px;
  font-size: clamp(21px, 3vw, 25px);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.claim p {
  margin: 0;
  font-size: 14.5px;
  line-height: 2;
  color: var(--c-muted);
}

/* ---------- 功能矩阵 ---------- */
.features { border-top: 1px solid var(--c-line); }

.features .section-title { margin-bottom: 48px; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--sp-grid-gap);
}

.feature-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-card);
  padding: var(--sp-card);
}

.feature-card svg { display: block; margin-bottom: 14px; }

.feature-card h3 {
  margin: 0 0 8px;
  font-size: var(--fs-card-title);
  font-weight: 600;
}

.feature-card p {
  margin: 0;
  font-size: var(--fs-card-body);
  line-height: 1.9;
  color: var(--c-muted);
}

.feature-shot {
  border: 1px solid var(--c-line);
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--c-bg);
  max-height: 340px;
}

/* ---------- 同步与隐私 ---------- */
.privacy-band {
  background: var(--c-dark-bg);
  color: var(--c-bg);
}

.privacy-inner {
  padding-top: var(--sp-section-lg);
  padding-bottom: var(--sp-section-lg);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 56px;
  align-items: center;
}

.privacy-kicker {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--c-primary);
  font-weight: 600;
}

.privacy-band h2 {
  margin: 0 0 24px;
  font-size: var(--fs-h2-dark);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

.privacy-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 16px;
}

.privacy-list li {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.privacy-list .dash { color: var(--c-primary); font-weight: 700; }

.privacy-list span:last-child {
  font-size: var(--fs-body);
  line-height: 1.9;
  color: var(--c-dark-text);
}

.e2e-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;      /* 工程侧修：中间宽度(~790px)整行差 1px 溢出 → 允许换行 + 箭头可收缩 */
  row-gap: 12px;
  max-width: 100%;
}
.e2e-arrow { flex-shrink: 1; min-width: 0; }
.e2e-arrow svg { max-width: 100%; height: auto; }

.e2e-node { text-align: center; }

.e2e-box {
  width: 72px;
  height: 72px;
  border: 1px solid rgba(251, 249, 246, 0.25);
  border-radius: var(--r-visual);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.e2e-box.dashed { border-style: dashed; border-color: rgba(251, 249, 246, 0.35); }

/* 腾讯云（隐私示意图中间节点） */
.e2e-cloud {
  position: relative;
  width: 108px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.e2e-cloud svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.e2e-cloud-txt {
  position: relative;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #B45817;
}

.e2e-box .mono {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--c-dark-muted);
}

.e2e-node p {
  margin: 12px 0 0;
  font-size: var(--fs-small);
  color: var(--c-dark-text);
  white-space: nowrap; /* 工程侧修：caption「明文仅在本地」中窄宽度被挤成两行 */
}

.e2e-node p small {
  font-size: inherit;
  color: var(--c-dark-muted);
}

.e2e-arrow {
  flex: 0 0 auto;
  padding: 0 18px;
  margin-bottom: 34px;
}

@media (max-width: 640px) {
  .e2e-arrow { padding: 0 8px; }
}

/* ---------- 下载 / 多端 ---------- */
.download {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-line);
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--sp-grid-gap);
}

.platform-card {
  border: 1px solid var(--c-line);
  border-radius: var(--r-card);
  padding: 28px 24px;
  background: var(--c-bg);
}

.platform-card.pending {
  border-style: dashed;
  background: transparent;
}

.platform-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.platform-card.pending .platform-head { margin-bottom: 0; }

.platform-head h3 { margin: 0; font-size: 17px; font-weight: 600; }

.platform-card.pending h3 { color: var(--c-muted); }

.badge {
  font-size: var(--fs-fine);
  border-radius: var(--r-pill);
  padding: 3px 10px;
}

.badge-ok { color: var(--c-ok); background: var(--c-ok-bg); }
.badge-soon { color: var(--c-muted); background: var(--c-neutral-bg); }

.platform-btn {
  display: block;
  text-align: center;
  font-size: 14.5px;
  font-weight: 600;
  padding: 11px 0;
  border-radius: 9px;
  text-decoration: none;
  color: #fff;
}

.platform-btn.mac { background: var(--c-primary); }
.platform-btn.mac:hover { background: var(--c-primary-hover); }

.platform-btn.appstore { background: var(--c-ink); }
.platform-btn.appstore:hover { background: #3A362F; }

.platform-btn.win { background: #0067B8; }
.platform-btn.win:hover { background: #005496; }
/* Android（1.5.0 起上线，暂走 APK 直链下载，未上应用商店） */
.platform-btn.android { background: #3DDC84; color: #10241A; }
.platform-btn.android:hover { background: #2FC873; }

.platform-note {
  margin: 12px 0 0;
  font-size: var(--fs-fine);
  color: var(--c-muted);
  line-height: 1.8;
}

.platform-ver {
  color: #B45817;
  font-weight: 600;
}

/* ---------- 敬请关注（二维码） ---------- */
.follow { border-top: 1px solid var(--c-line); }

.follow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 240px));
  gap: 40px;
  justify-content: center;
}

.follow-card { text-align: center; }

.follow-qr {
  width: 100%;
  max-width: 200px;
  margin: 0 auto;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-card);
  box-shadow: 0 8px 24px rgba(35, 32, 29, 0.06);
}

.follow-qr img { display: block; width: 100%; height: auto; }

.follow-name {
  margin: 18px 0 4px;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.follow-note {
  margin: 0;
  font-size: var(--fs-fine);
  color: var(--c-muted);
  line-height: 1.8;
}

@media (max-width: 640px) {
  .follow-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- 大师智囊入口卡 ---------- */
.dashi { padding-top: 72px; padding-bottom: 72px; }

.dashi-card {
  background: linear-gradient(135deg, var(--c-dashi-bg-a), var(--c-dashi-bg-b));
  border-radius: 18px;
  padding: 44px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.dashi-kicker {
  margin: 0 0 8px;
  font-size: var(--fs-small);
  letter-spacing: 0.18em;
  color: var(--c-dashi-gold);
}

.dashi-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 700;
  color: #F5EFE6;
  letter-spacing: 0.05em;
}

.dashi-card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--c-dashi-text);
  max-width: 460px;
}

.dashi-btn {
  flex: 0 0 auto;
  display: inline-block;
  border: 1px solid var(--c-dashi-gold);
  color: var(--c-dashi-gold);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--r-btn);
  text-decoration: none;
}

.dashi-btn:hover { background: var(--c-dashi-gold); color: var(--c-dashi-bg-a); }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--c-line); }

.footer-inner { padding-top: 48px; padding-bottom: 40px; }

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand { display: flex; align-items: center; gap: 10px; }

.footer-brand img { width: 26px; height: 26px; border-radius: 7px; }

.footer-brand span { font-size: 14px; font-weight: 600; }

.footer-mail {
  font-size: 13px;
  color: var(--c-muted);
  text-decoration: none;
}

.footer-mail:hover { color: var(--c-primary); }

.footer-legal {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--c-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: var(--fs-fine);
  color: var(--c-muted);
}

.footer-legal a { color: var(--c-muted); text-decoration: none; }
.footer-legal a:hover { color: var(--c-primary); }

/* ---------- 文章页（privacy / support） ---------- */
.article-main {
  max-width: var(--w-article);
  margin: 0 auto;
  padding: 56px var(--sp-gutter) 88px;
}

.article-main h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4.4vw, 34px);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.article-meta {
  margin: 0 0 40px;
  font-size: 13px;
  color: var(--c-muted);
}

.article-meta a { color: var(--c-primary); text-decoration: none; }

.article-body { font-size: var(--fs-body); line-height: 2.1; }

.article-body h2 {
  font-size: var(--fs-h3);
  font-weight: 600;
  margin: 40px 0 12px;
  letter-spacing: 0.04em;
}

.article-body p { margin: 0 0 16px; color: var(--c-ink-soft); }

.article-body ol { margin: 0 0 16px; padding-left: 22px; color: var(--c-ink-soft); }
.article-body li { margin-bottom: 8px; line-height: 2.1; }

.article-footer .footer-inner { padding-top: 28px; padding-bottom: 28px; }

.nav-back {
  font-size: 14px;
  color: var(--c-muted);
  text-decoration: none;
}

.nav-back:hover { color: var(--c-primary); }

/* ---------- 如何选择 / 竞品对比 ---------- */
.compare { border-top: 1px solid var(--c-line); }
.compare .section-lead { margin-bottom: 32px; }

.compare-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--c-line);
  border-radius: var(--r-card);
}

.compare-table {
  width: 100%;
  /* 6 列（对比维度 + 5 个产品）：660px 是 5 列时代的值，分到 6 列后每格约 100px、
     中文会折成四五行。按每列约 135px 取 820px。窄屏由 .compare-scroll 横滑承接。 */
  min-width: 820px;
  border-collapse: collapse;
  font-size: var(--fs-card-body);
}

.compare-table th,
.compare-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  line-height: 1.65;
  color: var(--c-ink-soft);
  border-bottom: 1px solid var(--c-line);
}

.compare-table tr:last-child th,
.compare-table tr:last-child td { border-bottom: none; }

.compare-table thead th {
  font-size: var(--fs-card-title);
  font-weight: 700;
  color: var(--c-ink);
  border-bottom: 2px solid var(--c-line);
  white-space: nowrap;
}

.compare-table tbody th {
  font-weight: 600;
  color: var(--c-ink);
  white-space: nowrap;
}

.compare-table .is-self { background: var(--c-primary-tint); }
.compare-table td.is-self { color: var(--c-ink); font-weight: 600; }
.compare-table thead .is-self { color: var(--c-primary); }

.compare-note {
  margin: 22px 0 0;
  font-size: var(--fs-small);
  line-height: 1.9;
  color: var(--c-muted);
}

/* ---------- 常见问题 ---------- */
.faq { border-top: 1px solid var(--c-line); }

.faq-list { max-width: 780px; margin: 0 auto; }

.faq-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--c-line);
}
.faq-item:last-child { border-bottom: none; }

.faq-item h3 {
  margin: 0 0 10px;
  font-size: var(--fs-h3);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--c-ink);
}

.faq-item p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.95;
  color: var(--c-muted);
}

/* ---------- 平板微调（641–1024） ---------- */
@media (min-width: 641px) and (max-width: 1024px) {
  .claims-grid { grid-template-columns: repeat(2, 1fr); }
}
