html { scroll-padding-top: 84px; }
/* ============================================================
   TEMPLATE 03 — Gazette
   杂志报刊风:米白纸感、酒红+藏青、Playfair Display 报头。
   适用:金融 / 信用卡 / 保险 / 高 CPC 严肃决策 niche。
   字体:Playfair Display(标题)+ Source Sans 3(正文)。
   ============================================================ */

:root {
  --paper: #faf7f0;
  --paper-raised: #fffdf8;
  --ink: #1f1a14;
  --muted: #57503f;
  --faint: #6b6250;
  --burgundy: #7c2d12;
  --burgundy-deep: #5c1f0c;
  --navy: #1e3a5f;
  --gold: #a16207;
  --line: #e0d7c3;
  --line-strong: #2a2419;
  --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body); background: var(--paper); color: var(--ink); line-height: 1.7; font-size: 17px; -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-synthesis-weight: none; }
a { color: var(--burgundy); }
a:hover { color: var(--burgundy-deep); }
h1, h2, h3 {
  text-wrap: balance; font-family: var(--font-head); line-height: 1.18; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
h2 { font-size: 1.65rem; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* ---------- 报头:双线框 + 居中刊名 ---------- */
.masthead { border-bottom: 3px double var(--line-strong); background: var(--paper-raised); }
.masthead-top { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--line); }
.masthead-title { text-align: center; padding: 22px 0 14px; }
.masthead-title a { color: var(--ink); text-decoration: none; font-family: var(--font-head); font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 700; letter-spacing: 0.01em; }
.masthead-title .tagline { font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-top: 6px; }
.masthead-nav { display: flex; justify-content: center; gap: 34px; padding: 10px 0 14px; border-top: 1px solid var(--line); font-size: 0.86rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.masthead-nav a { color: var(--muted); text-decoration: none; }
.masthead-nav a:hover { color: var(--burgundy); }
@media (max-width: 720px) { .masthead-nav { flex-wrap: wrap; gap: 14px 20px; } }

/* ---------- 文章头 ---------- */
.article-head { padding: 44px 0 30px; text-align: center; border-bottom: 1px solid var(--line); position: relative; }
.article-head::after {
  content: "❦";
  position: absolute; bottom: -13px; left: 50%; transform: translateX(-50%);
  background: var(--paper); padding: 0 14px;
  color: var(--gold); font-size: 1.1rem;
}
.article-head .kicker { color: var(--burgundy); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.78rem; }
.article-head h1 { margin: 12px auto 14px; max-width: 24ch; }
.article-head .byline { color: var(--faint); font-size: 0.88rem; font-style: italic; }

/* ---------- 排名条目:报纸栏目风 ---------- */
.rank-section { padding: 36px 0; }
.rank-entry { display: grid; grid-template-columns: 110px 1fr; gap: 26px; padding: 26px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 720px) { .rank-entry { grid-template-columns: 70px 1fr; gap: 16px; } }
.rank-medal { text-align: center; }
.rank-medal .place { font-family: var(--font-head); font-size: 2.7rem; font-weight: 700; color: var(--burgundy); line-height: 1; }
.rank-medal .place-label { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-top: 6px; }
.rank-entry.first { background: var(--paper-raised); border: 1px solid var(--line); border-top: 3px solid var(--burgundy); padding: 26px; box-shadow: 0 8px 24px -16px rgba(124, 45, 18, 0.35); }
.rank-entry h3 { font-size: 1.45rem; margin-bottom: 8px; }
.rank-entry h3 .honour { color: var(--gold); font-size: 0.8rem; font-family: var(--font-body); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; margin-left: 10px; }
.rank-entry p { color: var(--muted); max-width: 68ch; }
.rank-facts { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 18px; font-size: 0.84rem; color: var(--ink); }
.rank-facts b { font-weight: 700; }
.rank-more { font-size: 0.86rem; font-weight: 600; }

/* ---------- 表格 ---------- */
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin: 24px 0; }
.compare-table th, .compare-table td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; background: var(--paper-raised); }
.compare-table th { background: var(--ink); color: var(--paper); font-family: var(--font-body); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; }
.compare-table td:first-child { font-weight: 600; }

/* ---------- 正文 ---------- */
.prose { padding: 44px 0 64px; }
.prose h2 { margin: 36px 0 14px; }
.prose p { margin-bottom: 16px; }
.dropcap::first-letter { font-family: var(--font-head); font-size: 3.4em; float: left; line-height: 0.82; padding-right: 10px; color: var(--burgundy); font-weight: 700; }
.editor-note { border-left: 4px solid var(--gold); background: var(--paper-raised); padding: 16px 20px; margin: 26px 0; font-size: 0.95rem; color: var(--muted); }

