/* ============================================================
   咚咚匠快讯 · 编辑部风格 + 日历导航
   白纸 / 墨色 / 深蓝 (#1038B5) / 宋体标题 / 细线结构 / 鬼影序号
   零构建、零外部字体（版本号由 webapp 按文件修改时间自动生成，改完直接生效）
   ============================================================ */
:root {
  --ink: #26282c;
  --ink-soft: #3f4247;
  --ink-mute: #8a8f98;
  --ink-faint: #b9bec7;
  --blue: #1038b5;
  --blue-soft: #eef1fb;
  --line: #e8e8e8;
  --paper: #ffffff;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC",
          "Microsoft YaHei", sans-serif;
  --num: Georgia, "Times New Roman", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink-soft);
  background: var(--paper);
  font-size: 15.5px;
  line-height: 1.95;
  letter-spacing: .3px;
  padding-bottom: 84px;
}
a { color: inherit; text-decoration: none; }
button { font-family: var(--sans); }
::selection { background: rgba(16, 56, 181, .12); }

.shell { max-width: 720px; margin: 0 auto; padding: 0 20px; }
/* 微信分享卡片图：必须在正文最前出现一张 ≥300px 的 <img>，但页面上不显示 */
.share-mark { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---------- 报头 ---------- */
.topbar { background: var(--paper); border-bottom: 1px solid var(--ink); }
.rule-top {
  max-width: 720px; margin: 14px auto 0;
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); height: 5px;
}
.topbar-in {
  max-width: 720px; margin: 0 auto; padding: 16px 20px 10px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 10px;
}
.brand {
  font-family: var(--serif); font-weight: 900; font-size: 27px;
  color: var(--ink); letter-spacing: 2px; white-space: nowrap;
}
.brand:active { opacity: .6; }
.slogan-inline {
  font-size: 10.5px; font-weight: 700; color: var(--blue); letter-spacing: .5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (min-width: 420px) {
  .slogan-inline { font-size: 11.5px; letter-spacing: 1.5px; }
}
@media (max-width: 419px) {
  .brand { font-size: 22px; }
  .topbar .meta .wd { display: none; }
  .strap .latin { display: none; }
  .strap .producer { font-size: 10px; letter-spacing: .5px; }
}
.topbar .meta { font-family: var(--num); font-size: 12.5px; color: var(--ink-mute); white-space: nowrap; }
.strap {
  max-width: 720px; margin: 0 auto; padding: 0 20px 10px;
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
}
.strap .producer { font-size: 11px; color: var(--ink-mute); letter-spacing: 1.5px; }
.strap .latin { font-family: var(--num); font-size: 9px; letter-spacing: 2.5px; color: var(--ink-faint); text-transform: uppercase; }

/* ---------- 日历条（吸顶保留） ---------- */
.datebar {
  position: sticky; top: 0; z-index: 9;
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  margin: 0 -20px; padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.datebar-in {
  display: flex; gap: 8px; overflow-x: auto; padding: 0 20px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.datebar-in::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; width: 46px; padding: 6px 0 5px;
  text-align: center; background: var(--paper); border: 1px solid var(--line);
  border-radius: 8px; transition: all .2s ease;
}
.chip .dow { display: block; font-size: 10px; color: var(--ink-mute); line-height: 1.4; }
.chip .dd { display: block; font-family: var(--num); font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.chip:active { transform: scale(.94); }
.chip.on { background: var(--blue); border-color: var(--blue); }
.chip.on .dow, .chip.on .dd { color: #ffffff; }

/* ---------- 日版块：编辑部式（左日期轨 + 条目流） ---------- */
.dayblock { padding-top: 6px; }
.dateline { padding: 28px 0 4px; display: flex; align-items: flex-end; gap: 16px; }
.dateline .big {
  font-family: var(--num); font-weight: 700; color: var(--ink);
  font-size: 46px; line-height: .95; letter-spacing: -1px;
}
.dateline .big span { color: var(--blue); }
.dateline .sub { font-size: 12.5px; color: var(--ink-mute); line-height: 1.7; padding-bottom: 3px; }
.dateline .sub b { color: var(--ink); font-weight: 700; }
.dateline .big.word { font-family: var(--serif); font-size: 30px; letter-spacing: 3px; line-height: 1.2; }

.entry {
  position: relative;
  padding: 28px 0 24px;
  border-bottom: 1px solid var(--line);
}
.entry .ghost {
  position: absolute; top: 16px; right: -4px;
  font-family: var(--num); font-weight: 700;
  font-size: 100px; line-height: 1; color: var(--blue);
  opacity: .07; pointer-events: none; user-select: none;
}
.entry .no {
  font-family: var(--num); font-weight: 700; font-size: 14px;
  color: var(--blue); letter-spacing: 2px;
}
.entry .no::after {
  content: ""; display: inline-block; width: 34px; height: 3px;
  background: var(--blue); vertical-align: middle; margin-left: 10px;
}
.entry h2 {
  font-family: var(--serif); font-weight: 900; color: var(--ink);
  font-size: 21px; line-height: 1.55; margin: 10px 0 12px; letter-spacing: .5px;
}
.entry.lead h2 { font-size: 25px; }
.entry h2 a:active { color: var(--blue); }
.entry .what { text-align: justify; margin-bottom: 14px; }
.entry .src { font-size: 12px; line-height: 1.9; color: var(--ink-mute); }
.entry .src .lab {
  font-family: var(--num); font-size: 10px; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--ink-faint); margin-right: 8px;
}
.entry .src b { color: var(--ink-soft); font-weight: 700; }
.entry .src a { color: #8f9bb3; word-break: break-all; }
.entry .src a:active { color: var(--blue); }

/* ---------- 加载更早 / 回顶 / 返回 ---------- */
.loadmore {
  display: block; width: 100%; margin: 22px 0 6px; padding: 12px 0;
  font-size: 13.5px; font-weight: 700; letter-spacing: 3px; color: var(--blue);
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.loadmore:active { transform: scale(.98); }
.loadmore:disabled { color: var(--ink-faint); }
.backline { display: inline-block; margin: 20px 0; font-size: 13.5px; font-weight: 700; color: var(--blue); }
.totop {
  position: fixed; right: 16px; bottom: 88px; z-index: 9;
  width: 40px; height: 40px; line-height: 40px; text-align: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: 50%;
  color: var(--blue); font-size: 16px; font-weight: 700;
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: all .3s ease; box-shadow: 0 4px 14px rgba(20, 30, 70, .08);
}
.totop.show { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- 白纸页（搜索/目录/详情） ---------- */
.sheet { padding-top: 8px; }

/* 搜索 */
.searchbar { display: flex; gap: 0; margin: 26px 0 8px; }
.searchbar input {
  flex: 1; font-size: 16px; font-family: var(--sans);
  padding: 11px 2px; color: var(--ink);
  border: none; border-bottom: 2px solid var(--ink);
  border-radius: 0; outline: none; background: transparent;
}
.searchbar input::placeholder { color: var(--ink-faint); }
.searchbar input:focus { border-bottom-color: var(--blue); }
.searchbar button {
  font-size: 14px; font-weight: 700; letter-spacing: 3px;
  padding: 11px 20px; color: #fff; background: var(--blue);
  border: none; border-radius: 0; cursor: pointer;
}
.searchbar button:active { transform: scale(.96); }
.hint { font-size: 12.5px; color: var(--ink-mute); margin: 12px 0; }
.hint b { color: var(--ink); }
.result { padding: 20px 0 15px; border-bottom: 1px solid var(--line); }
.result .d { font-family: var(--num); font-size: 11px; letter-spacing: 2px; color: var(--ink-mute); text-transform: uppercase; }
.result h3 { font-family: var(--serif); font-weight: 900; font-size: 17.5px; line-height: 1.55; color: var(--ink); margin: 4px 0 5px; }
.result h3 a:active { color: var(--blue); }
.result p {
  font-size: 14px; line-height: 1.85; color: var(--ink-mute);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* 目录 */
.month { padding: 30px 0 4px; }
.month .label { font-family: var(--serif); font-weight: 900; font-size: 22px; color: var(--ink); letter-spacing: 1px; }
.month .label::after { content: ""; display: block; width: 40px; height: 3px; background: var(--blue); margin-top: 7px; }
.day-row { padding: 17px 0 12px; border-bottom: 1px solid var(--line); }
.day-row .d { display: flex; align-items: baseline; gap: 9px; margin-bottom: 5px; }
.day-row .d a { font-family: var(--num); font-weight: 700; font-size: 18px; color: var(--blue); letter-spacing: 1px; }
.day-row .d a:active { opacity: .6; }
.day-row .d span { font-size: 12px; color: var(--ink-mute); }
.day-row ol { list-style: none; }
.day-row li { display: flex; gap: 11px; align-items: baseline; font-size: 15px; line-height: 1.9; padding: 2px 0; }
.day-row li .n { font-family: var(--num); font-size: 11.5px; color: var(--ink-faint); min-width: 17px; text-align: right; }
.day-row li a:active { color: var(--blue); }

/* 详情 */
.detail { padding-top: 26px; }
.detail .kicker, .weekly-page .kicker { font-family: var(--num); font-size: 11px; letter-spacing: 3px; color: var(--blue); text-transform: uppercase; }
.detail h1 { font-family: var(--serif); font-weight: 900; color: var(--ink); font-size: 26px; line-height: 1.5; margin: 12px 0 12px; letter-spacing: .5px; }
.detail .meta { font-size: 12.5px; color: var(--ink-mute); padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.detail .what { font-size: 16px; line-height: 2; text-align: justify; padding: 20px 0 6px; }
.detail .srcbox, .weekly-page .srcbox { border-top: 1px solid var(--ink); margin-top: 20px; padding: 13px 0 4px; }
.detail .srcbox .lab, .weekly-page .srcbox .lab { font-family: var(--num); font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: var(--ink-faint); }
.detail .srcbox b, .weekly-page .srcbox b { display: block; font-size: 14px; color: var(--ink); margin: 4px 0 2px; }
.detail .srcbox a { font-size: 12px; color: #8f9bb3; word-break: break-all; }
.detail .back, .weekly-page .back { display: inline-block; margin-top: 24px; font-size: 14px; font-weight: 700; color: var(--blue); }
.detail .back:active, .weekly-page .back:active { opacity: .6; }

/* ---------- 详情页：标签 / 上一条下一条 ---------- */
.detail .tags { padding: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.detail .tag { font-size: 12px; color: var(--blue); background: var(--blue-soft); padding: 2px 10px; border-radius: 12px; letter-spacing: .5px; }
.detail .pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.detail .pager a { font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); }
.detail .pager a .lab { display: block; font-family: var(--num); font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 3px; }
.detail .pager a.next { text-align: right; }
.detail .pager a:active { color: var(--blue); }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 66px 0; }
.empty .mark { font-family: var(--num); font-size: 42px; font-weight: 700; color: var(--blue); opacity: .16; line-height: 1; }
.empty p { font-size: 13.5px; color: var(--ink-mute); margin-top: 11px; }
.empty .backline { margin-top: 6px; }

/* ---------- 页脚 / 底部导航 ---------- */
.foot { max-width: 720px; margin: 46px auto 0; padding: 13px 20px 16px; border-top: 2px solid var(--ink); }
.foot .brand-s { font-family: var(--serif); font-weight: 900; font-size: 15px; color: var(--ink); }
.foot .line { font-size: 11px; color: var(--ink-faint); line-height: 1.9; margin-top: 4px; }

.tab {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
}
.tab a { flex: 1; text-align: center; padding: 13px 0 11px; font-size: 13.5px; letter-spacing: 3px; color: var(--ink-mute); }
.tab a.on { color: var(--blue); font-weight: 700; }
.tab a.on::after { content: ""; display: block; width: 16px; height: 3px; border-radius: 2px; background: var(--blue); margin: 3px auto 0; }
.tab a:active { transform: scale(.96); }

/* ---------- 宽屏：非对称双栏（日期轨吸附左侧） ---------- */
@media (min-width: 900px) {
  .shell, .topbar-in, .strap, .foot, .rule-top { max-width: 920px; }
  .dayblock { display: grid; grid-template-columns: 190px 1fr; gap: 44px; }
  .dayblock .dateline {
    display: block; position: sticky; top: 86px; align-self: start;
    padding-top: 34px;
  }
  .dayblock .dateline .big { font-size: 64px; }
  .dayblock .dateline .sub { margin-top: 12px; }
  .entry .ghost { font-size: 140px; right: 0; }
  .entry.lead h2 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chip, .totop { transition: none; }
}

/* ---------- 周刊正文 ---------- */
.weekly-page { padding-top: 26px; }
.weekly-page h1 { font-family: var(--serif); font-weight: 900; color: var(--ink); font-size: 26px; line-height: 1.5; margin: 12px 0 18px; letter-spacing: .5px; }
.weekly-page h2 { font-family: var(--serif); font-weight: 900; color: var(--ink); font-size: 20px; line-height: 1.5; margin: 1.8em 0 .6em; padding-top: .9em; border-top: 1px solid var(--line); }
.weekly-page h3 { font-weight: 700; color: var(--ink); font-size: 16px; margin: 1.2em 0 .4em; }
.weekly-page p, .weekly-page li { line-height: 1.95; text-align: justify; margin-bottom: .6em; }
.weekly-page ul, .weekly-page ol { padding-left: 1.3em; }
.weekly-page a { color: var(--blue); }
.weekly-page hr { border: none; border-top: 1px solid var(--line); margin: 1.6em 0; }
.weekly-page blockquote { margin: 0 0 1em; padding: .6em 1em; background: var(--blue-soft); border-left: 3px solid var(--blue); color: var(--ink-soft); }
.weekly-page table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 1em 0; display: block; overflow-x: auto; }
.weekly-page th, .weekly-page td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
