/* AI 每日新知 — 「青线登记簿」 provenance-ledger design system
   Clean paper ground, one deep-teal custody thread down the page,
   modern grotesk small caps, sources as stamp chips.
   Known = solid ink · 研判 = hairline · gap = unwoven thread.
   One accent only: the thread's teal. No gradients, no cards, no kickers. */

@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/sora-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201D, U+2026;
}

:root {
  --paper: #f7f8f6;
  --surface: #fcfcfb;
  --surface-2: #e9eae5;
  --ink: #191c1e;
  --text: #23272a;
  --soft: #4a5054;
  --mute: #666d73;
  --hairline-text: #646c71;
  --thread: #0f766e;
  --thread-ink: #0b5951;
  --thread-wash: #e9f2ef;
  --stamp: #4e555a;
  --unwoven: #c3c8c4;
  --rule: #e3e5e0;
  --rule-strong: #c6cac4;
  --focus: #191c1e;
  --display: "Sora", -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --measure: 66ch;
  --page: 700px;
  --page-wide: 1040px;
  --fold-x: -33px;
  --thread-x: calc(50% - 350px - 27px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14161a;
    --surface: #1b1f24;
    --surface-2: #23283080;
    --ink: #e8ebef;
    --text: #d9dee5;
    --soft: #a8b1bc;
    --mute: #8b95a1;
    --hairline-text: #7b8591;
    --thread: #2ea899;
    --thread-ink: #4fc3b4;
    --thread-wash: #16211f;
    --stamp: #99a3ae;
    --unwoven: #3a414b;
    --rule: #262c34;
    --rule-strong: #39404a;
    --focus: #e8ebef;
  }
}
[data-theme="dark"] {
  --paper: #14161a;
  --surface: #1b1f24;
  --surface-2: #23283080;
  --ink: #e8ebef;
  --text: #d9dee5;
  --soft: #a8b1bc;
  --mute: #8b95a1;
  --hairline-text: #7b8591;
  --thread: #2ea899;
  --thread-ink: #4fc3b4;
  --thread-wash: #16211f;
  --stamp: #99a3ae;
  --unwoven: #3a414b;
  --rule: #262c34;
  --rule-strong: #39404a;
  --focus: #e8ebef;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.9;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--thread); color: var(--paper); }
a { color: inherit; text-decoration: none; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--thread-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 1px; }
img { max-width: 100%; height: auto; }
figure { margin: 0; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 0; }
a, button { -webkit-tap-highlight-color: transparent; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--rule-strong); border: 3px solid var(--paper); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--mute); }

/* ---------- the sheet & the custody ribbon ---------- */
.sheet { position: relative; min-height: 60vh; }
.ribbon { position: absolute; inset: 0; pointer-events: none; }
.ribbon-line {
  position: absolute; top: 0; bottom: 46px; left: var(--thread-x); width: 2px;
  background: var(--thread);
  transform-origin: top;
}
@media (prefers-reduced-motion: no-preference) {
  .ribbon-line { animation: ribbon-draw .9s cubic-bezier(.16, 1, .3, 1) both; }
}
@keyframes ribbon-draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.ribbon-tail { position: absolute; left: var(--thread-x); bottom: 0; width: 14px; height: 48px; margin-left: -6px; color: var(--thread); }

