/* 19450815.org — memorial stylesheet */
:root {
  --bg: #0b0b0d;
  --ink: #e9e4da;
  --body: #c8c2b4;
  --muted: #918b7d;
  /* --dim 是承载文字的最暗安全色(5.28:1,满足 WCAG AA) */
  --dim: #8a8474;
  /* --faint 仅用于非文本装饰(菊花、时间轴圆点):2.74:1,不可承载文字 */
  --faint: #5c574d;
  --line: #232327;
  /* --accent 2.71:1,仅作装饰;红色文字一律用 --accent-text(4.67:1) */
  --accent: #9e2f2b;
  --accent-text: #c65a54;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Times New Roman",
    "Songti SC", "Noto Serif CJK SC", "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN",
    "Serif CJK SC", SimSun, serif;
  font-size: 17px;
  line-height: 2;
  text-rendering: optimizeLegibility;
}
html[lang="en"] body { line-height: 1.85; }
::selection { background: var(--accent); color: #fff; }

/* 键盘焦点可见性 */
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }

.wrap { max-width: 41rem; margin: 0 auto; padding: 0 1.5rem; }

/* top bar */
.top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.3rem 1.6rem;
  font-size: .8rem; letter-spacing: .25em; color: var(--dim);
}
.top a {
  color: var(--ink); text-decoration: none;
  border: 1px solid var(--muted); border-radius: 2px;
  padding: .15rem .7rem; letter-spacing: .15em;
}
.top a:hover, .top a:focus-visible { border-color: var(--ink); background: rgba(233, 228, 218, .06); }
html[lang="en"] .top .sitename { text-transform: uppercase; }

/* hero */
.hero {
  min-height: 96svh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 6rem 1.5rem 3rem;
}
.hero > * { animation: rise 1.4s cubic-bezier(.2, .6, .2, 1) both; }
.hero > *:nth-child(2) { animation-delay: .15s; }
.hero > *:nth-child(3) { animation-delay: .3s; }
.hero > *:nth-child(4) { animation-delay: .55s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.hero .date-cn { font-size: .95rem; letter-spacing: .6em; text-indent: .6em; color: var(--muted); margin-bottom: 2.2rem; }
html[lang="en"] .hero .date-cn { text-transform: uppercase; }
.hero .date-num { font-size: clamp(2.7rem, 1.6rem + 5vw, 5.4rem); font-weight: normal; letter-spacing: .06em; line-height: 1.2; }
.hero .date-num .dot { color: var(--accent-text); padding: 0 .08em; }
.hero .statement { margin-top: 2.4rem; font-size: 1.1rem; letter-spacing: .12em; }
.hero .years { margin-top: 3.2rem; font-size: .85rem; letter-spacing: .2em; color: var(--muted); }
.hero .years b { color: var(--ink); font-weight: normal; }

/* dedication */
.dedication {
  text-align: center; color: var(--muted); font-size: .95rem;
  max-width: 34rem; margin: 0 auto; padding: 2rem 1.5rem 2.5rem;
}

/* chrysanthemum divider */
.divider { padding: 1rem 0 2rem; }
.mum { display: block; margin: 0 auto; width: 30px; height: 30px; color: var(--faint); }

/* sections */
main section { padding: 4rem 0 1.5rem; }
main section + section { border-top: 1px solid var(--line); margin-top: 2.5rem; }
h2 {
  font-size: 1rem; font-weight: normal;
  letter-spacing: .5em; text-indent: .5em;
  color: var(--muted); text-align: center; margin-bottom: 2.6rem;
}
html[lang="en"] h2 { font-size: .9rem; letter-spacing: .35em; text-indent: .35em; text-transform: uppercase; }
main section p { color: var(--body); margin-bottom: 1.4rem; }
main section p strong { color: var(--ink); font-weight: normal; }

/* timeline */
.timeline { list-style: none; border-left: 1px solid var(--line); padding-left: 1.8rem; margin: 0 0 1.5rem .4rem; }
.timeline li { position: relative; margin: 1.7rem 0; }
.timeline li::before {
  content: ""; position: absolute; left: calc(-1.8rem - 3px); top: .8em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--faint);
}
.timeline li.key::before { background: var(--accent); box-shadow: 0 0 0 3px rgba(158, 47, 43, .18); }
.timeline .d { display: block; font-size: .8rem; letter-spacing: .15em; color: var(--muted); }
html[lang="en"] .timeline .d { text-transform: uppercase; }
.timeline .t { color: var(--body); }
.timeline li.key .d { color: var(--accent-text); }
.timeline li.key .t { color: var(--ink); }

