/**
 * AI 日报私人阅读站样式：采用中文报刊与私人研究手册结合的编辑风格。
 */

:root {
  --ink: #171713;
  --muted-ink: #69665e;
  --paper: #f3f0e7;
  --paper-deep: #e9e4d7;
  --card: #fbfaf5;
  --line: #c9c2b2;
  --accent: #c94328;
  --accent-dark: #8c2f1c;
  --forest: #23483e;
  --link: #065fd4;
  --link-hover: #003d99;
  --link-on-dark: #8ab4f8;
  --shadow: 0 18px 50px rgba(45, 39, 28, 0.1);
  --font-sans: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.paper-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.42;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.65), transparent 25%),
    repeating-linear-gradient(90deg, rgba(39, 34, 25, 0.018) 0 1px, transparent 1px 4px);
}

.masthead {
  display: grid;
  grid-template-columns: auto 1fr auto;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 22px;
  align-items: center;
  min-height: 68px;
  padding: 10px clamp(18px, 3vw, 48px);
  color: #f7f1e4;
  background: var(--ink);
  border-bottom: 4px solid var(--accent);
  box-shadow: 0 8px 20px rgba(20, 18, 14, 0.18);
}

.brand-block {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 10px;
  align-items: end;
}

.brand-block .edition {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: #d2cab9;
  font: 700 8px/1.1 ui-monospace, monospace;
  letter-spacing: 0.18em;
}

.brand-block h1 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(24px, 2.4vw, 31px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
}

.brand-block p {
  margin: 0 0 1px;
  padding-left: 10px;
  border-left: 1px solid #6c675f;
  color: #d9d1c1;
  font-size: 12px;
  letter-spacing: 0.14em;
}

.masthead-rule {
  height: 1px;
  background: linear-gradient(90deg, #767065, transparent);
}

.metrics {
  display: flex;
  gap: 20px;
}

.metrics div {
  display: grid;
  gap: 2px;
  min-width: 64px;
  text-align: right;
}

.metrics strong {
  font: 700 18px/1 ui-monospace, monospace;
}

.metrics span {
  color: #aaa395;
  font-size: 9px;
  letter-spacing: 0.06em;
}

.reader-shell {
  --archive-width: 260px;
  --toc-width: 260px;
  display: grid;
  position: relative;
  grid-template-columns: var(--archive-width) minmax(0, 1fr) var(--toc-width);
  min-height: calc(100vh - var(--masthead-visible-height, 72px));
  transition: grid-template-columns 220ms ease;
}

.reader-shell.is-archive-collapsed {
  grid-template-columns: 0 minmax(0, 1fr) var(--toc-width);
}

.reader-shell.is-toc-collapsed {
  grid-template-columns: var(--archive-width) minmax(0, 1fr) 0;
}

.reader-shell.is-archive-collapsed.is-toc-collapsed {
  grid-template-columns: 0 minmax(0, 1fr) 0;
}

.archive-panel {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--masthead-visible-height, 72px);
  align-self: start;
  height: calc(100vh - var(--masthead-visible-height, 72px));
  padding: 28px 22px;
  overflow: hidden;
  background: rgba(237, 232, 219, 0.72);
  backdrop-filter: blur(10px);
  transition: opacity 180ms ease, transform 220ms ease, visibility 180ms ease;
}

.archive-panel {
  grid-column: 1;
  grid-row: 1;
  border-right: 1px solid var(--line);
}

.reader-shell.is-archive-collapsed .archive-panel {
  visibility: hidden;
  opacity: 0;
  border-right: 0;
  pointer-events: none;
  transform: translateX(-100%);
}

/* 左右收起按钮的公共外观（字号/背景/阴影统一），布局属性各自定义 */
.archive-collapse-toggle,
.toc-toggle {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  background: rgba(251, 250, 245, 0.96);
  box-shadow: 0 8px 22px rgba(35, 30, 22, 0.14);
}

.archive-collapse-toggle:hover,
.toc-toggle:hover {
  color: #fff;
  background: var(--accent);
}

.archive-collapse-toggle {
  position: sticky;
  top: calc(var(--masthead-visible-height, 72px) + 14px);
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  justify-self: end;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  margin-top: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transform: translateX(50%);
  transition: color 150ms ease, background 150ms ease, transform 220ms ease;
}

