/* ============================================================================
 * 暮色手帖 · 档案室版（archive.css）
 * ----------------------------------------------------------------------------
 * 以「莱茵生命 R-01 档案室」视觉体系重制全站：暖白底板 / 墨黑 / 莱茵橙，
 * DIN 窄体技术字 + 等宽批注，部门制导航与档案编号。
 * 与原站共用 app.js / entries.js，DOM 挂钩（#calendarGrid、#recentList、
 * #categoryGrid、#articleBody 等）完全一致，只换皮不换逻辑。
 *
 * 主题：默认 = 档案室（暖白）；body.light = 夜间值班（暗色机房）。
 * ========================================================================== */

:root {
  --bg: #e9e6e0;
  --panel: #f1efe9;
  --panel-2: #e2dfd7;
  --ink: #141412;
  --ink-soft: #43413c;
  --muted: #8b897f;
  --hair: rgba(20, 20, 18, .24);
  --hair-soft: rgba(20, 20, 18, .09);
  --orange: #ff7500;
  --orange-soft: rgba(255, 117, 0, .12);
  --ok: #2e9e63;
  --code-bg: #141412;
  --code-ink: #e9e6df;
  --tok-comment: #8b897f;
  --tok-string: #2e7d4f;
  --tok-number: #b35400;
  --tok-keyword: #c95f00;
  --tok-function: #1f5fa8;
  --tok-property: #6b4fa0;
  --tok-tag: #b3502e;
  --shadow-ink: #141412;
  --din: "Bahnschrift", "DIN Alternate", "DIN Condensed", "Oswald", "Arial Narrow", "Roboto Condensed", "Noto Sans Display", "Microsoft YaHei", "PingFang SC", sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", "Consolas", "Menlo", "DejaVu Sans Mono", "Liberation Mono", ui-monospace, monospace;
  --zh: "Microsoft YaHei", "PingFang SC", "Source Han Sans SC", "Noto Sans SC", sans-serif;
}
/* 夜间值班：暗色机房 */
body.light {
  --bg: #0e1013;
  --panel: #15181d;
  --panel-2: #1a1e24;
  --ink: #e9e6df;
  --ink-soft: #b9b7ae;
  --muted: #767a80;
  --hair: rgba(233, 230, 223, .22);
  --hair-soft: rgba(233, 230, 223, .08);
  --orange-soft: rgba(255, 117, 0, .14);
  --code-bg: #0a0b0d;
  --tok-comment: #6f7378;
  --tok-string: #57c58a;
  --tok-number: #ff9a4d;
  --tok-keyword: #ff9a4d;
  --tok-function: #6ea8ff;
  --tok-property: #b79bff;
  --tok-tag: #ff8a6a;
  --shadow-ink: #000;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(rgba(127, 127, 127, .07) 1px, transparent 1px) 0 0 / 26px 26px,
    var(--bg);
  color: var(--ink);
  font-family: var(--zh);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  min-width: 320px;
}
body.light::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 40;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.013) 0 1px, transparent 1px 3px);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; }
::selection { background: rgba(255, 117, 0, .35); color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 40px; }

