/* ============================================================
   LG-001 会议纪要 · 阅读样式
   语义标记配色与 :target 锚点高亮是这套页面的核心体验
   ============================================================ */

:root {
  --paper: #fbfaf7;
  --card: #ffffff;
  --ink: #17191f;
  --muted: #5f6773;
  --faint: #8b93a1;
  --line: #e4e6ea;
  --line-strong: #d3d7de;
  --accent: #115e59;
  --accent-soft: #e6f2f0;
  --mark: #fff1a8;

  --person: #6d28d9;
  --time: #0e7490;
  --location: #15803d;
  --organization: #b45309;
  --event: #be123c;
  --topic: #475569;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 50% -10%, #ffffff 0%, rgba(255, 255, 255, 0) 60%),
    var(--paper);
  font-family: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

code {
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
  font-size: .86em;
  background: #f0f2f4;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .05em .35em;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 99;
  background: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 250, 247, .88);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13.5px;
}
.crumb {
  color: var(--muted);
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crumb .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 7px;
  vertical-align: 1px;
}
.crumb .sep { margin: 0 6px; color: var(--line-strong); }
.topnav { display: flex; gap: 18px; flex-shrink: 0; }
.topnav a { color: var(--muted); font-size: 13.5px; }
.topnav a:hover { color: var(--accent); }

/* ---------- 文档 ---------- */
.doc {
  width: 100%;
  max-width: 100vw;
  margin: 0;
  padding: 8px;
  box-sizing: border-box;
  overflow-x: clip;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr);
  grid-template-rows: minmax(0, 1fr) auto;
  column-gap: 8px;
  align-items: start;
}

.doc-head {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 0;
  padding: 20px 18px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.doc-head h1 { font-size: 24px; }
.doc-head .subtitle { font-size: 13.5px; margin-bottom: 18px; }
.doc-head .meta { flex-direction: column; align-items: stretch; gap: 6px; }
.doc-head .legend { flex-direction: column; align-items: flex-start; gap: 7px; }
.doc-head .legend-tip { margin-left: 0; }

.kicker {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .18em;
}

h1 {
  margin: 0 0 16px;
  font-family: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", serif;
  font-size: 39px;
  line-height: 1.28;
  letter-spacing: -.01em;
  font-weight: 700;
}

.subtitle {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.75;
  max-width: 46em;
}

.meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 0 0 18px;
  padding: 0;
  font-size: 13px;
}
.meta li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  line-height: 1.6;
}
.meta-k { color: var(--faint); }
.meta time { color: var(--ink); font-variant-numeric: tabular-nums; }

.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0;
  padding: 14px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, .6);
  font-size: 12.5px;
  color: var(--muted);
}
.legend-tip { color: var(--faint); margin-left: auto; }
.legend-tip code { font-size: .92em; }

.lg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  letter-spacing: .01em;
}
.lg::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.lg-person { color: var(--person); }
.lg-time { color: var(--time); }
.lg-location { color: var(--location); }
.lg-organization { color: var(--organization); }
.lg-event { color: var(--event); }
.lg-topic { color: var(--topic); }