.reader-shell.is-archive-collapsed .archive-collapse-toggle {
  color: #fff;
  background: var(--ink);
  transform: translateX(calc(100% + 10px));
}

.panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}

.panel-heading span {
  color: var(--accent);
  font: 800 9px/1 ui-monospace, monospace;
  letter-spacing: 0.18em;
}

.panel-heading strong {
  font-family: var(--font-sans);
  font-size: 19px;
}

.search-box {
  display: grid;
  gap: 7px;
}

.search-box span {
  color: var(--muted-ink);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.search-box input,
.archive-tools select,
.archive-tools button {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.48);
}

.search-box input {
  padding: 0 12px;
  outline: none;
}

.search-box input:focus,
.archive-tools select:focus,
.archive-tools button:focus-visible,
.archive-item:focus-visible,
.archive-year-toggle:focus-visible,
.archive-month-toggle:focus-visible,
.archive-collapse-toggle:focus-visible,
.source-button:focus-visible,
.toc-toggle:focus-visible,
.toc-depth-toggle:focus-visible,
.toc-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.archive-tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 10px 0 0;
}

.archive-controls {
  flex: 0 0 auto;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.archive-tools select,
.archive-tools button {
  padding: 0 10px;
  cursor: pointer;
}

.archive-tools button[aria-pressed="true"] {
  color: #fff;
  background: var(--forest);
  border-color: var(--forest);
}

.archive-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 5px;
  scrollbar-color: var(--line) transparent;
}

.archive-year-group + .archive-year-group {
  margin-top: 7px;
}

.archive-year-toggle,
.archive-month-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 0;
  text-align: left;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.archive-year-toggle {
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 800;
}

.archive-month-toggle {
  padding: 9px 8px 9px 17px;
  color: var(--muted-ink);
  font-size: 13px;
  font-weight: 700;
}

.archive-year-toggle:hover,
.archive-month-toggle:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.36);
}

.archive-toggle-meta {
  color: var(--muted-ink);
  font: 600 10px/1 ui-monospace, monospace;
}

.archive-month-body {
  margin-left: 17px;
  padding-left: 10px;
  border-left: 1px solid rgba(105, 102, 94, 0.28);
}

.archive-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border: 0;
  border-bottom: 1px dotted #bdb5a5;
  text-align: left;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.archive-item:hover {
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.42);
  transform: translateX(3px);
}

.archive-item.is-active {
  color: #fff;
  background: var(--accent);
}

.archive-item time {
  font: 700 13px/1.2 ui-monospace, monospace;
}

.archive-item-status {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 7px;
  min-height: 14px;
}

.archive-annotation-count {
  color: var(--forest);
  font: 700 10px/1 ui-monospace, monospace;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.archive-item.is-active .archive-annotation-count {
  color: rgba(255, 255, 255, 0.9);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b4ad9f;
}

.status-dot.is-cached {
  background: var(--forest);
  box-shadow: 0 0 0 3px rgba(35, 72, 62, 0.14);
}

.archive-item.is-active .status-dot {
  background: #fff;
}

.article-panel {
  grid-column: 2;
  grid-row: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 3vw, 36px) clamp(30px, 4vw, 60px) 72px;
}

.loading-state,
.empty-state {
  display: grid;
  place-items: start;
  min-height: 320px;
  padding-top: 10vh;
}

.loading-kicker,
.article-kicker {
  color: var(--accent);
  font: 800 10px/1 ui-monospace, monospace;
  letter-spacing: 0.2em;
}

.article-hero {
  position: sticky;
  top: var(--masthead-visible-height, 72px);
  z-index: 25;
  margin-bottom: 24px;
  padding: 10px 0 14px;
  background: rgba(243, 240, 231, 0.96);
  border-bottom: 3px double var(--ink);
  backdrop-filter: blur(8px);
}

.article-hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -3px;
  width: 92px;
  border-bottom: 3px solid var(--accent);
}

.article-hero h2 {
  margin: 7px 0 0;
  font-family: var(--font-sans);
  font-size: clamp(21px, 1.85vw, 28px);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.article-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: baseline;
}

.article-title-link {
  color: var(--link);
  text-decoration: none;
  transition: color 150ms ease;
}

