:root {
  --ink: #12161c;
  --ink-2: #2a313b;
  --muted: #5f6a76;
  --faint: #8b949e;
  --paper: #fbf9f5;
  --card: #ffffff;
  --line: #e5e0d6;
  --line-2: #d5cec0;
  --accent: #c8102e;
  --accent-dark: #9d0c23;
  --navy: #0e2233;
  --teal: #0e6b63;
  --teal-bg: #edf5f3;
  --radius: 3px;
  --wrap: 1180px;
  --sans: "PingFang HK", "PingFang TC", "Hiragino Sans", "Microsoft JhengHei", "Noto Sans TC",
    system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Songti TC", "Noto Serif TC", "Source Han Serif TC", Georgia, serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: 10px 16px; z-index: 99;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------------- header ---------------- */

.topbar { background: var(--navy); color: #cfd8e0; font-size: 12.5px; letter-spacing: 0.02em; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.topbar-note { color: #93a3b1; }
.topbar-note a { color: #93a3b1; }
.topbar-note a:hover { color: #fff; }
.topbar-note i { font-style: normal; opacity: 0.45; margin: 0 7px; }

.masthead { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding-top: 26px; padding-bottom: 20px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid; place-items: center; width: 46px; height: 46px; background: var(--accent); color: #fff;
  font-weight: 800; font-size: 19px; letter-spacing: 0.02em; border-radius: 2px;
}
.brand-text { font-size: 30px; font-weight: 800; letter-spacing: 0.04em; line-height: 1; display: flex; flex-direction: column; gap: 6px; }
.brand-text em {
  font-style: normal; font-size: 10px; font-weight: 600; letter-spacing: 0.22em; color: var(--muted);
}
.brand-sm .brand-mark { width: 36px; height: 36px; font-size: 15px; }
.brand-sm .brand-text { font-size: 22px; color: #fff; }
.brand:hover { color: inherit; }

.masthead-right { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.tagline { margin: 0; color: var(--muted); font-size: 13.5px; letter-spacing: 0.06em; }
.search-mini { display: flex; align-items: center; border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 4px 6px 4px 14px; }
.search-mini input { border: 0; outline: 0; width: 210px; font-size: 13px; background: transparent; color: var(--ink); }
.search-mini button { border: 0; background: var(--navy); color: #fff; width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; }
.search-mini button:hover { background: var(--accent); }

.nav { border-top: 1px solid var(--line); border-bottom: 3px solid var(--ink); background: #fff; }
.nav-in { display: flex; gap: 30px; align-items: center; height: 48px; font-size: 14.5px; font-weight: 600; letter-spacing: 0.06em; }
.nav-in a { position: relative; height: 48px; display: inline-flex; align-items: center; }
.nav-in a.active { color: var(--accent); }
.nav-in a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--accent); }
.nav-about { margin-left: auto; color: var(--muted); font-weight: 500; }

/* ---------------- lead ---------------- */

.lead { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(280px, 1fr); gap: 40px; padding-top: 34px; padding-bottom: 10px; }

.hero-card { display: block; }
.hero-media { display: block; overflow: hidden; background: #e9e4da; border-radius: var(--radius); }
.hero-media img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; transition: transform 0.5s ease; }
.hero-card:hover .hero-media img { transform: scale(1.02); }
.hero-body { padding-top: 18px; }
.hero-body h2 { font-size: clamp(26px, 3vw, 38px); line-height: 1.28; margin: 10px 0 12px; letter-spacing: -0.01em; }
.hero-body .dek { color: var(--muted); font-size: 16px; margin: 0 0 12px; line-height: 1.75; }

.kicker {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.18em; color: var(--accent);
  text-transform: uppercase;
}

.meta-line { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 12.5px; }
.meta-line .dot { opacity: 0.6; }

.img-fallback {
  aspect-ratio: 16 / 9; display: grid; place-items: center;
  background: linear-gradient(135deg, #0e2233 0%, #16394f 60%, #0e6b63 100%);
  color: rgba(255, 255, 255, 0.9); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
}

.lead-side { border-left: 1px solid var(--line); padding-left: 32px; display: flex; flex-direction: column; gap: 22px; }
.side-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.side-head h2 { margin: 0; font-size: 15px; letter-spacing: 0.12em; }
.live-dot { font-size: 10px; letter-spacing: 0.16em; color: var(--accent); font-weight: 700; }
.live-dot::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 1px; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-row { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rank-row:last-child { border-bottom: 0; }
.rank-num { font-family: var(--serif); font-size: 22px; color: var(--line-2); font-weight: 700; line-height: 1.3; min-width: 30px; }
.rank-row a { font-size: 14.5px; font-weight: 600; line-height: 1.55; }
.rank-meta { display: block; color: var(--faint); font-size: 11.5px; margin-top: 4px; letter-spacing: 0.02em; }

.brief-box { background: var(--navy); color: #e8eef3; padding: 20px; border-radius: var(--radius); }
.brief-box p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.65; color: #c3ced8; }
.brief-k { color: #fff !important; font-weight: 700; letter-spacing: 0.14em; font-size: 11px !important; text-transform: uppercase; }
.btn-ghost { display: inline-block; border: 1px solid rgba(255, 255, 255, 0.35); color: #fff; padding: 6px 12px; font-size: 12.5px; border-radius: 2px; }
.btn-ghost:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------------- sections ---------------- */

.section { padding-top: 44px; padding-bottom: 44px; }
.section-head { display: flex; align-items: baseline; gap: 16px; border-bottom: 3px solid var(--ink); padding-bottom: 10px; margin-bottom: 26px; }
.section-head h2 { margin: 0; font-size: 22px; letter-spacing: 0.06em; }
.section-head h2::before { content: ""; display: inline-block; width: 8px; height: 18px; background: var(--accent); margin-right: 10px; vertical-align: -2px; }
.section-head p { margin: 0; color: var(--muted); font-size: 13px; }
.section-head .more { margin-left: auto; font-size: 13px; color: var(--muted); }
.section-head .more:hover { color: var(--accent); }

.band { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.grid { display: grid; gap: 30px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.post-card { background: transparent; }
.card-media { display: block; overflow: hidden; background: #ece7dd; border-radius: var(--radius); }
.card-media img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; transition: transform 0.45s ease; }
.post-card:hover .card-media img { transform: scale(1.03); }
.card-body { padding-top: 12px; }
.card-body h3 { margin: 8px 0 8px; font-size: 18px; line-height: 1.5; font-weight: 700; }
.card-body .dek { margin: 0 0 10px; color: var(--muted); font-size: 13.5px; line-height: 1.65; }

.stack { display: flex; flex-direction: column; }
.row-card { display: grid; grid-template-columns: 150px 1fr; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.row-card:first-child { padding-top: 0; }
.row-thumb { display: block; overflow: hidden; background: #ece7dd; border-radius: 2px; }
.row-thumb img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; height: 100%; }
.row-body h3 { margin: 6px 0 8px; font-size: 16.5px; line-height: 1.5; }

.two-col { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(260px, 1fr); gap: 44px; }
.popular-box h2 { font-size: 16px; letter-spacing: 0.1em; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin: 0 0 6px; }
.rank-plain .rank-num { font-size: 18px; }

/* ---------------- article ---------------- */

.article-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; padding-top: 34px; padding-bottom: 60px; }
.article { max-width: 760px; }
.crumbs { font-size: 12.5px; color: var(--faint); display: flex; gap: 8px; margin-bottom: 18px; }
.crumbs a:hover { color: var(--accent); }

.article-head h1 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.3; margin: 10px 0 14px; letter-spacing: -0.015em; }
.article-dek { font-size: 18px; line-height: 1.7; color: var(--ink-2); margin: 0 0 18px; }
.byline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; }
.byline-author { font-weight: 700; color: var(--ink); }
.updated { font-size: 12px; color: var(--faint); margin: 8px 0 0; }

.article-hero { margin: 26px 0; }
.article-hero img { border-radius: var(--radius); width: 100%; }
.article-hero figcaption { font-size: 12px; color: var(--faint); margin-top: 8px; line-height: 1.6; }

.prose { font-size: 18px; line-height: 1.95; color: #1b2027; }
.prose > p:first-of-type::first-letter { font-size: 1em; }
.prose p { margin: 0 0 22px; }
.prose h2 { font-size: 24px; line-height: 1.45; margin: 44px 0 16px; padding-left: 14px; border-left: 5px solid var(--accent); letter-spacing: 0.01em; }
.prose h3 { font-size: 19px; margin: 32px 0 12px; }
.prose ul, .prose ol { margin: 0 0 22px; padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose blockquote { margin: 26px 0; padding: 16px 20px; background: #fff; border-left: 3px solid var(--teal); color: var(--ink-2); font-size: 16.5px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose strong { font-weight: 700; }
.prose img { margin: 26px auto; border-radius: var(--radius); }
.prose code { background: #efeae0; padding: 2px 5px; border-radius: 2px; font-size: 0.88em; }
.prose pre { background: var(--navy); color: #e6edf3; padding: 18px; overflow-x: auto; border-radius: var(--radius); font-size: 14px; line-height: 1.6; }
.prose pre code { background: transparent; padding: 0; color: inherit; }
.table-wrap { overflow-x: auto; margin: 26px 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; background: #fff; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose th { background: #f3efe7; font-weight: 700; }

.hk-box { margin: 40px 0; background: var(--teal-bg); border-left: 5px solid var(--teal); padding: 22px 26px; border-radius: 0 var(--radius) var(--radius) 0; }
.hk-box h2 { font-size: 17px; margin: 0 0 12px; color: var(--teal); letter-spacing: 0.06em; display: flex; align-items: center; gap: 10px; }
.hk-box h2 span { background: var(--teal); color: #fff; font-size: 10px; padding: 2px 6px; letter-spacing: 0.14em; border-radius: 2px; }
.hk-box p { margin: 0 0 12px; font-size: 15.5px; line-height: 1.85; }
.hk-box p:last-child { margin-bottom: 0; }

.faq-block { margin: 40px 0; border-top: 2px solid var(--ink); padding-top: 20px; }
.faq-block h2 { font-size: 20px; margin: 0 0 14px; }
.faq-block details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq-block summary { cursor: pointer; font-weight: 600; font-size: 15.5px; }
.faq-block details p { margin: 10px 0 0; color: var(--muted); font-size: 15px; line-height: 1.8; }

.sources { margin: 36px 0; background: #fff; border: 1px solid var(--line); padding: 18px 22px; }
.sources h2 { font-size: 14px; margin: 0 0 10px; letter-spacing: 0.1em; color: var(--muted); }
.sources ol { margin: 0; padding-left: 20px; font-size: 13px; color: var(--muted); }
.sources li { margin-bottom: 6px; word-break: break-all; }
.sources a { text-decoration: underline; text-underline-offset: 2px; }

.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 26px 0; }
.tag-list a, .tag-list span { display: inline-block; border: 1px solid var(--line-2); padding: 4px 10px; font-size: 12.5px; color: var(--muted); border-radius: 999px; }
.tag-list a:hover { border-color: var(--accent); color: var(--accent); }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; font-size: 13px; color: var(--muted); }
.share a, .share button { border: 1px solid var(--line-2); background: #fff; padding: 4px 12px; font-size: 12.5px; color: var(--ink-2); border-radius: 999px; }
.share a:hover, .share button:hover { border-color: var(--accent); color: var(--accent); }

.editorial-note { margin: 26px 0; background: #f4f0e8; padding: 16px 20px; font-size: 13px; color: var(--muted); line-height: 1.75; }
.editorial-note strong { color: var(--ink); display: block; margin-bottom: 4px; }
.editorial-note p { margin: 0; }
.editorial-note a { text-decoration: underline; }

.related { margin-top: 46px; }
.related h2 { font-size: 20px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 22px; }

.article-side { position: relative; }
.toc { position: sticky; top: 20px; background: #fff; border: 1px solid var(--line); padding: 18px 20px; margin-bottom: 26px; }
.toc h2 { font-size: 13px; letter-spacing: 0.14em; margin: 0 0 10px; color: var(--muted); }
.toc ol { margin: 0; padding-left: 16px; font-size: 13px; line-height: 1.7; }
.toc li { margin-bottom: 7px; }
.toc a { color: var(--ink-2); }
.side-cta { background: #fff; border: 1px solid var(--line); padding: 18px 20px; font-size: 13.5px; color: var(--muted); }
.side-cta .brief-k { color: var(--ink) !important; }

.toc-mobile { display: none; margin: 20px 0; border: 1px solid var(--line); background: #fff; padding: 12px 16px; font-size: 14px; }
.toc-mobile summary { cursor: pointer; font-weight: 600; }
.toc-mobile ol { padding-left: 18px; font-size: 13.5px; }

/* ---------------- page / list ---------------- */

.page-hero { background: #fff; border-bottom: 1px solid var(--line); padding: 40px 0 30px; }
.page-hero h1 { margin: 0 0 8px; font-size: clamp(28px, 3.4vw, 40px); }
.page-hero p { margin: 0; color: var(--muted); }
.page-updated { color: var(--faint); font-size: 12.5px; margin-top: -4px; }

.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 40px; border-top: 1px solid var(--line); padding-top: 20px; font-size: 14px; }
.pager a { border: 1px solid var(--line-2); padding: 8px 16px; background: #fff; }
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.pager .disabled { color: var(--faint); border: 1px solid var(--line); padding: 8px 16px; }
.pager-now { color: var(--muted); font-size: 13px; }

.empty { background: #fff; border: 1px dashed var(--line-2); padding: 40px; text-align: center; color: var(--muted); }

.search-big { display: flex; gap: 10px; max-width: 680px; margin-bottom: 30px; }
.search-big input { flex: 1; border: 1px solid var(--line-2); background: #fff; padding: 12px 16px; font-size: 15px; outline: none; }
.search-big input:focus { border-color: var(--navy); }
.search-big button { background: var(--navy); color: #fff; border: 0; padding: 0 24px; font-size: 14px; }
.result-count { color: var(--muted); font-size: 13.5px; }
.hint-box { background: #fff; border: 1px solid var(--line); padding: 24px; }
.hint-box h2 { margin: 0 0 12px; font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips a { border: 1px solid var(--line-2); padding: 6px 14px; font-size: 13px; border-radius: 999px; }
.chips a:hover { border-color: var(--accent); color: var(--accent); }

.static-prose { font-size: 16.5px; }
.static-prose h2 { font-size: 21px; }
.static-prose p { margin-bottom: 18px; }
.static-prose ul { margin-bottom: 18px; }

/* ---------------- footer ---------------- */

.site-foot { background: var(--navy); color: #aebbc6; margin-top: 40px; padding: 46px 0 20px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.foot-brand p { font-size: 13px; line-height: 1.8; margin: 14px 0 0; }
.foot-note { color: #7f909e; font-size: 12px !important; }
.foot-col h4 { color: #fff; font-size: 12px; letter-spacing: 0.16em; margin: 0 0 14px; text-transform: uppercase; }
.foot-col a { display: block; font-size: 13.5px; padding: 4px 0; color: #aebbc6; }
.foot-col a:hover { color: #fff; }
.foot-bottom { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 36px; padding-top: 18px; font-size: 12px; color: #7f909e; }

/* ---------------- ad ---------------- */

.ad-slot { margin: 32px 0; text-align: center; min-height: 90px; }
.ad-label { display: block; font-size: 10px; letter-spacing: 0.2em; color: var(--faint); margin-bottom: 6px; }

/* ---------------- responsive ---------------- */

@media (max-width: 1020px) {
  .lead { grid-template-columns: 1fr; gap: 30px; }
  .lead-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 24px; }
  .article-wrap { grid-template-columns: 1fr; gap: 30px; }
  .article-side { display: none; }
  .toc-mobile { display: block; }
  .two-col { grid-template-columns: 1fr; gap: 30px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .wrap { padding: 0 18px; }
  .topbar-in { height: 28px; }
  .topbar-note { display: none; }
  .masthead { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 12px; padding-bottom: 12px; }
  .brand-mark { width: 38px; height: 38px; font-size: 16px; }
  .brand-text { font-size: 23px; gap: 4px; }
  .brand-text em { font-size: 8px; letter-spacing: 0.18em; }
  .search-mini { padding: 3px 4px 3px 12px; }
  .masthead-right { align-items: flex-start; width: 100%; }
  .search-mini { width: 100%; }
  .search-mini input { width: 100%; }
  .tagline { display: none; }
  .nav-in { gap: 18px; overflow-x: auto; height: 44px; font-size: 13.5px; white-space: nowrap; }
  .nav-in a { height: 44px; }
  .nav-about { display: none; }
  .grid-3 { grid-template-columns: 1fr; gap: 26px; }
  .section { padding-top: 32px; padding-bottom: 32px; }
  .hero-body h2 { font-size: 24px; }
  .prose { font-size: 17px; line-height: 1.9; }
  .prose h2 { font-size: 21px; }
  .row-card { grid-template-columns: 110px 1fr; gap: 14px; }
  .foot-grid { grid-template-columns: 1fr; gap: 26px; }
  .foot-bottom { flex-direction: column; }
  .share { gap: 8px; }
}


/* archive */
.archive-group { margin-bottom: 34px; }
.archive-group h2 { font-size: 15px; letter-spacing: 0.14em; color: var(--muted); border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-list li { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.archive-list a { font-weight: 600; }
.archive-list span { color: var(--faint); font-size: 12px; white-space: nowrap; }
@media (max-width: 760px) { .archive-list li { flex-direction: column; gap: 4px; } }

/* ---------------- cookie consent ---------------- */

.consent {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(16px);
  width: min(940px, calc(100% - 32px));
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  box-shadow: 0 18px 50px rgba(14, 34, 51, 0.18);
  padding: 18px 22px;
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
  z-index: 90;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.consent.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.consent-copy { min-width: 0; flex: 1 1 auto; }
.consent h2 { margin: 0; font-size: 15px; letter-spacing: 0.04em; }
.consent p { margin: 5px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.consent p a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.consent-actions { display: flex; gap: 8px; flex-shrink: 0; }
.c-btn { border-radius: 2px; padding: 9px 16px; font-size: 13px; cursor: pointer; border: 1px solid transparent; }
.c-primary { background: var(--navy); color: #fff; }
.c-primary:hover { background: var(--accent); }
.c-ghost { background: #fff; border-color: var(--line-2); color: var(--ink-2); }
.c-ghost:hover { border-color: var(--accent); color: var(--accent); }
.c-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 760px) {
  .consent { flex-direction: column; align-items: stretch; gap: 14px; bottom: 0; width: 100%; padding: 16px 18px 20px; border-left: 0; border-right: 0; border-bottom: 0; }
  .consent-actions { width: 100%; }
  .consent-actions .c-btn { flex: 1; }
  .consent h2 { font-size: 14px; }
}