/* ---------- masthead ---------- */
.masthead { border-bottom: 1px solid var(--rule-strong); background: var(--paper); box-shadow: 0 1px 0 var(--paper), 0 3px 0 -2px var(--rule-strong); }
.masthead-inner {
  max-width: var(--page-wide); margin: 0 auto; padding: 18px 24px 16px;
  display: flex; align-items: baseline; gap: 18px;
}
.wordmark { font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: .01em; color: var(--ink); }
.wordmark small {
  display: block; font-family: var(--display); font-weight: 400; font-size: 11px;
  font-variant-caps: all-small-caps; letter-spacing: .22em; color: var(--mute); margin-top: 3px;
}
.nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.nav a, .theme-toggle {
  font: inherit; font-size: 13.5px; color: var(--soft); padding: 6px 10px; border-radius: 2px;
  border: 1px solid transparent; background: none; cursor: pointer; transition: color .12s;
}
.nav a:hover, .theme-toggle:hover { color: var(--thread-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.theme-toggle { border-color: var(--rule-strong); }
.theme-toggle:hover { text-decoration: none; border-color: var(--mute); }

/* ---------- page columns ---------- */
.page { max-width: var(--page); margin: 0 auto; padding: 0 24px; position: relative; }
.page-wide { max-width: var(--page-wide); margin: 0 auto; padding: 0 24px; }

/* fold node: where a block ties onto the ribbon */
.fold::before {
  content: ""; position: absolute; left: var(--fold-x); top: .5em;
  width: 9px; height: 9px; border-radius: 50%;
  border: 2px solid var(--thread); background: var(--paper);
  transition: background .12s steps(1);
}
.fold:hover::before { background: var(--thread); }

/* ---------- lead / 登记头 ---------- */
.lead { padding: 44px 24px 6px; }
.lead-head { display: flex; align-items: flex-start; gap: 20px; }
.lead-main { min-width: 0; }
.lead .dateline {
  font-family: var(--display); font-weight: 400; font-variant-caps: all-small-caps;
  letter-spacing: .18em; font-size: 14px; color: var(--thread-ink);
}
.lead h1 {
  font-family: var(--display); font-weight: 700; letter-spacing: .01em; line-height: 1.25;
  font-size: clamp(1.9rem, 4.4vw, 2.7rem); margin: 10px 0 0; color: var(--ink); text-wrap: balance;
}
.lead .standfirst {
  font-size: clamp(1.02rem, 1.8vw, 1.14rem); line-height: 1.85;
  color: var(--soft); margin: 16px 0 0; text-wrap: pretty; max-width: var(--measure);
}
.lead .byline {
  margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 13.5px; color: var(--mute);
  font-variant-numeric: tabular-nums;
}
.lead .byline b { color: var(--ink); font-weight: 700; font-family: var(--display); font-size: 14.5px; }

/* 期号印章 */
.seal {
  flex: none; margin-top: 6px; padding: 10px 14px; text-align: center; color: var(--thread-ink);
  border: 1.5px solid var(--thread); border-radius: 2px;
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px color-mix(in srgb, var(--thread) 45%, transparent);
  transform: rotate(-1.6deg);
}
.seal .no { display: block; font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .06em; white-space: nowrap; }
.seal .date { display: block; font-family: var(--display); font-weight: 400; font-size: 11.5px; font-variant-numeric: tabular-nums; letter-spacing: .14em; margin-top: 3px; opacity: .85; }

/* ---------- section / 账簿分册 ---------- */
.section { margin-top: 46px; }
.section-title {
  font-family: var(--display); font-weight: 700; font-size: 1.22rem; letter-spacing: .01em;
  margin: 0 0 4px; color: var(--ink); display: flex; align-items: baseline; gap: 12px;
}
.section-title .n {
  font-family: var(--display); font-weight: 400; font-size: .8rem; color: var(--mute);
  font-variant-numeric: tabular-nums; margin-left: auto;
}
.section-rule { border-top: 1px solid var(--ink); position: relative; margin: 8px 0 0; }
.section-rule::after { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 1px solid var(--rule-strong); }
.section-intro { color: var(--mute); font-size: 14px; margin: 12px 0 0; max-width: var(--measure); }

/* ---------- note / 今日焦点 ---------- */
.note {
  margin-top: 34px; border: 1px solid var(--thread); border-radius: 2px;
  background: var(--thread-wash); padding: 24px 26px 20px; position: relative;
}
.note::before {
  content: ""; position: absolute; top: -1px; left: 22px; width: 14px; height: 22px;
  background: var(--thread);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%);
}
.note h2 { font-family: var(--display); font-size: 1.06rem; font-weight: 700; margin: 0 0 4px; color: var(--thread-ink); letter-spacing: .02em; }
.note ol { margin: 0; padding: 0; list-style: none; }
.note li { padding: 12px 0; border-top: 1px solid color-mix(in srgb, var(--thread) 22%, transparent); }
.note li:first-child { border-top: 0; padding-top: 4px; }
.note .t { font-weight: 700; color: var(--ink); font-size: 1rem; line-height: 1.65; }
.note .t a { color: inherit; }
.note .t a:hover { color: var(--thread-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.note .d { color: var(--soft); font-size: .93rem; margin-top: 3px; line-height: 1.8; }

/* ---------- entries / 藏品条目 ---------- */
.entry { padding: 26px 0; border-top: 1px solid var(--rule); }
.entry:first-of-type { border-top: 0; padding-top: 14px; }
.entry-figure { margin: 0 0 16px; }
.entry-figure img {
  width: 100%; max-height: 250px; object-fit: cover; display: block;
  background: var(--surface-2); border: 1px solid var(--rule-strong); border-radius: 2px;
  box-shadow: 0 1px 0 var(--surface);
}
.entry-title {
  font-family: var(--display); font-weight: 700; letter-spacing: .005em; line-height: 1.55;
  font-size: clamp(1.08rem, 2vw, 1.24rem); margin: 0 0 8px; color: var(--ink); text-wrap: balance;
}
.entry-title a { color: inherit; }
.entry-lede { font-size: .99rem; color: var(--text); margin: 0 0 10px; max-width: var(--measure); }
.entry-body { color: var(--soft); font-size: .96rem; margin: 0 0 12px; max-width: var(--measure); }

/* 研判: hairline voice, set apart from fact */
.entry-why {
  margin: 0 0 14px; padding: 10px 0 2px; border-top: 1px solid var(--unwoven);
  font-size: .92rem; color: var(--hairline-text); max-width: var(--measure); line-height: 1.85;
}
.entry-why b {
  color: var(--mute); font-weight: 400; font-variant-caps: all-small-caps; letter-spacing: .16em;
  font-size: .8rem; margin-right: .5em;
}
.entry-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 13px; }

/* sources as fading dealer stamps */
.src {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--rule-strong); border-radius: 2px; padding: 3px 10px;
  color: var(--stamp); font-size: 12.5px; letter-spacing: .02em;
  transition: color .12s, border-color .12s;
}
.src:hover { color: var(--thread-ink); border-color: var(--thread); }
.src .ext { width: 9px; height: 9px; flex: none; opacity: .7; }

/* tags as ledger annotations */
.tags { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.tag { font-size: 12px; color: var(--mute); letter-spacing: .06em; }
.tag::before { content: "· "; color: var(--unwoven); }

/* ---------- sources ledger ---------- */
.sources { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--ink); position: relative; }
.sources::after { content: ""; position: absolute; left: 0; right: 0; top: 19px; border-top: 1px solid var(--rule-strong); }
.sources h2 { font-family: var(--display); font-size: 1.02rem; font-weight: 700; margin: 0 0 12px; color: var(--ink); }
.sources ol { margin: 0; padding-left: 1.5em; }
.sources li { font-size: 12.5px; color: var(--mute); margin-bottom: 6px; word-break: break-word; font-variant-numeric: tabular-nums; }
.sources a { color: var(--soft); }
.sources a:hover { color: var(--thread-ink); }

/* ---------- pager / 前后折点 ---------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 50px 0 0; }
.pager a {
  border: 1px solid var(--rule-strong); border-radius: 2px; padding: 14px 18px;
  transition: border-color .12s; box-shadow: 0 1px 0 var(--paper), 0 2px 0 -1px var(--rule);
}
.pager a:hover { border-color: var(--thread); color: inherit; }
.pager .k { font-family: var(--display); font-variant-caps: all-small-caps; letter-spacing: .16em; font-size: 12.5px; color: var(--mute); }
.pager .t { margin-top: 6px; color: var(--ink); font-size: 14px; line-height: 1.6; font-weight: 700; }
.pager .next { text-align: right; }

/* ---------- archive / 登记簿 ---------- */
.archive-year {
  font-family: var(--display); font-variant-caps: all-small-caps; letter-spacing: .22em;
  font-size: 1.05rem; color: var(--mute); margin: 34px 0 4px;
  border-bottom: 1px solid var(--rule-strong); padding-bottom: 6px;
}
.archive-row {
  display: grid; grid-template-columns: 100px 1fr auto; gap: 18px; align-items: baseline;
  padding: 12px 0; border-top: 1px solid var(--rule); position: relative;
}
.archive-row:first-of-type { border-top: 0; }
.archive-row::before {
  content: ""; position: absolute; left: var(--fold-x); top: 1.15em;
  width: 7px; height: 7px; border-radius: 50%;
  border: 2px solid var(--thread); background: var(--paper);
  transition: background .12s steps(1);
}
.archive-row:hover::before { background: var(--thread); }
.archive-row:hover { color: var(--ink); }
.archive-row .d { font-family: var(--display); font-size: 14px; color: var(--thread-ink); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.archive-row .s { color: var(--soft); font-size: 14.5px; line-height: 1.7; }
.archive-row .c { font-family: var(--display); font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; }
@media (max-width: 620px) {
  .archive-row { grid-template-columns: 84px 1fr; }
  .archive-row .c { display: none; }
}

/* ---------- footer ---------- */
.footer { margin-top: 72px; border-top: 1px solid var(--rule-strong); }
.footer-inner {
  max-width: var(--page-wide); margin: 0 auto; padding: 24px 24px 44px;
  display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: baseline;
  font-size: 13px; color: var(--mute);
}
.footer-inner .mark { font-family: var(--display); font-weight: 700; color: var(--ink); font-size: 14px; margin-right: auto; }
.footer-inner a:hover { color: var(--thread-ink); }

/* ---------- misc ---------- */
.empty { padding: 80px 0; color: var(--mute); font-size: 1.1rem; }
.badge {
  display: inline-block; border: 1px solid var(--rule-strong); border-radius: 2px;
  padding: 6px 16px; font-size: 13.5px; color: var(--soft); transition: color .12s, border-color .12s;
}
.badge:hover { border-color: var(--thread); color: var(--thread-ink); }

@media (max-width: 759px) {
  :root { --fold-x: 2px; --thread-x: 7px; }
  .page { padding: 0 20px 0 26px; }
  .lead { padding: 32px 20px 4px 26px; }
  .lead-head { flex-direction: column-reverse; gap: 14px; }
  .seal { align-self: flex-start; transform: rotate(-1.2deg); }
  .note { padding: 20px 16px 16px; }
  .pager { grid-template-columns: 1fr; }
}
@media print {
  .masthead, .nav, .theme-toggle, .pager, .footer, .ribbon { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .src { border-color: #999; }
}