/* ============ 顶部技术条 ============ */
.utility {
  border-bottom: 1px solid var(--hair);
  font-family: var(--mono); font-size: 10px; letter-spacing: .22em;
  color: var(--ink-soft);
}
.utility .wrap { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.utility b { color: var(--orange); font-weight: 400; }

/* ============ 页眉：厂牌 + 部门导航 ============ */
.masthead .wrap { display: flex; align-items: center; gap: 22px; padding: 24px 40px 20px; }
.logo-mark {
  width: 46px; height: 46px; flex: none;
  background: var(--orange); color: #fff;
  display: grid; place-items: center;
  font-family: var(--din); font-size: 24px; font-weight: 700;
  box-shadow: 4px 4px 0 var(--shadow-ink);
}
.logo-text strong { display: block; font-family: var(--din); font-size: 20px; font-weight: 700; letter-spacing: .06em; }
.logo-text small { display: block; margin-top: 4px; font-family: var(--mono); font-size: 9px; letter-spacing: .3em; color: var(--muted); }
.dept-nav { margin-left: auto; display: flex; gap: 4px; align-items: stretch; }
.dept {
  padding: 8px 16px; border: 1px solid transparent; display: block;
}
.dept b { display: block; font-family: var(--din); font-size: 13px; font-weight: 700; letter-spacing: .2em; }
.dept span { display: block; margin-top: 3px; font-family: var(--mono); font-size: 8px; letter-spacing: .24em; color: var(--muted); }
.dept:hover { border-color: var(--hair); background: var(--panel); }
.dept.active { border-color: var(--ink); background: var(--panel); box-shadow: 3px 3px 0 var(--shadow-ink); }
.dept.active b::before { content: ""; display: inline-block; width: 7px; height: 7px; background: var(--orange); margin-right: 8px; }
.theme-toggle {
  margin-left: 8px; width: 40px; height: 40px; flex: none;
  border: 1px solid var(--hair); background: var(--panel);
  font-size: 15px; line-height: 1;
}
.theme-toggle:hover { border-color: var(--orange); color: var(--orange); }

/* ============ HERO 档案板 ============ */
.hero { position: relative; border: 1px solid var(--ink); background: var(--panel); margin-top: 4px; }
body.light .hero { border-color: var(--hair); }
.hero::before, .hero::after, .hero .marks i { content: ""; position: absolute; width: 14px; height: 14px; border: 1.5px solid var(--ink); z-index: 2; }
body.light .hero::before, body.light .hero::after, body.light .hero .marks i { border-color: rgba(233,230,223,.5); }
.hero::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; }
.hero::after { right: -1px; top: -1px; border-left: 0; border-bottom: 0; }
.hero .marks i:nth-child(1) { left: -1px; bottom: -1px; border-right: 0; border-top: 0; }
.hero .marks i:nth-child(2) { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.hero-main { padding: 44px 48px 40px; border-right: 1px solid var(--hair); position: relative; }
.eyebrow { font-family: var(--mono); font-size: 10px; letter-spacing: .32em; color: var(--ink-soft); }
.eyebrow b { color: var(--orange); font-weight: 400; }
.hero h1 {
  margin: 20px 0 16px;
  font-family: var(--din); font-size: clamp(40px, 5vw, 66px);
  font-weight: 700; letter-spacing: .08em; line-height: 1.24;
}
.hero h1 em { font-style: normal; color: var(--orange); display: inline-block; white-space: nowrap; }
.hero .lede { color: var(--ink-soft); font-size: 13.5px; line-height: 2.1; max-width: 560px; }
.hero-cta { display: flex; gap: 14px; margin-top: 28px; align-items: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 26px;
  background: var(--ink); color: var(--bg);
  font-size: 13px; font-weight: 700; letter-spacing: .24em;
  box-shadow: 4px 4px 0 var(--orange);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--orange); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); box-shadow: none; }
.btn.ghost:hover { background: var(--ink); color: var(--bg); box-shadow: none; }
.hero-side { padding: 28px 26px; display: grid; gap: 16px; align-content: start; }
.side-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: .28em; color: var(--muted);
  display: flex; align-items: center; gap: 8px;
}
.side-label::before { content: ""; width: 8px; height: 8px; background: var(--orange); flex: none; }
.big-date { font-family: var(--din); font-size: 46px; font-weight: 700; line-height: 1.05; letter-spacing: .03em; }
.big-date small { display: block; margin-top: 8px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .26em; color: var(--muted); font-weight: 400; }
.tiny-rule { height: 1px; background: var(--hair); }
.stat-line { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: var(--ink-soft); }
.stat-line b { color: var(--ink); font-weight: 700; }
.stat-line b.rec { color: var(--orange); font-weight: 400; }

/* ============ 分区标题 ============ */
.section-head {
  display: flex; align-items: baseline; gap: 16px;
  margin-top: 46px; padding-bottom: 12px; border-bottom: 1px solid var(--ink);
}
body.light .section-head { border-bottom-color: var(--hair); }
.section-head h2 { font-family: var(--din); font-size: 19px; font-weight: 700; letter-spacing: .26em; }
.section-head .en { font-family: var(--mono); font-size: 9px; letter-spacing: .3em; color: var(--muted); }
.section-head .idx { margin-left: auto; font-family: var(--mono); font-size: 10px; letter-spacing: .2em; color: var(--ink-soft); }
.section-head .idx b { color: var(--orange); font-weight: 400; }
.section-copy { margin-top: 10px; font-size: 12px; color: var(--muted); line-height: 1.9; }

