/* zhongkui.news — "The Queller's Ledger" design system
   Palette: ink blacks + xuan-paper text + cinnabar (judgment seals) +
   talisman ochre (labels/data) + underworld green (atmosphere only).
   Type: Fraunces (display/myth) · system sans (body/news) · Spline Sans Mono (evidence/data). */
:root {
  --bg: #121009;
  --bg-card: #191510;
  --bg-elev: #221c13;
  --text: #ece5d3;
  --text-dim: #a29a88;
  --cinnabar: #c8392b;    /* 朱砂 — seals, judgment, breaking */
  --ochre: #d9a441;       /* 符纸黄 — labels, data, timestamps */
  --underworld: #3f5a52;  /* 黄泉绿 — atmosphere gradients only */
  --border: #2b251b;
  --radius: 12px;
  --mono: "Spline Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Accessibility */
:focus-visible {
  outline: 3px solid var(--ochre);
  outline-offset: 2px;
  border-radius: 4px;
}
.skip-link {
  position: absolute; left: 12px; top: -60px;
  z-index: 100;
  background: var(--ochre); color: #121009;
  padding: 8px 16px; border-radius: 8px;
  font-weight: 700; transition: top .15s ease;
}
.skip-link:focus { top: 12px; text-decoration: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
}
h1, h2, h3, .logo {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  letter-spacing: .2px;
}
a { color: var(--ochre); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ---------- header / footer ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(18,16,9,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1100px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.logo {
  font-weight: 800; font-size: 1.25rem; letter-spacing: .5px;
  color: var(--text);
}
.logo span { color: var(--cinnabar); }
.logo:hover { text-decoration: none; }
.site-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-nav a { color: var(--text-dim); font-size: .95rem; }
.site-nav a:hover { color: var(--ochre); text-decoration: none; }

/* ---------- footer: colophon of the ledger ---------- */
.site-footer {
  position: relative; overflow: hidden;
  margin-top: 56px;
  border-top: 1px solid rgba(200,57,43,.35);
  background: linear-gradient(180deg, var(--bg) 0%, #101812 55%, #0a1210 100%);
}
.footer-watermark {
  position: absolute; right: -2%; bottom: -18%;
  font-family: "Fraunces", "Noto Serif SC", "SimSun", serif;
  font-size: 21rem; font-weight: 800; line-height: 1;
  color: rgba(200,57,43,.055);
  transform: rotate(-7deg);
  pointer-events: none; user-select: none;
}
.footer-inner {
  position: relative;
  max-width: 1100px; margin: 0 auto; padding: 40px 16px 24px;
}
.footer-grid {
  display: grid; gap: 28px;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  margin-bottom: 28px;
}
.footer-brand p { color: var(--text-dim); font-size: .88rem; max-width: 30em; margin: 10px 0 0; }
.footer-col h4 {
  font-family: var(--mono); font-size: .72rem; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--ochre); margin: 4px 0 12px;
}
.footer-col a { display: block; color: var(--text-dim); font-size: .9rem; padding: 3px 0; }
.footer-col a:hover { color: var(--ochre); text-decoration: none; }
.footer-legal {
  border-top: 1px solid var(--border); padding-top: 16px;
  font-family: var(--mono); color: var(--text-dim);
  font-size: .72rem; line-height: 1.7; opacity: .85;
}

/* ---------- share rail (talisman slips) ---------- */
.share-rail {
  position: fixed; left: 10px; top: 50%; transform: translateY(-50%);
  z-index: 60;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.share-label {
  writing-mode: vertical-rl;
  font-family: var(--mono); font-size: .62rem; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--ochre); margin-bottom: 4px;
}
.share-rail a, .share-copy {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text-dim); cursor: pointer; padding: 0;
  transition: border-color .15s ease, color .15s ease, transform .15s ease;
}
.share-rail svg { width: 19px; height: 19px; fill: currentColor; }
.share-rail a:hover, .share-copy:hover {
  border-color: var(--cinnabar); color: var(--cinnabar);
  transform: translateX(2px) rotate(-2deg);
}
.share-copy.copied { border-color: var(--ochre); color: var(--ochre); }
@media (max-width: 1180px) { .share-rail { display: none; } }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .footer-watermark { font-size: 11rem; right: -6%; bottom: -8%; }
}
@media (max-width: 640px) {
  h1 { font-size: 1.55rem; }
  .hero h1 { font-size: 1.9rem; }
  .hero { padding: 12px 14px 10px; }
  .header-inner { gap: 10px; }
  .footer-grid { grid-template-columns: 1fr; }
  .read-dive { padding: 14px 16px; gap: 12px; }
  .read-dive-main { font-size: 1.15rem; }
  .read-dive-sub { font-size: .78rem; }
  .read-dive-seal { width: 38px; height: 38px; font-size: 1.1rem; }
}

/* ---------- layout ---------- */
.wrap { max-width: 880px; margin: 0 auto; padding: 24px 16px; }
section { margin: 36px 0; }
h1 { font-size: 2rem; line-height: 1.25; margin: 0 0 12px; }
h2 { font-size: 1.4rem; margin: 28px 0 12px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
h3 { font-size: 1.1rem; margin: 20px 0 8px; }

/* ---------- hero / breaking ---------- */
.hero {
  text-align: left; margin-top: 16px;
  padding: 18px 20px 14px;
  border-radius: var(--radius);
  background:
    radial-gradient(65% 130% at 12% 0%, rgba(63,90,82,.28), transparent 62%),
    radial-gradient(45% 100% at 88% 8%, rgba(200,57,43,.07), transparent 70%);
}
.hero-kicker {
  font-family: var(--mono);
  color: var(--cinnabar); font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; font-size: .76rem; margin: 0 0 4px;
}
.hero h1 { font-size: 2.6rem; font-weight: 800; }
.hero-lede { color: var(--text-dim); font-size: 1.05rem; max-width: 46em; }

.breaking {
  background: linear-gradient(135deg, rgba(200,57,43,.13), rgba(217,164,65,.05));
  border: 1px solid rgba(200,57,43,.5);
  border-left: 6px solid var(--cinnabar);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.breaking h2 {
  border: 0; margin: 0 0 8px; color: var(--cinnabar);
  font-family: var(--mono); font-size: .95rem; letter-spacing: 1px; text-transform: uppercase;
}
.breaking p { margin: 8px 0; }
.pulse {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: var(--cinnabar); margin-right: 8px;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.cta { font-weight: 700; }

/* the deep-dive CTA: the site's primary action — a quiet ledger panel,
   boldness spent on one small vermilion seal */
.read-dive {
  display: flex; align-items: center; gap: 20px;
  margin: 20px 0 4px; padding: 18px 22px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 4px solid var(--cinnabar);
  border-radius: var(--radius);
  transition: border-color .18s ease, transform .18s ease;
}
.read-dive:hover {
  border-color: rgba(200,57,43,.55);
  border-left-color: var(--cinnabar);
  text-decoration: none;
  transform: translateY(-2px);
}
.read-dive-text { flex: 1; }
.read-dive-kicker {
  display: block;
  font-family: var(--mono); font-size: .68rem; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--ochre); margin-bottom: 6px;
}
.read-dive-main {
  display: block;
  font-family: "Fraunces", Georgia, serif; font-weight: 800;
  font-size: 1.45rem; line-height: 1.22; letter-spacing: .2px;
  color: var(--text);
}
.read-dive-sub {
  display: block; margin-top: 6px;
  font-size: .86rem; color: var(--text-dim);
}
.read-dive-seal {
  flex-shrink: 0;
  display: grid; place-items: center;
  width: 46px; height: 46px;
  background: var(--cinnabar); color: #f7ece0;
  font-family: "Fraunces", Georgia, serif; font-size: 1.4rem; font-weight: 800;
  border-radius: 4px;
  transform: rotate(-3deg);
  box-shadow: 0 3px 12px rgba(200,57,43,.35);
  transition: transform .18s ease;
}
.read-dive:hover .read-dive-seal { transform: rotate(0deg) translateX(4px); }

/* ---------- cards ---------- */
.article-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.article-card {
  display: block; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0 0 16px; color: var(--text);
  overflow: hidden;
  transition: border-color .15s ease, transform .15s ease;
}
.article-card:hover { border-color: var(--cinnabar); text-decoration: none; transform: translateY(-2px); }
.article-card .thumb {
  display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  background: var(--bg-elev);
  transition: transform .3s ease;
}
.article-card:hover .thumb { transform: scale(1.03); }
.article-card .card-body { padding: 12px 16px 0; }
.card-cat {
  display: inline-block; font-family: var(--mono);
  font-size: .7rem; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--ochre); margin-bottom: 6px;
}
.card-title { font-weight: 700; font-size: 1.02rem; line-height: 1.35; margin: 0 0 6px; }
.card-desc { color: var(--text-dim); font-size: .88rem; margin: 0 0 8px; }
.card-date { font-family: var(--mono); color: var(--text-dim); font-size: .74rem; }

/* ---------- article ---------- */
.breadcrumbs { font-family: var(--mono); color: var(--text-dim); font-size: .78rem; margin-bottom: 16px; }
.article-header { margin-bottom: 20px; }
.article-cat {
  display: inline-block; font-family: var(--mono);
  font-size: .72rem; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--cinnabar); margin-bottom: 6px;
}
.article-meta { font-family: var(--mono); color: var(--text-dim); font-size: .78rem; margin: 0; }
.article-hero {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--border);
  margin-top: 16px; background: var(--bg-elev);
}
.article-lede { font-size: 1.08rem; }

