/* ==========================================================================
   每日资讯 · 60秒看天下
   版式取向：财经报纸编辑部的「纸感 + 留白 + 细分隔线」，
   标题用宋体拉出权威感，正文用无衬线保证屏读舒服；
   板块用极窄的彩色竖条区分，不做花哨卡片，让内容自己站住。
   ========================================================================== */

/* ------------------------------- 主题变量 -------------------------------- */
html[data-theme="dark"] {
  --bg: #0a1019;
  --bg-grad: radial-gradient(1200px 600px at 15% -10%, rgba(56, 130, 246, 0.10), transparent 60%),
             radial-gradient(900px 500px at 90% 0%, rgba(240, 180, 90, 0.07), transparent 55%);
  --paper: #111a28;
  --paper-2: #0e1622;
  --ink: rgba(255, 255, 255, 0.93);
  --ink-2: rgba(255, 255, 255, 0.66);
  --ink-3: rgba(255, 255, 255, 0.42);
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.07);
  --accent: #e9b25c;
  --accent-soft: rgba(233, 178, 92, 0.13);
  --link: #7aa7ff;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  --mark: rgba(233, 178, 92, 0.26);
  --topbar: rgba(10, 16, 25, 0.86);
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f6f4ee;
  --bg-grad: radial-gradient(1100px 520px at 12% -8%, rgba(29, 78, 216, 0.07), transparent 60%),
             radial-gradient(900px 480px at 92% 0%, rgba(180, 83, 9, 0.06), transparent 55%);
  --paper: #ffffff;
  --paper-2: #fbfaf6;
  --ink: #14171c;
  --ink-2: #4e5462;
  --ink-3: #8b8f99;
  --line: rgba(20, 23, 28, 0.13);
  --line-soft: rgba(20, 23, 28, 0.07);
  --accent: #a55a12;
  --accent-soft: #fbf1e3;
  --link: #1d4ed8;
  --shadow: 0 16px 36px rgba(20, 23, 28, 0.09);
  --mark: #ffe9b8;
  --topbar: rgba(246, 244, 238, 0.9);
  color-scheme: light;
}