/* ============ 两栏主体 ============ */
.columns { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 34px; align-items: start; }

/* ============ 档案条目（文章卡） ============ */
.entry-list { counter-reset: files; }
.entry-card {
  position: relative;
  display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 19px 6px; border-bottom: 1px solid var(--hair-soft);
  counter-increment: files;
  transition: background .15s ease;
}
.entry-card:hover { background: var(--panel); }
.entry-card::before {
  content: "RLD-" counter(files, decimal-leading-zero);
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .08em;
  color: var(--ink); display: block;
}
.entry-card::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--hair-soft); }
.entry-card:hover::after { background: var(--orange); }
.entry-card .meta {
  display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .2em;
  color: var(--muted); margin-bottom: 7px;
}
.entry-card .meta .note-kind { color: var(--ok); }
.entry-card h3 { font-size: 15.5px; font-weight: 700; letter-spacing: .05em; line-height: 1.55; }
.entry-card:hover h3 { color: var(--orange); }
.entry-card p { margin-top: 6px; font-size: 11.5px; line-height: 1.85; color: var(--muted); max-width: 540px; }
.entry-card .category-line { display: inline-block; margin-top: 8px; padding: 2px 9px; border: 1px solid var(--hair); font-family: var(--mono); font-size: 8.5px; letter-spacing: .22em; color: var(--ink-soft); }
.entry-card .arrow { font-size: 18px; color: var(--muted); padding-right: 4px; transition: color .15s ease, transform .15s ease; }
.entry-card:hover .arrow { color: var(--orange); transform: translate(2px, -2px); }
.empty-message { padding: 26px 6px; font-size: 12px; color: var(--muted); line-height: 2; }

/* ============ 面板通用 ============ */
.panel { border: 1px solid var(--ink); background: var(--panel); padding: 20px 22px 22px; position: relative; }
body.light .panel { border-color: var(--hair); }
.panel .corner { position: absolute; right: 10px; top: 10px; font-family: var(--mono); font-size: 8px; letter-spacing: .2em; color: var(--muted); }
.rail { display: grid; gap: 26px; align-content: start; }
.quote { margin-top: 13px; font-family: Georgia, var(--zh); font-size: 16px; line-height: 2.05; letter-spacing: .04em; }
.quote::before { content: "「"; color: var(--orange); }
.quote::after { content: "」"; color: var(--orange); }

/* 复核队列 */
.due-item {
  display: block; padding: 11px 2px; border-bottom: 1px solid var(--hair-soft);
}
.due-item:last-child { border-bottom: 0; }
.due-item strong { display: block; font-size: 12.5px; font-weight: 700; line-height: 1.6; }
.due-item:hover strong { color: var(--orange); }
.due-item span { display: block; margin-top: 4px; font-family: var(--mono); font-size: 9px; letter-spacing: .18em; color: var(--muted); }
.due-empty { padding: 10px 0 2px; font-size: 12px; color: var(--muted); line-height: 2; }

/* 小狗收容舱 */
.dog-stage {
  margin-top: 14px; height: 200px; position: relative; display: grid;
  background: var(--panel-2); border: 1px solid var(--hair-soft); overflow: hidden;
}
.dog-stage::before {
  content: ""; position: absolute; left: 0; right: 0; top: 14px; height: 1px;
  background: repeating-linear-gradient(90deg, var(--hair) 0 6px, transparent 6px 12px);
}
.dog-stage::after {
  content: ""; position: absolute; bottom: 16px; left: 50%; width: 118px; height: 10px;
  transform: translateX(-50%); border-radius: 50%;
  background: rgba(0, 0, 0, .16); filter: blur(3px);
}
.dog-stage picture { display: grid; place-items: end center; height: 100%; width: 100%; }
.dog-sprite {
  width: 175px; max-width: 78%; height: auto;
  image-rendering: pixelated; position: relative; z-index: 2; margin-bottom: 18px;
}
.dog-asset-hint { margin-top: 12px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; color: var(--orange); line-height: 1.9; }
.dog-caption { margin-top: 12px; font-size: 11px; color: var(--muted); line-height: 1.9; }