/* crimes */
.crime { margin: 3rem 0; }
.crime h3 { font-size: 1.15rem; font-weight: normal; letter-spacing: .1em; margin-bottom: 1rem; }
.crime h3 .no { color: var(--accent-text); font-size: .85rem; margin-right: .9em; letter-spacing: .2em; }
.crime h3 .period { font-size: .78rem; color: var(--dim); letter-spacing: .1em; margin-left: .9em; white-space: nowrap; }
html[lang="en"] .crime h3 .period { text-transform: uppercase; }

/* numbers */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 2.6rem 1rem; text-align: center; padding: 1rem 0 2rem;
}
.stats .v { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.1rem); line-height: 1.4; }
.stats .k { font-size: .76rem; color: var(--muted); letter-spacing: .1em; margin-top: .3rem; }
html[lang="en"] .stats .k { text-transform: uppercase; }
.note { font-size: .82rem; color: var(--dim); text-align: center; }

/* remembrance vow */
.vow { text-align: center; font-size: 1.05rem; letter-spacing: .15em; color: var(--ink); margin: 2.8rem 0 1.5rem; line-height: 2.4; }

/* sources */
.sources { list-style: none; }
.sources li { margin: 1.3rem 0; color: var(--body); }
.sources a { color: var(--body); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--dim); }
.sources a:hover, .sources a:focus-visible { color: var(--ink); text-decoration-color: var(--accent-text); }
.sources .lbl { display: block; font-size: .76rem; color: var(--dim); letter-spacing: .05em; }

/* footer */
footer {
  border-top: 1px solid var(--line); margin-top: 4rem;
  padding: 3rem 1.5rem 4rem; text-align: center;
  font-size: .8rem; line-height: 2.2; color: var(--dim);
}
footer p { margin-bottom: .8rem; }
footer strong { color: var(--muted); font-weight: normal; letter-spacing: .08em; }
footer a { color: var(--body); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--dim); }
footer a:hover, footer a:focus-visible { color: var(--ink); text-decoration-color: var(--accent-text); }

@media (max-width: 480px) {
  body { font-size: 16px; }
  .hero .date-cn { letter-spacing: .35em; text-indent: .35em; }
  h2 { letter-spacing: .35em; text-indent: .35em; }
  .crime h3 .period { display: block; margin: .3rem 0 0; white-space: normal; }
}

/* 减少动态效果:关闭入场动画与平滑滚动,并确保内容保持可见 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero > * { animation: none; opacity: 1; transform: none; }
}

/* Windows 高对比度模式:圆点改用 border 绘制,避免被系统改写后消失 */
@media (forced-colors: active) {
  .timeline li::before, .timeline li.key::before {
    background: CanvasText; box-shadow: none; forced-color-adjust: none;
  }
  .top a { border-color: LinkText; }
}

/* 打印 / 存为 PDF:转为浅底深字 */
@media print {
  :root {
    --bg: #fff; --ink: #000; --body: #1a1a1a; --muted: #444;
    --dim: #444; --faint: #888; --line: #bbb; --accent-text: #7a1f1c;
  }
  html, body { background: #fff !important; color: #000 !important; }
  .top { position: static; }
  .top a { display: none; }
  .hero { min-height: auto; padding: 2rem 0 1rem; }
  .hero > * { animation: none; opacity: 1; transform: none; }
  .divider { padding: .5rem 0; }
  main section { padding: 1.5rem 0 .5rem; break-inside: avoid; }
  .crime, .timeline li { break-inside: avoid; }
  .sources a::after { content: " (" attr(href) ")"; font-size: .75em; color: #444; word-break: break-all; }
  footer { margin-top: 1.5rem; padding: 1rem 0; }
}
