/* 字体放在网站自己这里（fonts/make-fonts.py 只留页面上用到的字），不从 Google 加载：访客的 IP 不会给第三方 */
@font-face { font-family: "Picky Serif SC"; src: url("/fonts/picky-serif-sc-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Picky Serif"; src: url("/fonts/picky-serif-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Picky Serif"; src: url("/fonts/picky-serif-italic-400.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Picky Mono"; src: url("/fonts/picky-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
/* 英文页的标题用 Syne（可变字体，400～800） */
@font-face { font-family: "Picky Display"; src: url("/fonts/picky-display.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

/* Picky 官网。一页读下来的"搜寻记录"：衬线标题、窄正文栏、等宽字的记录条目，不用模板式的卡片网格。
   颜色和 App 同一套（ios/ShopCompare/Views/Theme.swift）：墨黑、奶油、橙色，底色是暖白的纸 */
:root {
  --paper: #fbf8f2;
  --ink: #1c1b19;
  --muted: #6f6a63;
  --faint: #a59e94;
  --rule: #e4ddd2;
  --tint: #f2ece2;
  --orange: #e8642a;          /* 纸上用的橙，比 App 里的 #FF7A3D 深一点，字也看得清 */
  --bar: #1c1b19;
  --serif-zh: "Picky Serif SC", "Songti SC", serif;
  --serif-en: "Picky Serif", Georgia, serif;
  --display-en: "Picky Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "Picky Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #161513; --ink: #efe8dc; --muted: #a39b90; --faint: #6f685f; --rule: #2e2b27; --tint: #221f1c;
    --orange: #ff8a52; --bar: #efe8dc;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #161513; --ink: #efe8dc; --muted: #a39b90; --faint: #6f685f; --rule: #2e2b27; --tint: #221f1c;
  --orange: #ff8a52; --bar: #efe8dc;
  color-scheme: dark;
}

/* 双语：同一处放两种语言，按 <html data-lang> 只显示一种 */
html[data-lang="en"] [lang="zh-CN"],
html[data-lang="zh"] [lang="en"] { display: none !important; }

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.75 var(--sans);
  -webkit-font-smoothing: antialiased;
}
html[data-lang="en"] body { font-size: 18.5px; line-height: 1.65; }
a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--faint); }
a:hover { text-decoration-color: var(--orange); }
img { display: block; }

h1, h2, h3 { font-family: var(--serif-zh); font-weight: 800; letter-spacing: 0; text-wrap: balance; }
.request p { text-wrap: balance; }
html[data-lang="en"] h1, html[data-lang="en"] h2, html[data-lang="en"] h3 { font-family: var(--display-en); font-weight: 600; }

/* ---------- 顶栏：就一行字 ---------- */
.top {
  max-width: 1040px; margin: 0 auto; padding: 22px 24px;
  display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 18px; text-decoration: none; }
.brand img { border-radius: 6px; }
.top nav { margin-left: auto; display: flex; gap: 22px; align-items: center; }
.textlink {
  background: none; border: 0; padding: 0; font: inherit; font-size: 15px; color: var(--muted);
  cursor: pointer; text-decoration: none;
}
.textlink:hover { color: var(--ink); }

/* ---------- 正文 ---------- */
main { max-width: 1040px; margin: 0 auto; padding: 0 24px 40px; }
section { padding: 72px 0; border-top: 1px solid var(--rule); }
section:first-child { border-top: 0; }
h2 { font-size: clamp(28px, 4vw, 38px); line-height: 1.25; margin: 0 0 18px; max-width: 22em; }
.prose { max-width: 36em; }
.prose p { margin: 0 0 1.1em; }
.note { color: var(--muted); font-size: 15px; margin: 0 0 22px; max-width: 40em; }
@media (max-width: 640px) {
  .top, main { padding-left: 16px; padding-right: 16px; }
  section { padding: 52px 0; }
  body { font-size: 17px; }
}

/* 开头 */
.opening { padding-top: 56px; }
.dateline { font-family: var(--mono); font-size: 13px; color: var(--muted); letter-spacing: 0.04em; margin: 0 0 26px; text-transform: uppercase; }
.request { margin: 0 0 36px; padding: 0; }
.request p {
  font-family: var(--serif-zh); font-weight: 800; font-size: clamp(34px, 6.2vw, 64px); line-height: 1.22; margin: 0 0 14px;
  max-width: 15em;
}
html[data-lang="en"] .request p { font-family: var(--display-en); font-weight: 600; max-width: 17em; }
/* 英文页：数字、评论引文也用 Syne（中文页保持衬线） */
html[data-lang="en"] .numbers b { font-family: var(--display-en); font-weight: 700; }
html[data-lang="en"] .casebook .review { font-family: var(--display-en); font-style: normal; font-size: 18px; }
.request footer { font-size: 14px; color: var(--muted); }
.opening .prose p:first-child { font-size: 1.12em; }

/* 漏斗：三个数 + 条形 */
.numbers { display: flex; gap: 56px; flex-wrap: wrap; margin: 0 0 64px; }
.numbers div { display: flex; flex-direction: column; }
.numbers b { font-family: var(--serif-en); font-size: clamp(56px, 9vw, 96px); line-height: 1; font-weight: 700; font-variant-numeric: lining-nums; }
.numbers span { color: var(--muted); font-size: 15px; margin-top: 8px; }
.numbers .hot b { color: var(--orange); }
@media (max-width: 520px) { .numbers { gap: 28px; } }

.bars { list-style: none; margin: 0; padding: 0; max-width: 760px; display: grid; gap: 14px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) 2fr 40px; gap: 16px; align-items: center; font-size: 15.5px; }
.bars .label { color: var(--ink); }
.bars .bar { height: 10px; width: calc(var(--n) / 34 * 100%); background: var(--bar); border-radius: 0 3px 3px 0; }
.bars li:last-child .bar { background: var(--faint); }
.bars .count { font-family: var(--mono); font-size: 14px; color: var(--muted); text-align: right; }
@media (max-width: 640px) {
  .bars li { grid-template-columns: 1fr 36px; row-gap: 6px; }
  .bars .bar { grid-column: 1 / -1; grid-row: 2; }
}

/* 案例：像一本记录本 */
.casebook { list-style: none; margin: 30px 0 18px; padding: 0; counter-reset: c; max-width: 820px; }
.casebook li {
  counter-increment: c; position: relative;
  padding: 22px 0 22px 64px; border-bottom: 1px dashed var(--rule);
}
.casebook li::before {
  content: counter(c, decimal-leading-zero); position: absolute; left: 0; top: 24px;
  font-family: var(--mono); font-size: 13px; color: var(--faint);
}
.casebook p { margin: 0; }
.casebook .where { font-family: var(--mono); font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.casebook .title { font-family: var(--mono); font-size: 15px; margin-top: 4px; }
.casebook .review {
  font-family: var(--serif-en); font-style: italic; font-size: 19px; margin: 10px 0 8px; padding-left: 14px;
  border-left: 3px solid var(--orange);
}
.casebook .review span { font-family: var(--sans); font-style: normal; font-size: 16px; color: var(--muted); }
.casebook .verdict { color: var(--muted); font-size: 16px; }
@media (max-width: 640px) { .casebook li { padding-left: 40px; } }

/* 推荐的两件：两张收据 */
.picks { display: block; }
.pick {
  max-width: 640px; margin: 28px 0 0; padding: 26px 28px 24px; background: var(--tint);
  border-radius: 4px; position: relative;
}
.pick + .pick { margin-top: 22px; }
.pick header { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--mono); font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.pick .price { font-size: 18px; color: var(--ink); letter-spacing: 0; }
.pick h3 { font-size: 22px; margin: 8px 0 14px; line-height: 1.35; }
.checks { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 4px; font-size: 16px; }
.checks li { padding-left: 26px; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 2px; color: var(--orange); font-weight: 700; }
.caveat { margin: 0; padding-top: 14px; border-top: 1px dashed var(--rule); font-size: 15.5px; color: var(--muted); }

/* 用之前要知道 */
.before dl { margin: 10px 0 0; max-width: 40em; }
.before dt { font-weight: 700; margin-top: 26px; font-size: 18px; }
.before dd { margin: 4px 0 0; color: var(--muted); }

/* 等候名单 */
.notify { text-align: left; }
.notify img { border-radius: 16px; margin-bottom: 22px; }
.notify h2 { margin-bottom: 8px; }
.notify > p { color: var(--muted); margin: 0 0 22px; }
.form { display: flex; gap: 10px; flex-wrap: wrap; max-width: 520px; }
.form input[type="email"] {
  flex: 1 1 240px; min-width: 0; border: 1px solid var(--rule); background: transparent; color: var(--ink);
  border-radius: 6px; padding: 12px 14px; font: inherit; font-size: 16px; outline: none;
}
.form input[type="email"]:focus { border-color: var(--ink); }
.form button {
  border: 0; border-radius: 6px; padding: 12px 20px; font: inherit; font-size: 16px; font-weight: 600;
  background: var(--ink); color: var(--paper); cursor: pointer;
}
.form button:disabled { opacity: 0.6; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg { margin: 12px 0 0; font-size: 15px; min-height: 1.5em; color: var(--muted); }
.form-msg.ok { color: var(--orange); }

/* 页脚 */
.bottom {
  max-width: 1040px; margin: 0 auto; padding: 28px 24px 48px; border-top: 1px solid var(--rule);
  display: flex; gap: 22px; color: var(--muted); font-size: 14px;
}
.bottom a { text-decoration: none; }
.bottom a:hover { color: var(--ink); }

/* 隐私政策页 */
.doc { max-width: 760px; padding: 40px 24px 96px; margin: 0 auto; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); margin: 0 0 6px; }
.doc h2 { font-size: 22px; margin: 36px 0 10px; }
.doc p, .doc li { color: var(--muted); }
.doc .updated { color: var(--faint); font-size: 14px; }
.doc code { font-family: var(--mono); font-size: 0.9em; }