.prose p { margin: 14px 0; }
.prose ul, .prose ol { margin: 14px 0; padding-left: 24px; }
.prose li { margin: 6px 0; }
.prose h2 { scroll-margin-top: 80px; }
.prose blockquote {
  margin: 18px 0; padding: 14px 20px;
  border-left: 4px solid var(--cinnabar);
  background: var(--bg-card); border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-dim);
}
.prose blockquote p {
  margin: 6px 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.08rem; line-height: 1.7;
}

/* ledger tables: time codes & facts in mono ochre */
.facts { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .95rem; }
.facts th, .facts td { text-align: left; padding: 8px 12px; border: 1px solid var(--border); vertical-align: top; }
.facts th {
  background: var(--bg-card); white-space: nowrap;
  font-family: var(--mono); color: var(--ochre); font-weight: 700; font-size: .82rem;
}
.facts tr:nth-child(even) td { background: rgba(255,255,255,.02); }

/* ---------- gallery ---------- */
.gallery {
  display: grid; gap: 14px; margin: 16px 0;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.gallery figure {
  margin: 0; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.gallery figure img { display: block; width: 100%; object-fit: cover; }
.gallery figcaption {
  padding: 10px 14px; font-size: .82rem; color: var(--text-dim); line-height: 1.5;
}
.video-embed {
  position: relative; aspect-ratio: 16 / 9; margin: 20px 0;
  background: #000; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-note { font-family: var(--mono); color: var(--text-dim); font-size: .78rem; margin-top: -12px; }

/* ---------- in-article evidence frames ---------- */
figure.shot { margin: 22px 0; }
figure.shot img {
  width: 100%; display: block;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--bg-elev);
}
figure.shot figcaption {
  margin-top: 8px; font-family: var(--mono);
  font-size: .78rem; color: var(--text-dim); line-height: 1.55;
}
figure.shot figcaption strong { color: var(--ochre); font-weight: 700; }

.faq-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 16px; margin: 10px 0; }
.faq-item h3 { margin: 12px 0 6px; }
.faq-item p { margin: 0 0 12px; color: var(--text-dim); }

.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.list-date { font-family: var(--mono); color: var(--text-dim); font-size: .74rem; margin-left: 6px; }

.static-page { margin-top: 12px; }

/* ---------- click-to-load video facade ---------- */
.video-facade {
  position: relative; aspect-ratio: 16 / 9; margin: 16px 0;
  background: #000; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); cursor: pointer;
}
.video-facade img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-facade .play-btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 68px; height: 68px; border-radius: 50%;
  background: rgba(18, 16, 9, .78); border: 2px solid var(--ochre);
  color: var(--ochre); font-size: 1.6rem; line-height: 64px; text-align: center;
  padding-left: 6px;
  transition: background .15s ease, transform .15s ease;
}
.video-facade:hover .play-btn, .video-facade:focus-visible .play-btn {
  background: var(--cinnabar); color: #fff; border-color: var(--cinnabar);
}
.video-facade.loaded { cursor: default; }

