/* ============================================================
   TEMPLATE 07 — FT Mercury
   金融鲑鱼纸 #fff1e5、深墨 #33302e、claret #990f3d、teal 链接。
   适用:金融 / 信用卡 / 保险 / crypto 等严肃决策 niche。
   字体:Newsreader(display serif)+ Archivo(body)。
   ============================================================ */

:root {
  --paper: #fff1e5;
  --paper-raised: #fff9f4;
  --ink: #33302e;
  --muted: #666059;
  --faint: #6e675e;
  --claret: #990f3d;
  --claret-deep: #77092e;
  --teal: #0d7680;
  --teal-tint: #e6f0ef;
  --line: #e0d2c4;
  --line-strong: #ccc3b8;
  --font-head: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-padding-top: 76px; }
body {
  font-family: var(--font-body); background: var(--paper); color: var(--ink);
  line-height: 1.66; font-size: 17px; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--claret); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 500; line-height: 1.18; letter-spacing: -0.005em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h2 { font-size: 1.7rem; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* ---------- 顶栏:报系风,claret 细条 ---------- */
.topbar { background: var(--paper-raised); border-bottom: 2px solid var(--ink); }
.topbar::before { content: ""; display: block; height: 4px; background: var(--claret); }
.topbar-inner { display: flex; justify-content: space-between; align-items: baseline; padding: 13px 0; }
.brand { font-family: var(--font-head); font-size: 1.5rem; font-weight: 600; color: var(--ink); font-style: italic; }
.brand:hover { color: var(--claret); }
.topnav { display: flex; gap: 22px; font-size: 0.86rem; font-weight: 500; }
.topnav a { color: var(--muted); }
.topnav a:hover { color: var(--claret); }
@media (max-width: 720px) { .topnav { display: none; } }

/* ---------- 日期行(报系仪式) ---------- */
.dateline { border-bottom: 1px solid var(--line); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.dateline-inner { display: flex; justify-content: space-between; padding: 7px 0; }

/* ---------- 文章头 ---------- */
.article-head { padding: 40px 0 26px; border-bottom: 1px solid var(--line-strong); }
.kicker { color: var(--claret); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 12px; }
.article-head h1 { max-width: 26ch; }
.article-head .standfirst { font-family: var(--font-head); font-size: 1.25rem; color: var(--muted); max-width: 58ch; margin-top: 12px; font-style: italic; }
.byline { margin-top: 16px; font-size: 0.85rem; color: var(--faint); }
.byline b { color: var(--ink); font-weight: 600; }

/* ---------- 排名条目:报系列表,左侧粗 claret 序号 ---------- */
.leaderboard { padding: 10px 0 30px; }
.l-entry { display: grid; grid-template-columns: 96px 1fr 168px; gap: 22px; padding: 24px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 860px) { .l-entry { grid-template-columns: 64px 1fr; } .l-entry .l-score { grid-column: 2; } }
.l-rank { font-family: var(--font-head); font-size: 3rem; font-weight: 600; color: var(--claret); line-height: 1; }
.l-body h3 { font-size: 1.45rem; margin-bottom: 6px; }
.l-body h3 .tag { font-family: var(--font-body); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--paper-raised); background: var(--teal); padding: 3px 10px; margin-left: 10px; vertical-align: 3px; }
.l-body p { color: var(--muted); font-size: 0.97rem; max-width: 66ch; }
.l-facts { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.84rem; }
.l-facts span { color: var(--faint); }
.l-facts b { color: var(--ink); font-weight: 600; }
.l-score { text-align: right; font-family: var(--font-head); }
.l-score .big { font-size: 2.3rem; color: var(--ink); line-height: 1; }
.l-score .lbl { font-family: var(--font-body); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.l-score a { display: inline-block; margin-top: 8px; font-family: var(--font-body); font-size: 0.84rem; font-weight: 600; }

/* ---------- 表格 ---------- */
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin: 24px 0; font-variant-numeric: tabular-nums; }
.compare-table th, .compare-table td { border-bottom: 1px solid var(--line); padding: 11px 14px; text-align: left; }
.compare-table th { border-bottom: 2px solid var(--ink); font-family: var(--font-body); font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--claret); }
.compare-table td:first-child { font-weight: 500; }

/* ---------- 正文 ---------- */
.prose { padding: 42px 0 60px; }
.prose h2 { margin: 36px 0 14px; }
.prose p { margin-bottom: 16px; }
.pull-quote { border-left: 3px solid var(--claret); padding: 6px 0 6px 20px; margin: 28px 0; font-family: var(--font-head); font-size: 1.35rem; font-style: italic; color: var(--ink); }
.note-box { background: var(--teal-tint); padding: 18px 22px; margin: 26px 0; font-size: 0.95rem; }
.note-box .n-label { font-weight: 600; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); margin-bottom: 6px; }