/* 板块色：浅底用深色，深底提亮一档，保证对比度 */
[data-cat="policy"] { --cat: #1d4ed8; }
[data-cat="data"] { --cat: #0f766e; }
[data-cat="industry"] { --cat: #6d28d9; }
[data-cat="energy"] { --cat: #b45309; }
[data-cat="centralbank"] { --cat: #be123c; }
[data-cat="commodity"] { --cat: #a16207; }
[data-cat="geopolitics"] { --cat: #991b1b; }
[data-cat="tech"] { --cat: #0369a1; }
[data-cat="corporate"] { --cat: #4b5563; }
[data-cat="emergency"] { --cat: #c2410c; }
[data-cat="other"] { --cat: #6b7280; }

html[data-theme="dark"] [data-cat="policy"] { --cat: #7aa2ff; }
html[data-theme="dark"] [data-cat="data"] { --cat: #4fd1c5; }
html[data-theme="dark"] [data-cat="industry"] { --cat: #b08bff; }
html[data-theme="dark"] [data-cat="energy"] { --cat: #e9b25c; }
html[data-theme="dark"] [data-cat="centralbank"] { --cat: #ff8098; }
html[data-theme="dark"] [data-cat="commodity"] { --cat: #d9c069; }
html[data-theme="dark"] [data-cat="geopolitics"] { --cat: #ff8f8f; }
html[data-theme="dark"] [data-cat="tech"] { --cat: #6fc6f5; }
html[data-theme="dark"] [data-cat="corporate"] { --cat: #9aa6b8; }
html[data-theme="dark"] [data-cat="emergency"] { --cat: #ff9a6c; }
html[data-theme="dark"] [data-cat="other"] { --cat: #9aa6b8; }

/* -------------------------------- 基础 ---------------------------------- */
* { box-sizing: border-box; }

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "SimSun", Georgia, "Times New Roman", serif;
  --r: 14px;
  --ease: cubic-bezier(0.2, 0.9, 0.2, 1);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

button { font-family: inherit; }

/* ------------------------------ 阅读进度条 ------------------------------- */
.read-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--link));
  z-index: 60;
  transition: width 120ms linear;
  pointer-events: none;
}

/* -------------------------------- 顶栏 ---------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 54px;
  padding: 0 max(16px, calc((100vw - 1160px) / 2 + 20px));
  background: var(--topbar);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: linear-gradient(150deg, var(--accent), #8a4a12);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: 0 2px 8px rgba(165, 90, 18, 0.35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.22; }
.brand-text strong { font-family: var(--font-serif); font-size: 15px; letter-spacing: 0.5px; }
.brand-text small { font-size: 11px; color: var(--ink-3); letter-spacing: 0.2px; }

.nav {
  display: flex;
  align-items: stretch;
  gap: 2px;
  margin-left: auto;
  height: 100%;
}
.nav-tab {
  height: 100%;
  padding: 0 13px;
  border: none;
  background: transparent;
  color: var(--ink-2);
  font-size: 13.5px;
  cursor: pointer;
  position: relative;
  transition: color 180ms var(--ease), background 180ms var(--ease);
}
.nav-tab:hover { color: var(--ink); background: var(--line-soft); }
.nav-tab.is-active { color: var(--accent); font-weight: 600; }
.nav-tab.is-active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 0;
  height: 2.5px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
}
.nav-home {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 0 10px 0 15px;
  border-left: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 12.5px;
  text-decoration: none;
}
.nav-home::before { content: "←"; margin-right: 5px; }
.nav-home:hover { color: var(--accent); }

.userbox {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 13px;
  border-left: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 12px;
  white-space: nowrap;
}
.userbox .avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
}
.theme-btn {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  cursor: pointer;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.theme-btn:hover { color: var(--accent); border-color: var(--accent); }

/* -------------------------------- 布局 ---------------------------------- */
.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 26px 20px 80px;
}

.view-head { margin-bottom: 22px; }
.view-head h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.view-head p { margin: 6px 0 0; font-size: 13px; color: var(--ink-3); }

.layout {
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr);
  gap: 42px;
  align-items: start;
}

/* -------------------------------- 侧栏 ---------------------------------- */
.rail {
  position: sticky;
  top: 74px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  padding-right: 6px;
  border-right: 1px solid var(--line-soft);
  scrollbar-width: thin;
}
.rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 2px 8px;
  border-bottom: 1px solid var(--line);
}
.rail-title {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-3);
}
.rail-count { font-size: 11px; color: var(--ink-3); }
.rail-list { list-style: none; margin: 10px 0 0; padding: 0 2px 0 0; }
.rail-month {
  margin: 14px 0 4px;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 1px;
}
.rail-list li:first-child.rail-month { margin-top: 2px; }
.rail-day {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 100%;
  padding: 7px 10px;
  margin-bottom: 2px;
  border: none;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 160ms var(--ease), border-color 160ms var(--ease);
}
.rail-day:hover { background: var(--line-soft); }
.rail-day.is-active {
  border-left-color: var(--accent);
  background: var(--accent-soft);
}
.rd-date { font-size: 13px; color: var(--ink); }
.rail-day.is-active .rd-date { font-weight: 600; }
.rd-meta { font-size: 11px; color: var(--ink-3); }
.rail-empty { font-size: 12px; color: var(--ink-3); padding: 10px 4px; }

/* ------------------------------ 简报页头 -------------------------------- */
.notice {
  margin: 0 0 18px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: var(--paper);
  font-size: 12.5px;
  color: var(--ink-2);
}
.notice strong { color: var(--ink); }

.bhead { padding-bottom: 6px; }
.kicker {
  margin: 0 0 8px;
  font-size: 10.5px;
  letter-spacing: 3px;
  color: var(--accent);
  text-transform: uppercase;
}
.bdate {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: 0.5px;
  font-weight: 700;
}
.bdate .weekday {
  margin-left: 12px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  color: var(--ink-3);
  letter-spacing: 1px;
}
.btitle {
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--ink-2);
  letter-spacing: 1px;
}
.bmeta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.chip {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 11.5px;
  color: var(--ink-2);
  letter-spacing: 0.3px;
}
.chip.ghost { background: transparent; color: var(--ink-3); }
.bintro {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-3);
}

/* 板块导航（吸顶 chips，窄屏用；宽屏用右侧竖栏 .toc-side） */
.toc {
  position: sticky;
  top: 54px;
  z-index: 30;
  display: flex;
  gap: 8px;
  margin: 20px -4px 0;
  padding: 10px 4px;
  overflow-x: auto;
  background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
  scrollbar-width: none;
}
@media (min-width: 1281px) {
  /* 宽屏：正文右侧已有竖排板块导航，顶部横条收掉，省一截纵向空间 */
  .brief .toc { display: none; }
}
.toc::-webkit-scrollbar { display: none; }
.toc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-2);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 160ms var(--ease), border-color 160ms var(--ease), background 160ms var(--ease);
}
.toc-chip b { font-weight: 500; color: var(--ink-3); font-size: 11px; }
.toc-chip:hover { border-color: var(--cat, var(--accent)); color: var(--ink); }
.toc-chip.is-active {
  border-color: var(--cat, var(--accent));
  color: var(--ink);
  background: var(--paper);
  box-shadow: inset 0 -2px 0 var(--cat, var(--accent));
}
.toc-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cat, var(--accent));
  flex: 0 0 auto;
}

/* 板块导航（右侧竖栏，≥1281px 显示；随滚动 sticky，当前板块高亮） */
.toc-side {
  display: none;
  position: sticky;
  top: 74px;
  align-self: start;
  padding: 2px 0 2px 14px;
  border-left: 1px solid var(--line-soft);
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  scrollbar-width: none;
}
.toc-side::-webkit-scrollbar { display: none; }
.toc-side-title {
  margin: 0 0 8px;
  font-size: 10.5px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ink-3);
}
.toc-side-list { display: grid; gap: 2px; }
.toc-side-item {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 6px 9px;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  background: transparent;
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-2);
  text-align: left;
  cursor: pointer;
  transition: color 160ms var(--ease), background 160ms var(--ease), border-color 160ms var(--ease);
}
.toc-side-item .toc-dot { margin-top: 1px; }
.toc-side-item .toc-side-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.toc-side-item b { font-weight: 500; font-size: 10.5px; color: var(--ink-3); }
.toc-side-item:hover { color: var(--ink); background: var(--paper); }
.toc-side-item.is-active {
  color: var(--ink);
  background: var(--paper);
  border-left-color: var(--cat, var(--accent));
}
@media (min-width: 1281px) {
  .wrap { max-width: 1400px; }
  .layout { grid-template-columns: 212px minmax(0, 1fr) 176px; gap: 36px; }
  .toc-side { display: block; }
}

/* -------------------------------- 板块 ---------------------------------- */
.sec { margin-top: 44px; scroll-margin-top: 120px; }
.sec-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.sec-num {
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--cat, var(--accent));
  letter-spacing: 1px;
  padding-top: 4px;
}
.sec-name {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.8px;
}
.sec-count {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: 0.5px;
}

/* --------------------------------- 条目 --------------------------------- */
.item {
  padding: 20px 0 20px 16px;
  border-left: 2px solid transparent;
  border-bottom: 1px solid var(--line-soft);
  scroll-margin-top: 130px;
  transition: border-color 220ms var(--ease), background 220ms var(--ease);
}
.item:last-child { border-bottom: none; }
.item:hover { border-left-color: var(--cat, var(--accent)); }

.item-title {
  display: flex;
  gap: 10px;
  margin: 0 0 9px;
  font-size: 17.5px;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: 0.2px;
}
.item-no {
  flex: 0 0 auto;
  font-family: var(--font-serif);
  font-size: 12px;
  color: var(--cat, var(--accent));
  padding-top: 5px;
  letter-spacing: 0.5px;
}
.item-sum,
.item-focus {
  margin: 0 0 8px;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--ink-2);
  text-align: justify;
}
.item-sum:last-child,
.item-focus:last-child { margin-bottom: 0; }
.item-focus {
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.85;
}
.lbl {
  display: inline-block;
  margin-right: 8px;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--ink-3);
  vertical-align: 1px;
}
.item-focus .lbl { color: var(--accent); }

/* 免责标注：待确认 / 市场消息 / 【…】 */
.note-tag {
  display: inline;
  margin-left: 2px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--line-soft);
  color: var(--ink-3);
  font-size: 11.5px;
}
.flag {
  font-style: normal;
  padding: 0 4px;
  border-radius: 3px;
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
  font-size: 12.5px;
}
html[data-theme="dark"] .flag { background: rgba(255, 128, 128, 0.16); color: #ff9a9a; }
.flag.soft { background: var(--accent-soft); color: var(--accent); }

/* 搜索结果里点进来时闪一下，帮读者定位 */
.item.flash { animation: flashItem 2.2s var(--ease); }
@keyframes flashItem {
  0%, 40% { background: var(--accent-soft); }
  100% { background: transparent; }
}

/* -------------------------------- 备注 ---------------------------------- */
.remarks {
  margin-top: 46px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--paper);
}
.remarks-title {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: 1px;
}
.remarks ul { margin: 0; padding-left: 18px; }
.remarks li {
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.remarks li::marker { color: var(--ink-3); }

.bfoot {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 11.5px;
  color: var(--ink-3);
}
.bfoot p { margin: 0; line-height: 1.7; }
.link-btn {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 0;
}
.link-btn:hover { text-decoration: underline; }

/* ------------------------------ 占位 / 门禁 ------------------------------ */
.placeholder {
  padding: 60px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--r);
  color: var(--ink-3);
}
.placeholder h2 { font-family: var(--font-serif); font-size: 20px; color: var(--ink); margin: 0 0 8px; }
.placeholder p { margin: 6px 0; font-size: 13px; }
.placeholder .mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11.5px; color: var(--ink-3); }
.empty { color: var(--ink-3); font-size: 13px; padding: 8px 0; }

.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(16px);
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease);
  z-index: 90;
  max-width: 86vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: #c0392b; color: #fff; }

.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 10, 18, 0.6);
  backdrop-filter: blur(3px);
}
.gate-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px 30px;
  text-align: center;
  max-width: 320px;
  box-shadow: var(--shadow);
}
.gate-card h3 { margin: 0 0 8px; font-family: var(--font-serif); font-size: 17px; }
.gate-card p { margin: 0 0 16px; font-size: 13px; color: var(--ink-2); }