.article-title-link:hover {
  color: var(--link-hover);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--muted-ink);
  font-size: 13px;
}

.article-meta span {
  white-space: nowrap;
}

.annotation-toggle {
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(23, 23, 19, 0.36);
  border-radius: 999px;
  color: var(--muted-ink);
  background: rgba(251, 250, 245, 0.7);
  font-size: 12px;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.annotation-toggle:hover,
.annotation-toggle[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: #fff8e5;
}

.annotation-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 36px));
  max-height: min(420px, calc(100vh - var(--masthead-visible-height, 72px) - 28px));
  padding: 14px;
  overflow: auto;
  color: var(--ink);
  background: rgba(251, 250, 245, 0.98);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 16px 34px rgba(35, 30, 22, 0.18);
}

.annotation-popover > strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.annotation-popover > p {
  margin: 0;
  color: var(--muted-ink);
  font-size: 12px;
  line-height: 1.55;
}

.annotation-popover-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 8px 0;
  border-top: 1px solid rgba(201, 194, 178, 0.72);
}

.annotation-jump {
  padding: 0;
  overflow: hidden;
  border: 0;
  color: var(--ink);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: transparent;
  font-size: 12px;
  line-height: 1.4;
}

.annotation-jump:hover {
  color: var(--link);
  text-decoration: underline;
}

.annotation-remove {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--muted-ink);
  background: transparent;
  font-size: 18px;
  line-height: 1;
}

.annotation-remove:hover {
  color: #fff;
  background: var(--accent);
}

.source-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 24px;
  padding: 0 18px;
  color: #fff;
  text-decoration: none;
  background: var(--ink);
  transition: background 150ms ease, transform 150ms ease;
}

.source-button:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.intro-block {
  margin-bottom: 34px;
  padding: 20px 24px;
  color: #403c35;
  background: var(--paper-deep);
  border-left: 5px solid var(--forest);
  font-size: 16px;
  line-height: 1.68;
}

.daily-section {
  scroll-margin-top: calc(var(--masthead-visible-height, 72px) + var(--article-hero-height, 104px) + 18px);
  margin: 0 0 30px;
  animation: rise-in 420ms both;
}

.section-heading {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: start;
  margin-bottom: 12px;
}

.section-number {
  color: var(--accent);
  font: 800 22px/1 ui-monospace, monospace;
}

.section-category {
  display: block;
  margin-bottom: 4px;
  color: var(--forest);
  font: 800 13px/1.15 var(--font-sans);
  letter-spacing: 0.04em;
}

.section-heading h3 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(17px, 1.38vw, 20px);
  line-height: 1.35;
}

.section-heading h3 a,
.inline-source-link {
  color: var(--link);
  text-decoration-color: rgba(6, 95, 212, 0.48);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.inline-source-link {
  font-weight: 650;
}

/* 从知识星球富文本保留的重点样式，避免把外部 HTML 直接写入页面。 */
.rich-bold {
  font-weight: 750;
}

.rich-highlight {
  padding: 0 0.08em;
  color: inherit;
  background: #fff0a8;
  border-radius: 2px;
}

/* 读者自己的划线使用细而明确的暖色线条，与原文作者的黄底高亮区分开。 */
.reader-underline {
  cursor: pointer;
  text-decoration-line: underline;
  text-decoration-color: rgba(201, 67, 40, 0.82);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  text-decoration-skip-ink: none;
}

.reader-underline:hover {
  background: rgba(201, 67, 40, 0.1);
}

.annotation-toolbar {
  position: fixed;
  z-index: 140;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: 0 10px 26px rgba(23, 23, 19, 0.24);
}

.annotation-toolbar[hidden] {
  display: none;
}

.annotation-action,
.annotation-toggle,
.annotation-jump,
.annotation-remove {
  font: inherit;
  cursor: pointer;
}

.annotation-action {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  background: var(--ink);
  font-size: 12px;
  transition: background 150ms ease;
}

.annotation-action:hover {
  background: var(--accent);
}

.section-heading h3 a:hover,
.inline-source-link:hover {
  color: var(--link-hover);
  text-decoration-color: currentColor;
}

.section-body {
  display: grid;
  gap: 10px;
  padding-left: 46px;
  color: #343129;
  font-size: 16px;
  line-height: 1.62;
}

.section-body p {
  margin: 0;
}

.section-body .bullet-line {
  padding-left: 1.25em;
  text-indent: -1.25em;
}

.section-body .subpoint-title {
  scroll-margin-top: calc(var(--masthead-visible-height, 72px) + var(--article-hero-height, 104px) + 18px);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 800;
}

.reference-links {
  margin-top: 38px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}

.reference-links h3 {
  margin: 0 0 10px;
  color: var(--muted-ink);
  font-size: 13px;
  font-weight: 700;
}

.reference-link-item {
  margin: 6px 0;
  font-size: 14px;
  line-height: 1.45;
}

.reference-link-index {
  color: var(--muted-ink);
}

.reference-links a {
  color: var(--link);
}

.reference-links a:hover {
  color: var(--link-hover);
}

.day-navigation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 42px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.day-navigation-card {
  display: grid;
  gap: 5px;
  min-height: 94px;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease, transform 150ms ease;
}

.day-navigation-card.is-next {
  text-align: right;
}

.day-navigation-card:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: #fffaf0;
  transform: translateY(-2px);
}