/* ============ 日历（月视图） ============ */
.month-controls { display: flex; align-items: center; gap: 10px; }
.month-controls strong { font-family: var(--din); font-size: 15px; font-weight: 700; letter-spacing: .14em; min-width: 108px; text-align: center; }
.icon-button {
  width: 30px; height: 30px; border: 1px solid var(--hair); background: var(--panel);
  font-size: 17px; line-height: 1; color: var(--ink-soft); display: grid; place-items: center;
}
.icon-button:hover { border-color: var(--orange); color: var(--orange); }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { margin-top: 18px; border-bottom: 1px solid var(--hair); }
.calendar-weekdays span {
  padding: 9px 0; text-align: center; font-family: var(--mono);
  font-size: 9px; letter-spacing: .3em; color: var(--muted);
}
.calendar-grid { border-left: 1px solid var(--hair-soft); }
.calendar-day, .calendar-blank {
  border-right: 1px solid var(--hair-soft); border-bottom: 1px solid var(--hair-soft);
  min-height: 92px; padding: 9px 10px; position: relative;
}
.calendar-blank { background: var(--hair-soft); }
.calendar-day { display: flex; flex-direction: column; gap: 6px; transition: background .15s ease; }
.calendar-day:hover { background: var(--panel); }
.day-number {
  font-family: var(--mono); font-size: 11px; color: var(--ink-soft);
  width: 22px; height: 22px; display: grid; place-items: center;
}
.calendar-day.today .day-number { background: var(--ink); color: var(--bg); }
.calendar-day.today { box-shadow: inset 0 0 0 1px var(--orange); }
.calendar-day.selected::after { content: ""; position: absolute; inset: 0; border: 1px solid var(--orange); pointer-events: none; }
.day-entry-list { display: grid; gap: 3px; }
.day-entry {
  font-family: var(--mono); font-size: 9px; letter-spacing: .04em; line-height: 1.5;
  color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding-left: 9px; position: relative;
}
.day-entry::before { content: ""; position: absolute; left: 0; top: 5px; width: 4px; height: 4px; background: var(--orange); }
.day-entry.note::before { background: var(--ok); }
.day-entry:hover { color: var(--orange); }
.legend { display: flex; gap: 18px; align-items: center; font-family: var(--mono); font-size: 9px; letter-spacing: .2em; color: var(--muted); }
.legend span { display: flex; gap: 7px; align-items: center; }
.legend-dot { width: 7px; height: 7px; background: var(--orange); display: inline-block; }
.legend-dot.note { background: var(--ok); }
.quiet-button { background: none; border: 0; padding: 4px 0; font-family: var(--mono); font-size: 10px; letter-spacing: .22em; color: var(--ink-soft); }
.quiet-button:hover { color: var(--orange); }
.calendar-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }

