/* freedom8964.com — 黑、白、血色；全局黑体；无外部字体、无追踪 */
:root {
  --bg: #000000;
  --bg-2: #0d0d0d;
  --line: #222222;
  --line-2: #3a3a3a;
  --text: #e8e8e8;
  --muted: #9a9a9a;
  --strong: #ffffff;
  --blood: #8a0b12;        /* 血色：线条、色块 */
  --blood-text: #c81d25;   /* 血色：黑底上的文字（对比度足够阅读） */
  --accent: var(--blood-text);
  --mourn: var(--blood);
  --flame: #f5b82e;        /* 烛火：黄色 */

  --max: min(1080px, 92vw);
  --fs: clamp(15px, 0.9rem + 0.25vw, 18px);
  --pad: clamp(16px, 4vw, 40px);

  /* 全局黑体（系统自带字体，不从外部加载） */
  --sans-hans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", "Heiti SC", "SimHei", sans-serif;
  --sans-hant: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", "Source Han Sans TC", "Heiti TC", sans-serif;
  --sans-latin: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial;
  --serif: var(--sans-latin), var(--sans-hans);
}
:lang(zh-Hant) { --serif: var(--sans-latin), var(--sans-hant); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: var(--fs); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 1rem/1.9 var(--serif); letter-spacing: .02em;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
body > main { flex: 1 0 auto; }
a { color: var(--strong); text-decoration: underline; text-decoration-color: var(--blood); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--blood-text); }
img { max-width: 100%; height: auto; }
.wrap { width: var(--max); margin: 0 auto; }

/* 顶部 */
.site-head { border-bottom: 1px solid var(--blood); position: sticky; top: 0; z-index: 10; background: rgba(0,0,0,.94); backdrop-filter: blur(6px); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px 24px; min-height: 58px; flex-wrap: wrap; padding: 6px 0; }
.brand { font-size: 1.15rem; letter-spacing: .12em; color: var(--strong); text-decoration: none; white-space: nowrap; }
.brand b { font-weight: 400; color: var(--blood-text); }
.nav { display: flex; flex-wrap: wrap; gap: 2px 20px; font-size: .92rem; }
.nav a { color: var(--muted); text-decoration: none; padding: 4px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--strong); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--blood); }
.langs { display: flex; gap: 12px; font-size: .85rem; }
.langs a { color: var(--muted); text-decoration: none; }
.langs a[aria-current="true"] { color: var(--strong); }

/* 首页 */
.hero { padding: clamp(56px, 12vh, 140px) 0 clamp(44px, 9vh, 100px); text-align: center; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: clamp(2.2rem, 7vw, 4.6rem); font-weight: 400; line-height: 1.2; margin: 0 0 .6em; letter-spacing: .18em; color: var(--strong); }
.hero h1 .num { color: var(--blood-text); }
.hero .rule { width: 56px; height: 2px; background: var(--blood); margin: 0 auto 1.6em; }
.hero p.lead { font-size: 1.05rem; color: var(--muted); max-width: 40em; margin: 0 auto; }
.flame { width: 14px; height: 28px; margin: 0 auto 32px; border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
  background: radial-gradient(ellipse at 50% 70%, #ffffff 0%, #fff1b0 28%, var(--flame) 50%, rgba(245,184,46,0) 74%);
  animation: flicker 4s ease-in-out infinite; opacity: .9; }
@keyframes flicker { 0%,100% { transform: scale(1) rotate(-1deg) } 45% { transform: scale(1.05,.96) rotate(1deg) } 75% { transform: scale(.97,1.03) } }
@media (prefers-reduced-motion: reduce) { .flame { animation: none; } }

/* 页面标题 */
.page-head { border-top: 0; padding: clamp(40px, 8vh, 88px) 0 clamp(20px, 4vh, 36px); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); font-weight: 400; letter-spacing: .1em; margin: 0 0 .3em; line-height: 1.35; color: var(--strong); }
.page-head p { color: var(--muted); margin: 0; }
.page-head .en { font-size: .78rem; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin-bottom: .6em; }