/* ------------------------------- 往期归档 -------------------------------- */
.archive-list { display: grid; gap: 30px; }
.month-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-serif);
  font-size: 17px;
  letter-spacing: 1px;
}
.month-title span { font-family: var(--font-sans); font-size: 11.5px; color: var(--ink-3); font-weight: 400; }
.month ul { list-style: none; margin: 0; padding: 0; }
.arc-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  padding: 13px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 160ms var(--ease);
}
.arc-row:hover { background: var(--paper); box-shadow: var(--shadow); }
.arc-date {
  flex: 0 0 92px;
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--ink);
}
.arc-date em {
  display: block;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
}
.arc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.arc-headline {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink);
  display: block;
}
.arc-sub { font-size: 11.5px; color: var(--ink-3); }

/* -------------------------------- 搜索 ---------------------------------- */
.quick-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.qcat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-2);
  font-size: 12px;
  cursor: pointer;
}
.qcat::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cat, var(--accent));
}
.qcat b { font-weight: 500; color: var(--ink-3); font-size: 11px; }
.qcat:hover { border-color: var(--cat, var(--accent)); color: var(--ink); }

.search-form {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.sf-main { display: flex; gap: 10px; }
.sf-input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.sf-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sf-btn {
  flex: 0 0 auto;
  padding: 0 24px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
html[data-theme="dark"] .sf-btn { color: #1a1206; }
.sf-btn:active { transform: scale(0.98); }

.sf-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--ink-3);
}
.sf-field { display: inline-flex; align-items: center; gap: 6px; }
.sf-field span { white-space: nowrap; }
.sf-field select,
.sf-field input {
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
}
.sf-field select:focus,
.sf-field input:focus { border-color: var(--accent); }
.sf-reset {
  margin-left: auto;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  cursor: pointer;
}
.sf-reset:hover { color: var(--accent); border-color: var(--accent); }

.search-result { margin-top: 26px; }
.sr-summary { margin: 0 0 8px; font-size: 12.5px; color: var(--ink-3); }
.sr-summary strong { color: var(--ink); font-weight: 600; }
.sr-day { margin-bottom: 26px; }
.sr-date {
  display: flex;
  align-items: baseline;
  gap: 9px;
  width: 100%;
  padding: 8px 0;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.sr-date em { font-family: var(--font-sans); font-style: normal; font-size: 11.5px; color: var(--ink-3); }
.sr-date span { margin-left: auto; font-family: var(--font-sans); font-size: 11.5px; color: var(--ink-3); }
.sr-date:hover { color: var(--accent); }
.sr-item { padding-top: 16px; padding-bottom: 16px; }
.sr-item .item-title { font-size: 16px; }
.sr-cat { margin: 8px 0 0; font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
mark {
  background: var(--mark);
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}

/* ------------------------------- 响应式 --------------------------------- */
@media (max-width: 980px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .rail {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 0 0 10px;
    border-right: none;
    border-bottom: 1px solid var(--line-soft);
  }
  .rail-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .rail-list::-webkit-scrollbar { display: none; }
  .rail-list li { flex: 0 0 auto; }
  .rail-month { display: none; }
  .rail-day {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 12px;
    background: var(--paper);
  }
  .rail-day.is-active { border-color: var(--accent); background: var(--accent-soft); }
  .rd-date { font-size: 12px; }
  .rd-meta { font-size: 10.5px; }
}

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 14px; gap: 8px; }
  .brand-text small { display: none; }
  /* 三项导航靠左排，别用 space-between 把「返回主页」顶出视口 */
  .nav { order: 3; width: 100%; margin-left: 0; height: auto; justify-content: flex-start; }
  .nav-tab { padding: 6px 10px; height: auto; font-size: 12.5px; }
  .nav-tab.is-active::after { left: 8px; right: 8px; height: 2px; }
  .userbox { margin-left: auto; padding-left: 10px; border-left: none; }
  .wrap { padding: 18px 14px 64px; }
  .bdate { font-size: 30px; }
  .bdate .weekday { font-size: 13px; margin-left: 8px; }
  .sec-name { font-size: 19px; }
  .item { padding: 16px 0 16px 12px; }
  .item-title { font-size: 16px; }
  .item-sum, .item-focus { font-size: 14px; line-height: 1.85; }
  .toc { top: 52px; }
  .arc-row { flex-direction: column; gap: 6px; }
  .arc-date { flex-basis: auto; }
  .sf-main { flex-direction: column; }
  .sf-btn { padding: 10px 0; }
  .sf-reset { margin-left: 0; }
  .bfoot { flex-direction: column; align-items: flex-start; }
}