/* ============ 年度热力图 ============ */
.heatmap-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.year-controls { display: flex; align-items: center; gap: 10px; }
.year-controls strong { font-family: var(--din); font-size: 16px; font-weight: 700; letter-spacing: .14em; min-width: 84px; text-align: center; }
.year-stats { font-family: var(--mono); font-size: 9.5px; letter-spacing: .18em; color: var(--muted); margin-left: 8px; }
.heatmap-scroll { margin-top: 22px; overflow-x: auto; padding-bottom: 8px; }
.heatmap-wrap { display: flex; gap: 8px; min-width: max-content; }
.year-weekdays { display: grid; grid-template-rows: repeat(7, 13px); gap: 3px; font-family: var(--mono); font-size: 8px; color: var(--muted); }
.year-weekdays span { height: 13px; line-height: 13px; }
.heatmap-grid { display: grid; grid-template-rows: repeat(7, 13px); grid-auto-flow: column; grid-auto-columns: 13px; gap: 3px; }
.heat-cell { border: 0; border-radius: 2px; background: var(--hair-soft); padding: 0; }
.heat-cell:hover { outline: 1px solid var(--orange); }
.heat-cell.level-1 { background: rgba(255, 117, 0, .3); }
.heat-cell.level-2 { background: rgba(255, 117, 0, .55); }
.heat-cell.level-3 { background: rgba(255, 117, 0, .8); }
.heat-cell.level-4 { background: var(--orange); }
.heat-cell.future { opacity: .22; }
.heat-blank { visibility: hidden; }
.year-months {
  display: grid; grid-template-columns: repeat(var(--weeks, 53), 13px); gap: 3px;
  margin-top: 7px; font-family: var(--mono); font-size: 8.5px; color: var(--muted); letter-spacing: .06em;
}
.heatmap-foot { display: flex; justify-content: space-between; gap: 14px; margin-top: 14px; font-family: var(--mono); font-size: 9px; letter-spacing: .16em; color: var(--muted); }
.heatmap-scale { display: flex; gap: 5px; align-items: center; }
.heatmap-scale i { width: 11px; height: 11px; border-radius: 2px; display: inline-block; background: var(--hair-soft); }
.heatmap-scale i.level-1 { background: rgba(255, 117, 0, .3); }
.heatmap-scale i.level-2 { background: rgba(255, 117, 0, .55); }
.heatmap-scale i.level-3 { background: rgba(255, 117, 0, .8); }

/* ============ 十二个月的章节 ============ */
.chapter-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 20px; }
.chapter-card {
  border: 1px solid var(--hair); background: var(--panel); padding: 15px 17px;
  display: grid; gap: 5px; text-align: left; position: relative;
  transition: transform .15s ease, box-shadow .15s ease;
}
.chapter-card:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--orange); border-color: var(--ink); }
body.light .chapter-card:hover { border-color: var(--hair); }
.chapter-number {
  font-family: var(--din); font-weight: 700; font-size: 24px; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px var(--ink-soft);
}
.chapter-card:hover .chapter-number { color: var(--orange); -webkit-text-stroke-color: var(--orange); }
.chapter-card strong { font-family: var(--zh); font-size: 13px; font-weight: 700; letter-spacing: .1em; }
.chapter-card small { font-family: var(--mono); font-size: 8.5px; letter-spacing: .14em; color: var(--muted); }

/* ============ 笔记库 ============ */
.note-overview { display: flex; justify-content: space-between; align-items: center; gap: 22px; margin-top: 26px; flex-wrap: wrap; }
.note-overview h2 { font-family: var(--din); font-size: 17px; font-weight: 700; letter-spacing: .24em; margin-top: 9px; }
.note-overview p { margin-top: 9px; font-size: 12px; color: var(--muted); line-height: 1.9; }
.search-wrap {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--hair); background: var(--panel); padding: 9px 13px; color: var(--muted);
}
.search-wrap span { font-size: 15px; }
.search-wrap input { border: 0; outline: 0; background: none; color: var(--ink); font-size: 12px; width: 190px; font-family: var(--mono); letter-spacing: .04em; }
.search-wrap input::placeholder { color: var(--muted); }
.search-wrap:focus-within { border-color: var(--orange); }
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 22px; }
.category-card {
  border: 1px solid var(--hair); background: var(--panel); padding: 15px 17px;
  display: flex; gap: 13px; align-items: center; text-align: left;
  transition: transform .15s ease, box-shadow .15s ease;
}
.category-card:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--shadow-ink); }
.category-card.active { border-color: var(--ink); box-shadow: 4px 4px 0 var(--orange); }
body.light .category-card.active { border-color: var(--orange); }
.category-symbol { font-size: 17px; color: var(--orange); }
.category-card strong { display: block; font-size: 13px; font-weight: 700; letter-spacing: .06em; }
.category-card small { display: block; margin-top: 4px; font-family: var(--mono); font-size: 8.5px; letter-spacing: .18em; color: var(--muted); }
.library-toolbar { display: flex; align-items: baseline; gap: 14px; margin: 34px 0 4px; padding-bottom: 10px; border-bottom: 1px solid var(--hair); }
.library-toolbar strong { font-family: var(--din); font-size: 16px; font-weight: 700; letter-spacing: .2em; }
.library-toolbar span { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; color: var(--orange); }
.due-toggle-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 22px; flex-wrap: wrap; }