/* ---------- 页脚 ---------- */
.colophon { border-top: 3px double var(--line-strong); margin-top: 48px; padding: 30px 0 44px; background: var(--paper-raised); font-size: 0.86rem; color: var(--muted); }
.colophon-inner { display: grid; gap: 12px; }
.related-note { border-top: 1px solid var(--line); padding-top: 12px; font-size: 0.8rem; color: var(--faint); }

/* ---- R7 micro-interactions ---- */
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }
::selection { background: rgba(124, 45, 18, 0.12); }
a { text-underline-offset: 3px; }

/* ---- R8 tables ---- */
.compare-table { font-variant-numeric: tabular-nums; }
.compare-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 640px) { .compare-table { min-width: 520px; } }

/* ---- R9 badges ---- */
[class*="badge"], [class*="pill"], [class*="tag"], .chip {
  white-space: nowrap; flex-shrink: 0;
}

/* ---- R10 nav ---- */
@media (max-width: 720px) {
  .topbar-inner, .masthead-top { flex-wrap: wrap; }
}
.topnav a[aria-current="page"] { font-weight: 700; }

/* ---- R11 footer ---- */
.related-note { line-height: 1.6; max-width: 88ch; }
.back-top { position: fixed; right: 18px; bottom: 18px; z-index: 30;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(124,45,18,0.9); color: #fff;
  font-size: 1.05rem; text-decoration: none;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25); }
.back-top:hover { opacity: 1 !important; }
@media (prefers-reduced-motion: reduce) { .back-top { transition: none; } }

/* ---- R14 print specialization ---- */
body {
  background-image:
    radial-gradient(rgba(31, 26, 20, 0.025) 1px, transparent 1px);
  background-size: 3px 3px;
}
.rank-entry h3 { font-feature-settings: "liga" 1, "dlig" 1; }
.prose > p:first-of-type::first-line { font-variant: small-caps; letter-spacing: 0.02em; }
.compare-table { box-shadow: 0 1px 0 var(--line-strong), 0 -1px 0 var(--line-strong); }

/* ---- R15 responsive ---- */
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  html { scroll-padding-top: 72px; }
}

/* ---- R16 a11y ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: #fff; color: #111; padding: 10px 18px; border-radius: 8px;
  font-weight: 700; box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.skip-link:focus { left: 8px; }

/* ---- Motion layer (R1) : transform/opacity only ---- */
[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; }
@media (prefers-reduced-motion: reduce) {
  [data-animate] { opacity: 1; transform: none; transition: none; }
}

/* R5: arrow nudge on hover */
.col-link a::after, .score-cta::after, .rank-more a::after { display: inline-block; transition: transform 0.2s ease; }
.col-link a:hover::after, .score-cta:hover::after, .rank-more a:hover::after { transform: translateX(4px); }
a[class*="cta"]::after, .r-score a::after { content: none; }
.r-score a::after { content: " →"; display: inline-block; transition: transform 0.2s ease; }
.r-score a:hover::after { transform: translateX(4px); }

/* R6: scrolled header shadow */
.topbar.scrolled, .masthead.scrolled { box-shadow: 0 6px 24px -10px rgba(10, 15, 30, 0.28); transition: box-shadow 0.25s ease; }
.topbar, .masthead { transition: box-shadow 0.25s ease; }

/* R9: print motion */
.article-head::after { opacity: 0; transform: translateX(-50%) rotate(-90deg) scale(0.6); animation: fleuron 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s forwards; }
@keyframes fleuron { to { opacity: 1; transform: translateX(-50%) rotate(0deg) scale(1); } }
.masthead-title a { animation: inkIn 0.8s ease backwards; }
@keyframes inkIn { from { opacity: 0; filter: blur(3px); } to { opacity: 1; filter: blur(0); } }
.rank-medal .place { transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.rank-entry:hover .rank-medal .place { transform: scale(1.12); }
@media (prefers-reduced-motion: reduce) {
  .article-head::after { animation: none; opacity: 1; transform: translateX(-50%); }
  .masthead-title a { animation: none; }
}

/* 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 */
.article-head .kicker, .article-head h1, .article-head .byline { animation: heroRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.article-head .kicker, .article-head h1, .article-head .byline { animation-delay: 0.15s; }
@media (prefers-reduced-motion: reduce) { .article-head .kicker, .article-head h1, .article-head .byline { animation: none; } }

/* R5 hover inner response */
.rank-entry:hover .rank-medal .place { transform: scale(1.1); } .rank-medal .place { 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: #7c2d1255; border-radius: 5px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #7c2d12; border: 2px solid transparent; background-clip: content-box; }

/* R8 touch feedback */
.rank-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 */
.masthead-nav a[aria-current='page'] { color: var(--burgundy); border-bottom: 2px solid var(--gold); padding-bottom: 2px; }