/* ---------- 页脚 ---------- */
.footer { background: var(--ink); color: #cfc8bf; margin-top: 48px; font-size: 0.86rem; }
.footer-inner { padding: 34px 0; display: grid; gap: 12px; }
.footer a { color: #efe6dc; }
.related-note { border-top: 1px solid #4d4741; padding-top: 12px; font-size: 0.8rem; color: #a89f94; }

/* ---- micro-interactions / a11y / motion ---- */
:focus-visible { outline: 2px solid var(--claret); outline-offset: 3px; }
::selection { background: rgba(153, 15, 61, 0.15); }
a { text-underline-offset: 3px; }
.back-top { position: fixed; right: 18px; bottom: 18px; z-index: 30; width: 42px; height: 42px; border-radius: 0;
  display: grid; place-items: center; background: var(--claret); color: #fff; font-size: 1.05rem;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 18px; font-weight: 600; }
.skip-link:focus { left: 8px; }
[data-animate] { opacity: 0; transform: translateY(14px); transition: opacity 0.65s cubic-bezier(0.22,1,0.36,1), transform 0.65s cubic-bezier(0.22,1,0.36,1); transition-delay: inherit; will-change: opacity, transform; }
[data-animate].in { opacity: 1; transform: none; }
.l-score a::after { content: " →"; display: inline-block; transition: transform 0.2s ease; }
.l-score a:hover::after { transform: translateX(4px); }
.topbar.scrolled { box-shadow: 0 6px 24px -10px rgba(51, 48, 46, 0.35); }
.topbar { transition: box-shadow 0.25s ease; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  [data-animate] { opacity: 1; transform: none; transition: none; }
}

/* R3 hero specialization */
.topbar::before { transform: scaleX(0); transform-origin: left; animation: rulein 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards; }
@keyframes rulein { to { transform: scaleX(1); } }
.article-head h1 { animation: headlinein 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s backwards; }
@keyframes headlinein { from { opacity: 0; transform: translateY(10px); } }
.standfirst { animation: headlinein 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.35s backwards; }
@media (prefers-reduced-motion: reduce) { .topbar::before, .article-head h1, .standfirst { animation: none; transform: none; opacity: 1; } }

/* R8 score underline growth */
.l-score .big { position: relative; display: inline-block; margin-bottom: 8px; }
.l-score .big::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--claret); transform: scaleX(0); transform-origin: right;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.35s; }
[data-animate].in .l-score .big::after, .in .l-score .big::after { transform: scaleX(1); }

/* R9 tables on narrow screens */
@media (max-width: 640px) {
  .compare-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .compare-table tbody { display: table; width: 100%; min-width: 480px; }
}

/* R10 mobile rhythm */
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .sheet { padding: 28px 22px; }
  .hero { padding-top: 48px; }
}

/* R12 hover signature */
.l-entry { transition: background 0.2s ease; }
.l-entry:hover { background: var(--paper-raised); }
.l-entry:hover .l-rank { font-style: italic; transition: font-style 0s; }

/* R1 typography features */
body { font-feature-settings: "kern" 1, "liga" 1, "calt" 1; -webkit-tap-highlight-color: transparent; }

/* R2 editorial measure */
.prose p { text-wrap: pretty; orphans: 3; widows: 3; }
.prose { hyphens: auto; }

/* R4 hero load sequence */
.dateline { animation: heroRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.dateline { animation-delay: 0.15s; }
@media (prefers-reduced-motion: reduce) { .dateline { animation: none; } }

/* R5 hover inner response */
.l-entry:hover .l-rank { transform: translateX(3px); } .l-rank { transition: transform 0.25s ease; }

/* R6 prose link underline grow */
.prose p a {
  background: linear-gradient(currentColor, currentColor) bottom left / 0% 1px no-repeat;
  transition: background-size 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  padding-bottom: 2px;
}
.prose p a:hover { background-size: 100% 1px; }

/* R7 themed scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #990f3d55; border-radius: 5px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #990f3d; border: 2px solid transparent; background-clip: content-box; }

/* R8 touch feedback */
.l-entry:active { transform: scale(0.995); }

/* R9 back-top smooth elevator */
.back-top { transform: translateY(10px); transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.back-top[style*="opacity: 1"], .back-top:hover { transform: translateY(0); }
.back-top:active { transform: translateY(2px); }

/* R4b keyframes */
@keyframes heroRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* R3 footer two-column */
@media (min-width: 860px) {
  .footer-inner { grid-template-columns: 1fr auto; align-items: start; }
  .footer-inner > div:first-child { order: 1; }
  .related-note { order: 2; max-width: 56ch; border-top: 0; padding-top: 0; text-align: right; }
}

/* R4 current page nav state */
.topnav a[aria-current='page'] { color: var(--claret); border-bottom: 2px solid var(--claret); }