main { padding: clamp(28px, 5vh, 56px) 0 clamp(48px, 9vh, 96px); }
h2 { font-size: 1.35rem; font-weight: 400; letter-spacing: .08em; margin: 2.6em 0 .8em; padding: 0 0 .4em .7em; border-left: 3px solid var(--blood); border-bottom: 1px solid var(--line); color: var(--strong); }
h2:first-child { margin-top: .4em; }
h2[id] { scroll-margin-top: 120px; }
h3 { font-size: 1.05rem; font-weight: 600; margin: 1.6em 0 .4em; }
p { margin: 0 0 1em; }
strong { color: var(--strong); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* 栏目卡片 */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 1px; margin: 8px 0 24px; background: var(--line); border: 1px solid var(--line); }
.card { display: block; background: var(--bg); padding: clamp(18px, 2.4vw, 28px); color: var(--text); text-decoration: none; transition: background .25s; }
.card:hover { background: var(--bg-2); box-shadow: inset 0 -2px 0 var(--blood); }
.card h3 { margin: 0 0 .4em; font-weight: 400; font-size: 1.12rem; letter-spacing: .06em; color: var(--strong); }
.card p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.7; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: .75em .9em; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 400; font-size: .82rem; letter-spacing: .12em; white-space: nowrap; }
td:first-child { color: var(--strong); white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.key td:first-child { color: var(--blood-text); font-weight: 600; }
tr.key td:first-child { box-shadow: inset 3px 0 0 var(--mourn); padding-left: calc(.9em - 2px + 6px); }

/* 链接列表 */
.vlist { list-style: none; padding: 0; margin: 4px 0 0; }
.vlist li { padding: .9em 0; border-bottom: 1px solid var(--line); }
.vlist .t { line-height: 1.6; }
.vlist .t a { text-decoration: none; }
.vlist .t a:hover { text-decoration: underline; }
.vlist .c { font-size: .8rem; color: var(--muted); margin-top: .25em; overflow-wrap: anywhere; }
.vlist .c a { color: var(--muted); }
.toc { font-size: .9rem; line-height: 2.1; color: var(--muted); }
.toc a { color: var(--text); }
.tag { display: inline-block; font-size: .72rem; line-height: 1.6; padding: 0 .5em; border: 1px solid var(--line-2); color: var(--muted); }
.note { border-left: 2px solid var(--blood); padding: .2em 0 .2em 1.2em; margin: 1.4em 0; font-size: .9rem; color: var(--muted); }
.note strong { color: var(--text); }

/* 蜡烛 */
.candle-stage { text-align: center; padding: clamp(32px, 8vh, 80px) 0 10px; }
.candle { position: relative; width: 40px; height: 150px; margin: 0 auto 32px; }
.candle .body { position: absolute; bottom: 0; left: 0; right: 0; height: 110px; background: linear-gradient(90deg, #d6d6d6, #ffffff 45%, #cfcfcf); }
.candle .wick { position: absolute; left: 50%; bottom: 110px; width: 2px; height: 10px; margin-left: -1px; background: #222; }
.candle .flame { position: absolute; left: 50%; bottom: 116px; margin: 0 0 0 -7px; animation: none; opacity: 0; transition: opacity 1.2s; }
.candle.lit .flame { opacity: .95; animation: flicker 4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .candle.lit .flame { animation: none; } }
button.btn { font: inherit; letter-spacing: .2em; cursor: pointer; background: transparent; color: var(--strong); border: 1px solid var(--line-2); padding: .6em 2.2em; }
button.btn:hover { border-color: var(--blood-text); color: var(--blood-text); }
button.btn[disabled] { color: var(--muted); border-color: var(--line); cursor: default; }
.msg { margin-top: 1.2em; min-height: 1.8em; }

/* 页脚 */
.site-foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: .8rem; line-height: 1.8; }
.site-foot a { color: var(--muted); }
.site-foot p { margin: 0 0 .4em; }

/* 窄屏：表格改为每条记录竖排 */
@media (max-width: 640px) {
  .nav { gap: 2px 14px; font-size: .88rem; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap tr:first-child { display: none; }
  .table-wrap tr { padding: .8em 0; border-bottom: 1px solid var(--line); }
  .table-wrap td { border: 0; padding: .1em 0; white-space: normal; }
  .table-wrap td:first-child { font-size: .85rem; }
  .table-wrap td:last-child { font-size: .8rem; }
  tr.key td:first-child { padding-left: .6em; }
}
/* 大屏：更宽松的行距 */
@media (min-width: 1600px) { :root { --max: min(1200px, 80vw); } }
/* 打印 */
@media print {
  body { background: #fff; color: #000; }
  .site-head, .flame, .candle-stage { display: none; }
  a { color: #000; }
}
/* 窄屏：网站名与语言切换同一行，导航单独一行 */
@media (max-width: 900px) {
  .site-head .wrap { gap: 4px 16px; }
  .brand { order: 1; }
  .langs { order: 2; margin-left: auto; }
  .nav { order: 3; width: 100%; }
}
/* 首页蜡烛 */
.hero-candle { width: 32px; height: 118px; margin: 0 auto 36px; }
.hero-candle .body { height: 84px; }
.hero-candle .wick { bottom: 84px; }
.hero-candle .flame { bottom: 90px; margin-left: -7px; }
.hero-light { margin: 2em 0 .6em; }