.day-navigation-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.day-navigation-card:disabled {
  color: var(--muted-ink);
  background: rgba(255, 255, 255, 0.22);
  cursor: not-allowed;
}

.day-navigation-label {
  color: var(--muted-ink);
  font-size: 12px;
  font-weight: 700;
}

.day-navigation-date {
  color: inherit;
  font: 800 17px/1.2 var(--font-sans);
}

.day-navigation-title {
  overflow: hidden;
  color: var(--forest);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-navigation-card:disabled .day-navigation-date,
.day-navigation-card:disabled .day-navigation-title {
  color: inherit;
}

.toc-float {
  position: sticky;
  top: var(--masthead-visible-height, 72px);
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  z-index: 30;
  width: var(--toc-width);
  height: calc(100vh - var(--masthead-visible-height, 72px));
  overflow: hidden;
  transition: width 220ms ease, opacity 180ms ease, visibility 180ms ease;
}

/* 分割线提供较宽的透明命中区，视觉上仍保持细而克制。 */
.toc-resizer {
  position: sticky;
  top: var(--masthead-visible-height, 72px);
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  justify-self: start;
  z-index: 32;
  width: 12px;
  height: calc(100vh - var(--masthead-visible-height, 72px));
  cursor: col-resize;
  touch-action: none;
  transform: translateX(-50%);
}

.toc-resizer::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--line);
  transform: translateX(-50%);
  transition: width 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.toc-resizer:hover::after,
.toc-resizer:focus-visible::after,
.reader-shell.is-resizing .toc-resizer::after {
  width: 3px;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 67, 40, 0.12);
}

.toc-resizer:focus-visible {
  outline: none;
}

.reader-shell.is-toc-collapsed .toc-resizer {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.reader-shell.is-resizing,
.reader-shell.is-resizing .toc-float {
  transition: none;
}

.reader-shell.is-resizing,
.reader-shell.is-resizing * {
  cursor: col-resize !important;
  user-select: none;
}

.toc-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  grid-column: 3;
  grid-row: 1;
  position: sticky;
  top: calc(var(--masthead-visible-height, 72px) + 14px);
  align-self: start;
  justify-self: start;
  z-index: 33;
  min-height: 34px;
  width: 34px;
  min-width: 34px;
  margin-top: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transform: translateX(-50%);
  transition: color 150ms ease, background 150ms ease, transform 220ms ease;
}

.reader-shell.is-toc-collapsed .toc-toggle {
  color: #fff;
  background: var(--ink);
  transform: translateX(calc(-100% - 10px));
}