/* ---------- 目录 ---------- */
.toc {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  padding: 22px 20px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.toc-title {
  margin: 0 0 12px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--faint);
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px 28px;
}
.toc li { border-bottom: 1px solid #f1f2f4; }
.toc li:last-child { border-bottom: 0; }
.toc a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  color: var(--ink);
  font-size: 14.5px;
}
.toc a:hover { color: var(--accent); text-decoration: none; }
.toc a span {
  flex: 0 0 22px;
  color: var(--faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* ---------- 正文 ---------- */
article {
  counter-reset: sec;
  grid-column: 3;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  align-self: stretch;
  overflow: auto;
  scroll-behavior: smooth;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.sec { margin: 0 0 46px; scroll-margin-top: 8px; }

h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-family: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", serif;
  font-size: 25px;
  line-height: 1.4;
  letter-spacing: .01em;
}
h2 .num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  transform: translateY(-2px);
}

p { margin: 0 0 16px; text-align: justify; }
p:last-child { margin-bottom: 0; }

.items { margin: 0 0 18px; padding-left: 24px; }
.items li { margin-bottom: 10px; padding-left: 4px; }
.items li::marker { color: var(--faint); font-variant-numeric: tabular-nums; }
.items-lg li { margin-bottom: 14px; }
.items-lg strong { color: var(--accent); }

/* ---------- 语义实体 ---------- */
[data-type] {
  text-decoration: underline dotted;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  border-radius: 3px;
  cursor: help;
  transition: background-color .18s ease, box-shadow .18s ease;
}
[data-type]:hover { background: rgba(17, 94, 89, .07); }

[data-type="person"] { color: var(--person); text-decoration-color: rgba(109, 40, 217, .45); }
[data-type="time"] { color: var(--time); text-decoration-color: rgba(14, 116, 144, .45); font-variant-numeric: tabular-nums; }
[data-type="location"] { color: var(--location); text-decoration-color: rgba(21, 128, 61, .45); }
[data-type="organization"] { color: var(--organization); text-decoration-color: rgba(180, 83, 9, .45); }
[data-type="event"] { color: var(--event); text-decoration-color: rgba(190, 18, 60, .45); }
[data-type="topic"] { color: var(--topic); text-decoration-color: rgba(71, 85, 105, .45); }

[id] { scroll-margin-top: 92px; }

/* 锚点命中：黄底闪烁 + 描边，3 秒后稳定为浅黄 */
[data-type]:target {
  background: var(--mark);
  box-shadow: 0 0 0 4px rgba(250, 204, 21, .38);
  border-radius: 4px;
  animation: target-pulse 2.8s ease-out 1;
}
[data-type]:target:hover { background: var(--mark); }

p:target, li:target, tr:target, td:target, th:target {
  background: #fffbeb;
  box-shadow: inset 3px 0 0 #f59e0b;
}
li:target { border-radius: 4px; }

.flash { animation: target-pulse 2.4s ease-out 1; }

@keyframes target-pulse {
  0% { background: #ffe066; box-shadow: 0 0 0 6px rgba(250, 204, 21, .55); }
  60% { background: #fff1a8; box-shadow: 0 0 0 3px rgba(250, 204, 21, .35); }
  100% { background: var(--mark); box-shadow: 0 0 0 4px rgba(250, 204, 21, .38); }
}

/* ---------- 表格 ---------- */
.org-table {
  width: 100%;
  margin: 8px 0 18px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  font-size: 14.5px;
  background: #fff;
}
.org-table thead th {
  background: #f5f6f8;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.org-table tbody th, .org-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef0f2;
  vertical-align: top;
  text-align: left;
  line-height: 1.85;
}
.org-table tbody tr:last-child th, .org-table tbody tr:last-child td { border-bottom: 0; }
.org-table tbody th {
  width: 92px;
  color: var(--ink);
  font-weight: 600;
  background: #fcfcfd;
  white-space: nowrap;
}
.org-table tbody tr:hover td, .org-table tbody tr:hover th { background: #fbfbfc; }

/* ---------- 页脚 ---------- */
.doc-foot {
  grid-column: 3;
  grid-row: 2;
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--faint);
  font-size: 13px;
  line-height: 1.8;
}
.doc-foot p { text-align: left; margin-bottom: 8px; }
.foot-meta { font-variant-numeric: tabular-nums; }

@media (max-width: 860px) {
  body { height: auto; overflow: visible; display: block; }
  .doc { display: block; flex: none; min-height: 0; }
  .sec { scroll-margin-top: 60px; }
  .doc-head h1 { font-size: 32px; }
  .doc-head .subtitle { font-size: 15px; margin-bottom: 26px; }
  .doc-head .meta { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 18px; }
  .doc-head .legend { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .doc-head .legend-tip { margin-left: auto; }
  .doc-head { margin-bottom: 40px; }
  .toc { margin: 0 0 48px; }
  .toc ol { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .doc { padding: 34px 18px 64px; }
  h1 { font-size: 30px; }
  .subtitle { font-size: 15px; }
  .toc ol { grid-template-columns: 1fr; }
  .toc li:nth-last-child(2) { border-bottom: 1px solid #f1f2f4; }
  .topbar-inner { padding: 9px 16px; }
  .topnav { gap: 12px; }
  .topnav a:nth-child(2) { display: none; }
  h2 { font-size: 21px; }
  .org-table { font-size: 13px; }
  .org-table tbody th { width: 76px; padding: 10px; }
  .org-table tbody td { padding: 10px; }
}

@media print {
  .topbar, .toc, .skip { display: none; }
  body { background: #fff; font-size: 12pt; }
  .doc { max-width: none; padding: 0; }
  [data-type] { color: inherit; text-decoration: none; }
}