/* ============ 文章阅读页 ============ */
.reader-back { margin: 30px 0 0; font-family: var(--mono); font-size: 10px; letter-spacing: .22em; }
.reader-back a { color: var(--ink-soft); }
.reader-back a:hover { color: var(--orange); }
.reader-panel { margin-top: 16px; padding: 44px clamp(24px, 6vw, 72px) 52px; }
.reader-date { margin-top: 16px; font-family: var(--mono); font-size: 10px; letter-spacing: .3em; color: var(--muted); }
.reader-panel h1 {
  margin: 14px 0 12px; font-family: var(--din); font-weight: 700;
  font-size: clamp(26px, 3.4vw, 40px); letter-spacing: .06em; line-height: 1.45;
}
.reader-summary { color: var(--ink-soft); font-size: 13px; line-height: 2.05; max-width: 660px; }
.dialog-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.dialog-tags span {
  border: 1px solid var(--hair); padding: 4px 11px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .18em; color: var(--ink-soft);
}
.reader-rule { height: 1px; background: var(--hair); margin: 30px 0 6px; }
.reader-end { margin-top: 44px; text-align: center; font-family: var(--mono); font-size: 9.5px; letter-spacing: .4em; color: var(--muted); }
.reader-more { margin: 26px 0 0; display: flex; gap: 18px; font-family: var(--mono); font-size: 10px; letter-spacing: .22em; }
.reader-more a { color: var(--ink-soft); border-bottom: 1px solid var(--hair); padding-bottom: 3px; }
.reader-more a:hover { color: var(--orange); border-bottom-color: var(--orange); }

/* —— Markdown 正文 —— */
.markdown-body { margin-top: 24px; font-size: 14px; line-height: 2.15; color: var(--ink-soft); overflow-wrap: anywhere; }
.markdown-body strong { color: var(--ink); }
.markdown-body h2, .markdown-body h3, .markdown-body h4 {
  color: var(--ink); font-weight: 700; line-height: 1.5; margin: 34px 0 12px; letter-spacing: .05em;
}
.markdown-body h2 { font-size: 19px; padding-left: 14px; position: relative; }
.markdown-body h2::before { content: ""; position: absolute; left: 0; top: .32em; width: 6px; height: 6px; background: var(--orange); }
.markdown-body h3 { font-size: 16px; }
.markdown-body h4 { font-size: 14px; }
.markdown-body a { color: var(--orange); border-bottom: 1px solid rgba(255, 117, 0, .4); }
.markdown-body ul, .markdown-body ol { padding-left: 24px; margin: 12px 0; }
.markdown-body li { margin: 5px 0; }
.markdown-body li::marker { color: var(--orange); font-family: var(--mono); font-size: .9em; }
.markdown-body blockquote {
  margin: 18px 0; padding: 12px 18px; border-left: 3px solid var(--orange);
  background: var(--orange-soft); color: var(--ink);
}
.markdown-body blockquote p { margin: 0; }
.markdown-body code {
  font-family: var(--mono); font-size: .86em; padding: 2px 6px;
  background: var(--panel-2); border: 1px solid var(--hair-soft);
}
.markdown-body hr { border: 0; height: 1px; background: var(--hair); margin: 28px 0; }
.md-highlight { background: linear-gradient(transparent 55%, rgba(255, 117, 0, .35) 55%); color: var(--ink); }
.md-code { margin: 20px 0; border: 1px solid var(--hair); background: var(--code-bg); }
.md-code-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px; border-bottom: 1px solid rgba(233, 230, 223, .12);
  font-family: var(--mono); font-size: 9px; letter-spacing: .26em; color: #8b897f;
}
.code-dots { color: var(--orange); font-size: 7px; letter-spacing: .3em; }
.md-code pre { padding: 16px 18px; overflow-x: auto; }
.md-code code { background: none; border: 0; padding: 0; color: var(--code-ink); font-size: 12px; line-height: 1.85; }
.tok-comment { color: var(--tok-comment); font-style: italic; }
.tok-string { color: var(--tok-string); }
.tok-number { color: var(--tok-number); }
.tok-keyword { color: var(--tok-keyword); }
.tok-function { color: var(--tok-function); }
.tok-property { color: var(--tok-property); }
.tok-tag { color: var(--tok-tag); }
.tok-selector { color: var(--tok-keyword); }
.md-table-scroll { overflow-x: auto; margin: 20px 0; border: 1px solid var(--hair); }
.md-table-scroll table { border-collapse: collapse; width: 100%; min-width: 460px; }
.md-table-scroll th {
  font-family: var(--mono); font-size: 10px; letter-spacing: .2em; text-align: left;
  color: var(--ink); background: var(--panel-2); padding: 10px 14px; border-bottom: 1px solid var(--hair);
}
.md-table-scroll td { padding: 10px 14px; border-bottom: 1px solid var(--hair-soft); font-size: 12.5px; }