/* ---------- sources block (registry entries) ---------- */
ul.sources { list-style: none; padding: 0; margin: 14px 0; }
ul.sources li {
  padding: 8px 0 8px 14px; border-bottom: 1px solid var(--border);
  font-size: .9rem; color: var(--text-dim);
  border-left: 3px solid rgba(200,57,43,.35);
}
ul.sources li a { font-weight: 600; }

/* ---------- evidence seals: the Queller's stamp ---------- */
.seal {
  display: inline-block; vertical-align: middle;
  font-family: var(--mono);
  font-size: .66rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  padding: 3px 9px; margin-left: 6px; line-height: 1.4;
  border: 2px solid; border-radius: 3px;
  transform: rotate(-2deg);
}
.seal-official { color: var(--cinnabar); border-color: var(--cinnabar); background: rgba(200,57,43,.09); }
.seal-reported { color: var(--ochre); border-color: var(--ochre); background: rgba(217,164,65,.08); }
.seal-analysis { color: var(--text-dim); border-color: var(--text-dim); background: rgba(162,154,136,.07); }

@media (prefers-reduced-motion: no-preference) {
  .article .seal { animation: stamp .32s cubic-bezier(.2,.9,.3,1.35) both; }
  @keyframes stamp {
    from { transform: rotate(-7deg) scale(1.6); opacity: 0; }
    to   { transform: rotate(-2deg) scale(1); opacity: 1; }
  }
}

@media (max-width: 640px) {
  h1 { font-size: 1.55rem; }
  .hero h1 { font-size: 1.9rem; }
  .hero { padding: 12px 14px 10px; }
  .header-inner { gap: 10px; }
}