.toc-panel {
  height: 100%;
  padding: 28px 18px;
  overflow: hidden;
  background: rgba(237, 232, 219, 0.72);
  border-left: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.toc-panel .panel-heading {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
  min-height: 34px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(23, 23, 19, 0.52);
}

.toc-panel .panel-heading span,
.toc-panel .panel-heading strong {
  white-space: nowrap;
}

.reader-shell.is-toc-collapsed .toc-float {
  visibility: visible;
  width: 0;
  opacity: 0;
  pointer-events: none;
}

.toc-depth-toggle {
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(23, 23, 19, 0.48);
  border-radius: 999px;
  color: var(--ink);
  font: 700 10px/1 var(--font-sans);
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.toc-depth-toggle:hover,
.toc-depth-toggle[aria-expanded="true"] {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.toc-list {
  max-height: calc(100vh - var(--masthead-visible-height, 72px) - 82px);
  overflow-y: auto;
  padding-right: 4px;
}

.toc-link {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-bottom: 1px solid rgba(201, 194, 178, 0.46);
  border-radius: 8px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
  background: transparent;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease, transform 140ms ease;
}

.toc-link:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.52);
  transform: translateX(2px);
}

.toc-link.is-subpoint {
  padding-left: 22px;
  color: var(--ink);
  font-size: 12px;
}

/* 默认隐藏二级观点，由目录面板中的层级按钮按需展开。 */
.toc-list:not(.show-subpoints) .toc-link.is-subpoint {
  display: none;
}

.toc-empty,
.archive-empty {
  color: var(--muted-ink);
  font-size: 13px;
  line-height: 1.7;
}

.empty-state h2 {
  max-width: 660px;
  margin: 16px 0;
  font-family: var(--font-sans);
  font-size: clamp(28px, 3.5vw, 42px);
  line-height: 1.08;
}

.empty-state p {
  max-width: 620px;
  color: var(--muted-ink);
  font-size: 17px;
  line-height: 1.8;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1080px) {
  .reader-shell {
    --archive-width: 230px;
    --toc-width: 230px;
  }

  .toc-panel { padding: 22px 14px; }

  .toc-link { padding: 8px 6px; font-size: 12px; }

  .metrics div:nth-child(2) {
    display: none;
  }
}

@media (max-width: 720px) {
  .day-navigation {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .day-navigation-card.is-next {
    text-align: left;
  }

  .masthead {
    grid-template-columns: 1fr auto;
    min-height: 60px;
    padding: 10px 16px;
  }

  .masthead-rule,
  .metrics div:not(:first-child),
  .brand-block p {
    display: none;
  }

  .reader-shell {
    display: block;
  }

  .reader-shell.is-archive-collapsed .archive-panel {
    display: none;
  }

  .archive-collapse-toggle,
  .reader-shell.is-archive-collapsed .archive-collapse-toggle {
    position: sticky;
    top: 14px;
    margin: 0 14px 0 auto;
    transform: none;
  }

  .archive-panel {
    position: relative;
    height: auto;
    padding: 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .archive-list {
    display: block;
    height: auto;
    max-height: 260px;
    overflow: auto;
  }

  .archive-item {
    width: 100%;
  }

  .article-panel {
    padding: 26px 22px 72px;
  }

  .section-heading {
    grid-template-columns: 36px 1fr;
    gap: 10px;
  }

  .section-body {
    padding-left: 0;
    font-size: 16px;
  }

  .toc-float {
    position: fixed;
    top: 0;
    right: 0;
    width: min(310px, calc(100vw - 42px));
    height: 100vh;
    z-index: 60;
    box-shadow: -16px 0 42px rgba(35, 30, 22, 0.14);
  }

  .toc-resizer {
    display: none;
  }

  .toc-toggle {
    position: fixed;
    top: 14px;
    right: 14px;
    margin: 0;
    transform: none;
  }

  .reader-shell.is-toc-collapsed .toc-toggle {
    transform: none;
  }

  .toc-panel {
    max-height: none;
  }

  .toc-list {
    max-height: calc(100vh - 82px);
  }
}

/* 研究证据定位：滚动到目标正文行时短暂高亮，帮助读者确认落点。 */
@keyframes anchor-flash-fade {
  from {
    background-color: rgba(214, 69, 65, 0.18);
  }
  to {
    background-color: transparent;
  }
}

.anchor-flash {
  animation: anchor-flash-fade 1.6s ease-out;
  border-radius: 4px;
}

/* 顶部报头"归档日期"统计左侧的 AI 研究入口（Phase 8）。 */
.research-entry {
  align-self: center;
  margin-right: 4px;
  padding: 7px 15px;
  color: #f7f1e4;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-decoration: none;
  border: 1px solid rgba(247, 241, 228, 0.4);
  border-radius: 4px;
  white-space: nowrap;
}

.research-entry:hover {
  background: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 760px) {
  .research-entry {
    display: none;
  }
}
