:root {
  /* 與 IG 圖卡同一套語言：冷灰紙面、深墨藍、單一藍色強調；大號襯線標題是唯一的張力，其餘安靜。三黨同一樣式，不用政黨色。 */
  --ground: #eef1f4;
  --surface: #ffffff;
  --ink: #15202b;
  --muted: #4a5866;
  --line: #c9d1d9;
  --accent: #1f4e79;
  --ok: #2f6b4f;
  --band: #15202b;
  --band-ink: #eef1f4;
  --band-muted: #a9b6c2;
  --band-accent: #8fb8d6;
  --display: "Noto Serif TC", "Songti TC", serif;
  --body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #12181e; --surface: #1a2229; --ink: #e8edf1; --muted: #a3b0bc;
    --line: #2c3742; --accent: #8fb8d6; --ok: #8cc5a6;
    --band: #0b1015; --band-ink: #e8edf1; --band-muted: #93a1ae; --band-accent: #8fb8d6;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #12181e; --surface: #1a2229; --ink: #e8edf1; --muted: #a3b0bc;
  --line: #2c3742; --accent: #8fb8d6; --ok: #8cc5a6;
  --band: #0b1015; --band-ink: #e8edf1; --band-muted: #93a1ae; --band-accent: #8fb8d6;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.8; }
a { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }

.shell { max-width: 1040px; margin: 0 auto; padding-inline: 20px; }

/* 章節標記：與圖卡上的「— 1 / 5」相同 */
.marker { display: flex; align-items: center; gap: 12px; font-size: .85rem; font-weight: 500; letter-spacing: .2em; color: var(--muted); }
.marker::before { content: ""; width: 36px; height: 4px; background: var(--accent); }

/* 頂部導覽 */
.topnav { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--ground) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topnav .shell { display: flex; gap: 6px; overflow-x: auto; padding-block: 10px; scrollbar-width: none; }
.topnav a { flex: none; font-size: .88rem; text-decoration: none; color: var(--ink); padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.topnav a:hover { border-color: var(--accent); color: var(--accent); }

/* Hero：唯一放大的地方 */
.hero { padding-block: 72px 56px; display: grid; gap: 40px; }
.hero .lede { font-size: 1.15rem; color: var(--muted); }
.hero h1 { font-family: var(--display); font-weight: 900; font-size: clamp(2.6rem, 8.5vw, 5.4rem); line-height: 1.22; letter-spacing: -.01em; }
.qpair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.q { background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 26px 28px; display: grid; gap: 8px; align-content: start; }
.q b { font-size: .85rem; letter-spacing: .15em; color: var(--accent); }
.q p { font-family: var(--display); font-weight: 600; font-size: clamp(1.3rem, 3.2vw, 1.75rem); line-height: 1.45; }
.hero .after { font-size: 1.1rem; max-width: 60ch; }
.hero .meta { font-size: .88rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* 一般章節 */
.chapter { padding-block: 64px; border-top: 3px solid var(--ink); display: grid; gap: 28px; }
.chapter > header { display: grid; gap: 14px; }
.chapter h2 { font-family: var(--display); font-weight: 900; font-size: clamp(1.9rem, 5vw, 2.8rem); line-height: 1.3; }
.chapter .intro { color: var(--muted); max-width: 62ch; font-size: 1.05rem; }

/* 背景事實：共諜長條 */
.stat-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 26px 28px; display: grid; gap: 14px; align-content: start; }
.panel h3 { font-size: 1rem; font-weight: 700; }
.big { font-family: var(--display); font-weight: 900; font-size: clamp(2.2rem, 6vw, 3.2rem); line-height: 1.1; font-variant-numeric: tabular-nums; }
.bars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: end; height: 190px; padding-top: 10px; border-bottom: 1px solid var(--line); }
.bar { display: grid; justify-items: center; align-content: end; gap: 6px; height: 100%; }
.bar span { font-size: .9rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar i { display: block; width: 100%; max-width: 54px; background: var(--line); border-radius: 6px 6px 0 0; }
.bar.hi i { background: var(--accent); }
.years { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; text-align: center; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.small { font-size: .85rem; color: var(--muted); }
.stack { display: grid; gap: 16px; }

/* 交流三層 */
.layers { display: grid; gap: 14px; counter-reset: layer; }
.layer { background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 24px 28px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 20px; align-items: center; }
.layer .n { font-family: var(--display); font-weight: 900; font-size: 2.6rem; line-height: 1; color: var(--accent); grid-row: span 2; }
.layer h3 { font-size: 1.25rem; font-weight: 700; }
.layer > .layer-body { grid-column: 1 / 3; display: grid; gap: 12px; }
.pill { justify-self: end; font-size: .82rem; font-weight: 700; border: 2px solid var(--accent); color: var(--accent); border-radius: 999px; padding: 2px 14px; white-space: nowrap; }
.pill.ok { border-color: var(--ok); color: var(--ok); }
.callout { background: var(--band); color: var(--band-ink); border-radius: 14px; padding: 26px 28px; font-size: 1.1rem; font-weight: 500; }

/* 議題對照 */
.issue { display: grid; gap: 14px; }
.issue + .issue { margin-top: 28px; }
.issue-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.issue-head h3 { font-family: var(--display); font-weight: 900; font-size: 1.6rem; }
.issue-head span { color: var(--muted); }
.parties { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.party { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; display: grid; gap: 12px; align-content: start; }
.party header { display: grid; gap: 4px; }
.party h4 { margin: 0; font-size: 1.2rem; }
.party .stance { font-size: .85rem; font-weight: 700; color: var(--accent); }
.party dl { margin: 0; display: grid; gap: 10px; }
.party dt { font-size: .78rem; letter-spacing: .1em; color: var(--muted); }
.party dd { margin: 0; font-size: .96rem; line-height: 1.7; }
.party.na { border-style: dashed; }
.common { font-size: .95rem; color: var(--muted); padding-left: 16px; border-left: 3px solid var(--line); }
sup a { text-decoration: none; font-size: .7em; padding-inline: 1px; }

/* 總結 */
.summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.summary div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; display: grid; gap: 6px; }
.summary strong { font-family: var(--display); font-size: 1.3rem; }


/* 名詞說明彈窗 */
.term { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline dotted; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--accent); }
.quote .term { text-decoration-color: var(--band-accent); }
.term:hover { color: var(--accent); }
.quote .term:hover { color: var(--band-accent); }
.term:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.gloss { border: 1px solid var(--line); border-radius: 16px; padding: 0; width: min(520px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgba(10, 20, 30, .25); }
.gloss::backdrop { background: rgba(10, 16, 22, .55); }
.gloss-body { padding: 28px 28px 24px; display: grid; gap: 16px; }
.gloss-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.gloss-id { display: grid; gap: 10px; }
.gloss-side { display: flex; align-items: center; gap: 12px; font-size: .85rem; font-weight: 700; letter-spacing: .08em; color: var(--muted); }
.gloss-flag { display: inline-flex; line-height: 0; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.gloss-flag svg { display: block; width: 60px; height: 40px; }
.gloss h2 { font-family: var(--display); font-weight: 900; font-size: 1.8rem; line-height: 1.2; }
.gloss .full { color: var(--muted); font-size: .92rem; margin-top: 6px; }
.gloss dl { margin: 0; display: grid; gap: 12px; }
.gloss dt { font-size: .78rem; letter-spacing: .1em; color: var(--accent); font-weight: 700; }
.gloss dd { margin: 2px 0 0; font-size: .97rem; line-height: 1.75; }
.gloss .note { font-size: .88rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.gloss-close { flex: none; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--ground); color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.gloss-close:hover { border-color: var(--accent); color: var(--accent); }
.gloss-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }


/* 複製提示詞 */
.ask-ai-wrap { display: grid; gap: 10px; justify-items: start; }
.ask-ai { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 18px; font: inherit; font-size: .92rem; font-weight: 700; color: var(--accent); background: var(--surface); border: 1.5px solid var(--accent); border-radius: 999px; cursor: pointer; }
.ask-ai:hover { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.ask-ai:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ask-ai.done { color: var(--ok); border-color: var(--ok); }
.ask-ai.on-dark { color: var(--band-accent); background: transparent; border-color: var(--band-accent); }
.ask-ai.on-dark:hover { background: color-mix(in srgb, var(--band-accent) 14%, transparent); }
.ask-ai-icon { display: inline-flex; }
.ask-ai-fallback { width: 100%; max-width: 720px; min-height: 140px; font: inherit; font-size: .9rem; line-height: 1.7; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--ground); color: var(--ink); resize: vertical; }
.ask-ai-hint { font-size: .85rem; color: var(--muted); }
.close .ask-ai-hint { color: var(--band-muted); }


/* 修正版新增 */
.tldr { margin: 0; padding: 0; list-style: none; counter-reset: t; display: grid; gap: 12px; max-width: 760px; }
.tldr li { counter-increment: t; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 2px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.tldr li::before { content: counter(t); grid-row: span 2; font-family: var(--display); font-weight: 900; font-size: 1.3rem; color: var(--accent); line-height: 1.5; }
.tldr-head { font-weight: 700; font-size: 1.08rem; color: var(--ink); text-decoration: none; }
.tldr-head::after { content: " ↓"; color: var(--accent); }
.tldr-head:hover { color: var(--accent); }
.tldr li.key { border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); padding: 20px 20px; }
.tldr li.key .tldr-head { font-family: var(--display); font-weight: 900; font-size: clamp(1.25rem, 3.6vw, 1.55rem); line-height: 1.45; }
.tldr span { font-size: .97rem; line-height: 1.75; }

section[id], [id^="h-"], #defs { scroll-margin-top: 72px; }
.verdict { font-family: var(--display); font-weight: 900; font-size: clamp(1.5rem, 4.5vw, 2.2rem); color: var(--accent); }
.sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sides > div, .defs-grid > div { background: var(--ground); border-radius: 10px; padding: 14px 16px; display: grid; gap: 4px; align-content: start; }
.sides b, .defs-grid b { font-size: .8rem; letter-spacing: .1em; color: var(--accent); }
.sides p, .defs-grid p { font-size: .95rem; line-height: 1.75; }
.defs { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px 28px; display: grid; gap: 14px; }
.defs h3 { font-family: var(--display); font-weight: 900; font-size: 1.3rem; }
.defs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ev { margin: 4px 0 0; padding-left: 1.2em; display: grid; gap: 8px; font-family: var(--body); font-size: .95rem; line-height: 1.75; }
.q .ev li { font-weight: 400; }
.faq-tag { justify-self: start; font-size: .78rem; font-weight: 700; letter-spacing: .08em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; }
.ask-ai-status { font-size: .85rem; color: var(--ok); min-height: 1em; }
.close .ask-ai-status { color: var(--band-accent); }
.author { font-weight: 500; color: var(--ink); }

/* 北京的說法 */
.quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.quote { margin: 0; background: var(--band); color: var(--band-ink); border-radius: 14px; padding: 26px 28px; display: grid; gap: 14px; align-content: space-between; }
.quote blockquote { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.15rem; line-height: 1.7; }
.quote blockquote::before { content: "「"; color: var(--band-accent); }
.quote blockquote::after { content: "」"; color: var(--band-accent); }
.quote figcaption { font-size: .85rem; color: var(--band-muted); }
.quote sup a { color: var(--band-accent); }

/* 常見說法 */
.faq { display: grid; gap: 16px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 26px 28px; display: grid; gap: 18px; }
.faq-item h3 { font-family: var(--display); font-weight: 900; font-size: clamp(1.25rem, 3.4vw, 1.55rem); line-height: 1.45; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
.split > div { display: grid; gap: 4px; align-content: start; }
.split b { font-size: .82rem; letter-spacing: .1em; color: var(--accent); }
.split p { font-size: .97rem; line-height: 1.75; }
.analogy { font-weight: 500; padding-left: 16px; border-left: 3px solid var(--accent); }

/* 結尾深色帶 */
.close { background: var(--band); color: var(--band-ink); margin-top: 64px; }
.close .shell { padding-block: 72px; display: grid; gap: 32px; }
.close .marker { color: var(--band-muted); }
.close .marker::before { background: var(--band-accent); }
.close h2 { font-family: var(--display); font-weight: 900; font-size: clamp(2.2rem, 7vw, 4rem); line-height: 1.25; }
.close ol { margin: 0; padding-left: 1.3em; display: grid; gap: 12px; max-width: 62ch; color: var(--band-ink); font-size: 1.05rem; }
.close ol li::marker { color: var(--band-accent); font-weight: 700; }
.close p { color: var(--band-muted); max-width: 62ch; }

/* 出處 */
.sources { padding-block: 56px 72px; display: grid; gap: 20px; }
.sources h2 { font-family: var(--display); font-weight: 900; font-size: 1.6rem; }
.sources ol { margin: 0; padding-left: 1.8em; columns: 2; column-gap: 40px; font-size: .9rem; color: var(--muted); }
.sources li { break-inside: avoid; margin-bottom: 8px; overflow-wrap: anywhere; }
.sources li:target { color: var(--ink); background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 4px; }
.foot { font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 18px; display: grid; gap: 4px; }

/* 進場：一次、從可見狀態開始 */
@media (prefers-reduced-motion: no-preference) {
  .hero > * { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .hero > *:nth-child(2) { animation-delay: .08s; }
  .hero > *:nth-child(3) { animation-delay: .16s; }
  .hero > *:nth-child(4) { animation-delay: .24s; }
  @keyframes rise { from { transform: translateY(10px); opacity: .55; } to { transform: none; opacity: 1; } }
}

@media (max-width: 760px) {
  .qpair, .stat-grid, .parties, .summary, .split, .quotes { grid-template-columns: minmax(0, 1fr); }
  .sources ol { columns: 1; }
  .layer { grid-template-columns: minmax(0, 1fr); }
  .layer .n { font-size: 2rem; }
  .layer .pill { grid-column: 1; justify-self: start; }
  .layer > .layer-body { grid-column: 1; }
  .sides, .defs-grid { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-block: 48px 44px; }
  .chapter { padding-block: 48px; }
}
.backnav a.home { font-weight: 700; }
.hub-list { display: grid; gap: 14px; }
.hub-card { display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px 26px; text-decoration: none; color: var(--ink); }
a.hub-card:hover { border-color: var(--accent); }
.hub-card .tag { font-size: .78rem; font-weight: 700; letter-spacing: .08em; color: var(--muted); }
.hub-card h2 { font-family: var(--display); font-weight: 900; font-size: clamp(1.4rem, 4vw, 1.9rem); line-height: 1.35; }
.hub-card p { color: var(--muted); }
.hub-card .half { font-weight: 700; color: var(--accent); font-size: 1.02rem; margin-top: -4px; }
.hub-card { scroll-margin-top: 24px; }
.hub-card:target { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.hub-card .go { color: var(--accent); font-weight: 700; }
.hub-card.planned { border-style: dashed; background: transparent; }
.method { display: grid; gap: 10px; }
.hero .marker { letter-spacing: .04em; line-height: 1.6; flex-wrap: wrap; }
.hero .marker a { color: var(--accent); font-weight: 700; text-decoration: none; }
.method ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.defs-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .defs-grid.two { grid-template-columns: minmax(0, 1fr); } }
.table-wrap { overflow-x: auto; }
.ends { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: .97rem; }
.ends th, .ends td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); line-height: 1.7; }
.ends tr:last-child th, .ends tr:last-child td { border-bottom: 0; }
.ends thead th { font-family: var(--display); font-size: 1.05rem; background: var(--ground); }
.ends tbody th { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.said .who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.said .who strong { font-family: var(--display); font-size: 1.35rem; }
.said .who span { font-size: .85rem; color: var(--muted); }
.said-group { font-family: var(--display); font-weight: 900; font-size: 1.3rem; margin-top: 8px; }
.said-q { margin: 0; padding: 14px 18px; border-left: 3px solid var(--line); background: var(--ground); border-radius: 0 10px 10px 0; font-size: 1.02rem; line-height: 1.75; }