/* ============ 页脚 ============ */
footer.site-footer { margin-top: 64px; border-top: 1px solid var(--ink); }
body.light footer.site-footer { border-top-color: var(--hair); }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 40px 30px; }
.barcode {
  width: 150px; height: 26px; flex: none;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 9px);
}
body.light .barcode { background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px); }
footer .fine { font-family: var(--mono); font-size: 9px; letter-spacing: .22em; color: var(--muted); line-height: 2; text-align: center; }
footer .fine b { color: var(--ink); font-weight: 400; }
footer .up { font-family: var(--mono); font-size: 10px; letter-spacing: .22em; color: var(--ink-soft); }
footer .up:hover { color: var(--orange); }
.bottom-navigation { display: flex; justify-content: space-between; gap: 14px; margin: 44px 0 0; }
.bottom-navigation a {
  padding: 12px 22px; border: 1px solid var(--ink);
  font-family: var(--zh); font-size: 12.5px; font-weight: 700; letter-spacing: .18em;
}
.bottom-navigation a:hover { background: var(--ink); color: var(--bg); }

/* 页面引导语 */
.page-intro { margin-top: 36px; }
.page-intro h1 { font-family: var(--din); font-size: clamp(30px, 3.8vw, 48px); font-weight: 700; letter-spacing: .08em; line-height: 1.3; margin: 16px 0 12px; }
.page-intro h1 em { font-style: normal; color: var(--orange); }
.page-intro p { color: var(--ink-soft); font-size: 13px; line-height: 2.05; max-width: 620px; }

main.inner-page section { margin-top: 34px; }

/* ============ 部门检索条 ============ */
.dept-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.dept-cats { display: contents; }
.dept-tab {
  border: 1px solid var(--hair); background: var(--panel);
  padding: 12px 18px; display: grid; gap: 5px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.dept-tab:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--orange); border-color: var(--ink); }
.dept-tab b { font-family: var(--din); font-size: 13px; font-weight: 700; letter-spacing: .16em; }
.dept-tab span { font-family: var(--mono); font-size: 8.5px; letter-spacing: .2em; color: var(--muted); }
.dept-tab span em { font-style: normal; color: var(--orange); }

/* ============ 补充布局钩子 ============ */
.section-head .month-controls { margin-left: auto; }
.section-head .search-wrap { margin-left: auto; }
.p-title { font-family: var(--din); font-size: 17px; font-weight: 700; letter-spacing: .22em; margin-top: 10px; }
.more-link { display: block; text-align: right; margin-top: 16px; }

/* ============ 响应式 ============ */
@media (max-width: 940px) {
  .wrap { padding: 0 22px; }
  .hero-grid, .columns { grid-template-columns: 1fr; }
  .hero-main { border-right: 0; border-bottom: 1px solid var(--hair); padding: 34px 28px 32px; }
  .dept-nav { display: none; }
  .utility .wrap span:last-child { display: none; }
  .chapter-grid { grid-template-columns: repeat(2, 1fr); }
  .entry-card { grid-template-columns: 1fr auto; }
  .entry-card::before { grid-column: 1 / -1; margin-bottom: 2px; }
  .entry-card .arrow { grid-row: 2; }
  footer .wrap { flex-direction: column; text-align: center; }
  footer .fine { text-align: center; }
}
