/* ===== 实时新闻区块(盘前预案页右栏, site/test/news.js 注入) ===== */
.news-box {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  padding: 12px 14px;
}
.news-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line-2);
}
.news-head h2 {
  margin: 0;
  color: var(--accent);
  font-size: 15px;
  font-weight: 760;
}
.news-sub { color: var(--muted); font-size: 11px; }
.news-updated { margin-left: auto; color: var(--faint); font-size: 10.5px; }
.news-list {
  flex: 1;
  min-height: 0;
  max-height: 640px;
  overflow-y: auto;
  padding-top: 4px;
}
.news-state { padding: 28px 0; color: var(--muted); font-size: 12px; text-align: center; }
.news-item {
  padding: 9px 2px 9px 8px;
  border-bottom: 1px solid var(--line-2);
  border-left: 2px solid transparent;
}
/* A股语境:重要/利好=红 */
.news-item.is-hot { border-left-color: #b3273a; background: #fff7f7; }
.news-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
}
.news-time { color: var(--ink-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.news-src {
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: var(--surface);
  font-weight: 650;
}
.news-hot-tag {
  padding: 0 5px;
  border-radius: 4px;
  color: #fff;
  background: #b3273a;
  font-weight: 700;
}
.news-item h3 {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 720;
  line-height: 1.45;
}
.news-item.is-hot h3 { color: #b3273a; }
.news-item p {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.55;
}
.news-stocks { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 4px; }
.news-stock {
  padding: 0 6px;
  border: 1px solid #edc2c5;
  border-radius: 999px;
  color: #b3273a;
  background: #fff0f1;
  font-size: 10.5px;
  font-weight: 650;
}

/* ===== 盘前早报与逻辑精选分页(测试页右栏, site/test/briefing.js) ===== */
#preplan-right { min-width: 0; overflow: hidden; }
.preplan-right-tabs {
  min-height: 43px;
  display: flex;
  align-items: stretch;
  gap: 22px;
  padding: 0 22px;
  border-bottom: 1px solid #dfe6ee;
  background: #fff;
}
.preplan-right-tab {
  position: relative;
  min-height: 43px;
  padding: 0 2px;
  border: 0;
  color: #77869a;
  background: transparent;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.preplan-right-tab::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
}
.preplan-right-tab:hover { color: #35577e; }
.preplan-right-tab.active { color: #245cff; }
.preplan-right-tab.active::after { background: #3578ff; }
.preplan-right-tab:focus-visible {
  border-radius: 4px;
  outline: 3px solid rgba(36, 92, 255, .18);
  outline-offset: -3px;
}
.preplan-tab-pane[hidden] { display: none !important; }
.preplan-tab-pane { min-width: 0; }
.preplan-logic-pane {
  min-height: calc(100% - 43px);
  background: #fff;
}
.logic-document {
  max-height: calc(100vh - 290px);
  overflow-y: auto;
  padding: 22px 26px 32px;
  color: #44536a;
  background: #fff;
  scrollbar-gutter: stable;
}
.logic-masthead { padding-bottom: 15px; border-bottom: 1px solid #dfe6ee; }
.logic-masthead > div:first-child { display: flex; align-items: center; gap: 8px; }
.logic-masthead > div:first-child span {
  padding: 2px 7px;
  border: 1px solid #cfdcf0;
  border-radius: 999px;
  color: #42648c;
  background: #f4f8ff;
  font-size: 9.5px;
  font-weight: 750;
}
.logic-masthead > div:first-child b { margin-left: auto; color: #7c8999; font-size: 10.5px; }
.logic-masthead h1 { margin: 14px 0 0; color: #172438; font-size: clamp(21px, 1.65vw, 27px); line-height: 1.5; letter-spacing: -.025em; overflow-wrap: anywhere; }
.logic-quote-legend { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 8px; margin: 12px 0 0; color: #526176; font-size: 12px; line-height: 1.7; }
.logic-quote-legend b { font-variant-numeric: tabular-nums; font-weight: 600; }
.logic-quote-legend span { color: #788596; }
.logic-source-details { margin-top: 10px; }
.logic-source-details > summary { width: fit-content; color: #778596; cursor: pointer; font-size: 11px; line-height: 2; }
.logic-source-details > summary:focus-visible { outline: 2px solid #2458d6; outline-offset: 3px; }
.logic-notice { margin: 9px 0 0; color: #788596; font-size: 10.5px; line-height: 1.65; }
.logic-files { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.logic-files span {
  overflow-wrap: anywhere;
  min-width: 0;
  padding: 4px 7px;
  border: 1px solid #e0e7ef;
  border-radius: 5px;
  color: #66768b;
  background: #fafbfd;
  font-size: 9.5px;
}
.logic-files b { color: #356fc6; }
.logic-original-document { padding-bottom: 18px; }
.logic-document-actions {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.logic-document-actions span { margin-right: auto; color: #8a96a4; font-size: 10px; }
.logic-document-actions a {
  padding: 6px 9px;
  border: 1px solid #c9d8eb;
  border-radius: 5px;
  color: #2f68b8;
  background: #f6f9fe;
  font-size: 10.5px;
  font-weight: 700;
  text-decoration: none;
}
.logic-document-actions a:hover { border-color: #93b4df; background: #eef5ff; }
.logic-pdf-frame {
  width: 100%;
  height: clamp(560px, calc(100vh - 390px), 920px);
  border: 1px solid #dbe3ec;
  border-radius: 6px;
  background: #f3f5f8;
}
.logic-original-text { padding-bottom: 22px; }
.logic-text-pages { display: grid; gap: 14px; margin-top: 18px; }
.logic-text-page {
  padding: 18px 20px 22px;
  border: 1px solid #dfe6ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(24, 45, 74, .045);
}
.logic-text-page h2 {
  margin: 0 0 13px;
  padding-bottom: 9px;
  border-bottom: 1px solid #edf1f5;
  color: #77869a;
  font-size: 10px;
  letter-spacing: .08em;
}
.logic-page-text {
  color: #33435a;
  font-size: 12px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.logic-stock-summary {
  margin: 16px 0 0;
  border: 1px solid #e6ebf0;
  border-radius: 8px;
  background: #fafbfc;
}
.logic-stock-summary > summary {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 13px;
  color: #4d5d72; font-size: 12px; cursor: pointer; list-style: none;
}
.logic-stock-summary > summary::-webkit-details-marker { display: none; }
.logic-stock-summary > summary > span:first-child { margin-right: auto; }
.logic-stock-summary > summary b { margin-left: 5px; color: #1d3049; font-variant-numeric: tabular-nums; }
.logic-stock-summary > summary::after { content: "⌄"; font-size: 15px; }
.logic-stock-summary[open] > summary::after { transform: rotate(180deg); }
.logic-stock-summary > summary:focus-visible { outline: 2px solid #2458d6; outline-offset: 2px; }
.logic-today-status { margin: 0; padding: 0 13px 10px; color: #778596; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.logic-stock-summary ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0 20px;
  margin: 0;
  padding: 0 13px 10px;
  list-style: none;
}
.logic-stock-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 2px 8px;
  padding: 10px 0;
  border-top: 1px solid #e6ebf0;
  min-width: 0;
}
.logic-stock-chip b { color: #bc3543; font-size: 13px; overflow-wrap: anywhere; }
.logic-stock-chip span { grid-column: 1; grid-row: 2; color: #8490a0; font-size: 11px; }
.logic-stock-chip em,
.logic-stock-ref small { font-style: normal; font-weight: 750; }
.logic-stock-chip em { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.logic-stock-chip .up,
.logic-stock-ref .up { color: #cc293b; }
.logic-stock-chip .down,
.logic-stock-ref .down { color: #16845b; }
.logic-stock-chip .flat,
.logic-stock-ref .flat { color: #68778a; }
.logic-stock-chip .pending,
.logic-stock-ref .pending { color: #8e7a65; }
.logic-article-body {
  margin: 24px auto 0;
  max-width: 760px;
}
.logic-article-section {
  margin: 30px 0 16px;
  padding: 10px 13px;
  border-left: 3px solid #4c7098;
  border-radius: 0 5px 5px 0;
  color: #17263c;
  background: #f2f5f8;
  font-size: 17px;
  line-height: 1.5;
}
.logic-article-subsection {
  margin: 25px 0 12px;
  color: #273a54;
  font-size: 15px;
  line-height: 1.55;
}
.logic-article-item {
  margin: 22px 0 10px;
  color: #2b507b;
  font-size: 15px;
  line-height: 1.65;
}
.logic-article-paragraph,
.logic-article-label {
  margin: 12px 0;
  color: #394a61;
  font-size: 14px;
  line-height: 2;
  overflow-wrap: anywhere;
}
.logic-article-label {
  padding: 10px 12px;
  border-radius: 5px;
  background: #f7f9fc;
}
.logic-article-label strong { color: #355d8d; }
.logic-stock-ref {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  color: #c32638;
  font-weight: 600;
}
.logic-stock-ref b { font-weight: 650; }
.logic-stock-ref small { display: inline-block; margin: 0 3px 0 4px; padding: 0 4px; border-radius: 3px; background: #f5f6f8; font-size: 11px; line-height: 1.6; white-space: nowrap; font-variant-numeric: tabular-nums; vertical-align: baseline; }
.logic-stock-ref small.up { background: #fcf0f1; }
.logic-stock-ref small.down { background: #edf7f2; }
.logic-article-body > :first-child { margin-top: 0; }
.logic-section > h2 {
  margin: 20px 0 10px;
  padding: 8px 11px;
  border-left: 3px solid #3578ff;
  border-radius: 4px;
  color: #152236;
  background: #eef5ff;
  font-size: 14px;
}
.logic-item { border-bottom: 1px solid #edf1f5; }
.logic-item summary {
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 7px;
  color: #29394f;
  cursor: pointer;
  list-style-position: outside;
}
.logic-item summary:hover { background: #fafcff; }
.logic-item summary:focus-visible { border-radius: 5px; outline: 3px solid rgba(36, 92, 255, .17); }
.logic-item summary b { font-size: 12px; line-height: 1.45; }
.logic-tag {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid #d9c9a5;
  border-radius: 999px;
  color: #91652b;
  background: #fff9ec;
  font-size: 9px;
  font-weight: 700;
}
.logic-item-body { padding: 0 10px 14px 28px; }
.logic-item-body > p { margin: 7px 0 0; color: #5b687b; font-size: 11px; line-height: 1.75; }
.logic-stock-grid {
  margin: 11px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  list-style: none;
}
.logic-stock { padding: 8px 9px; border: 1px solid #e1e8f0; border-radius: 6px; background: #fafcff; }
.logic-stock b { display: block; color: #315f9b; font-size: 10.5px; }
.logic-stock span { display: block; margin-top: 3px; color: #6c7b8f; font-size: 9.5px; }
.logic-stock p { margin: 4px 0 0; color: #8490a0; font-size: 9.5px; line-height: 1.55; }
.logic-source { display: block; margin-top: 10px; color: #929eac; font-size: 9px; }
.logic-footer { margin-top: 20px; padding-top: 11px; border-top: 1px solid #dfe6ee; color: #8a96a4; font-size: 9.5px; }
.logic-state { min-height: 360px; display: grid; align-content: center; justify-items: center; text-align: center; }
.logic-state h2 { margin: 0; color: #293b52; font-size: 16px; }
.logic-state p { max-width: 360px; color: #738195; font-size: 11px; line-height: 1.7; }
.briefing-document {
  height: calc(100% - 43px);
  max-height: calc(100vh - 233px);
  overflow-y: auto;
  padding: 18px 22px 26px;
  color: #4b596d;
  background: #fff;
  scrollbar-gutter: stable;
}
.briefing-masthead { padding-bottom: 15px; border-bottom: 1px solid #dfe6ee; }
.briefing-brand { display: flex; align-items: center; gap: 7px; color: #132238; font-size: 12px; }
.briefing-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: inherit;
  text-decoration: none;
  border-radius: 6px;
  outline: 0;
}
.briefing-brand-link:hover b { color: #245cff; }
.briefing-brand-link:focus-visible { box-shadow: 0 0 0 3px rgba(36, 92, 255, .18); }
.briefing-brand-link em {
  padding: 1px 5px;
  border: 1px solid #d6e2ef;
  border-radius: 999px;
  color: #65788f;
  background: #f7faff;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
}
.briefing-brand i {
  width: 18px;
  height: 18px;
  display: inline-block;
  border-radius: 5px 2px 5px 2px;
  background: linear-gradient(135deg, #245cff 0 43%, #8eaaff 44% 60%, #245cff 61% 100%);
  transform: skewX(-8deg);
}
.briefing-brand b { font-size: 13px; letter-spacing: -.02em; }
.briefing-brand span { margin-left: auto; color: #7c8999; font-size: 10.5px; }
.briefing-meta { margin-top: 11px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.briefing-meta span,
.briefing-meta strong {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 700;
}
.briefing-meta span { border: 1px solid #d6e2ef; color: #66788d; background: #f7fafc; }
.briefing-meta strong { border: 1px solid #ecd19b; color: #96611e; background: #fff6e5; }
.briefing-masthead h1 {
  margin: 12px 0 0;
  color: #131d2b;
  font-size: clamp(18px, 1.45vw, 24px);
  line-height: 1.36;
  letter-spacing: -.025em;
}
.briefing-section-title {
  margin: 20px 0 13px;
  padding: 9px 12px;
  border-left: 3px solid #3578ff;
  border-radius: 4px;
  color: #152236;
  background: #eef5ff;
  font-size: 15px;
  line-height: 1.35;
}
.briefing-copy,
.briefing-group { padding: 0 8px; }
.briefing-copy p,
.briefing-item p {
  margin: 7px 0 0;
  color: #5b687b;
  font-size: 11.5px;
  line-height: 1.75;
}
.briefing-analysis b,
.briefing-related b { color: #27668d; }
.briefing-group > h3 {
  margin: 16px 0 3px;
  color: #283649;
  font-size: 13.5px;
  line-height: 1.45;
}
.briefing-item { padding: 12px 0 14px; border-bottom: 1px solid #edf1f5; }
.briefing-item h4 {
  margin: 0;
  color: #3978e8;
  font-size: 12.5px;
  line-height: 1.55;
}
.briefing-item h4 span { font-variant-numeric: tabular-nums; }
.briefing-source {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  color: #7b899a;
  font-size: 10px;
}
.briefing-source b { color: #5d7086; }
.briefing-source em {
  padding: 1px 5px;
  border: 1px solid #edd19a;
  border-radius: 4px;
  color: #98621f;
  background: #fff8e9;
  font-style: normal;
  font-weight: 700;
}
.briefing-related { color: #788596 !important; }
.briefing-macro-grid {
  margin-top: 13px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.briefing-macro-card {
  padding: 10px 11px;
  border: 1px solid #dbe6f2;
  border-radius: 6px;
  background: #f8fbff;
}
.briefing-macro-card h3 { margin: 0; color: #26394f; font-size: 11.5px; line-height: 1.4; }
.briefing-macro-card strong {
  margin-top: 4px;
  display: block;
  color: #3676d8;
  font-size: 10.5px;
  line-height: 1.45;
}
.briefing-macro-card p { margin-top: 5px; color: #748296; font-size: 10px; line-height: 1.55; }
.briefing-macro-card small,
.briefing-index-card small,
.briefing-view small { color: #8491a2; font-size: 9.5px; line-height: 1.45; }
.briefing-macro-card a,
.briefing-source a,
.briefing-view a { color: #3676d8; text-decoration: none; }
.briefing-macro-card.is-gap { border-color: #ead9b8; background: #fffaf0; }
.briefing-macro-card.is-gap strong { color: #9b6a24; }
.briefing-index-grid {
  margin-top: 13px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.briefing-index-card {
  padding: 8px 9px;
  border: 1px solid #e1e8f0;
  border-radius: 6px;
  background: #fff;
}
.briefing-index-card h3 { margin: 0; color: #42536a; font-size: 10px; line-height: 1.35; }
.briefing-index-card strong { display: block; margin-top: 3px; font-size: 11.5px; }
.briefing-index-card p { margin: 2px 0 0; color: #8a96a5; font-size: 9px; }
.briefing-index-card.is-up strong { color: #ca3f4c; }
.briefing-index-card.is-down strong { color: #24845f; }
.briefing-index-card.is-gap strong { color: #9b6a24; }
.briefing-views .briefing-view { padding: 9px 0 10px 11px; border-left: 2px solid #c9daef; }
.briefing-views .briefing-view + .briefing-view { margin-top: 9px; }
.briefing-views .briefing-view p { margin: 0 0 4px; }
.briefing-source-note { color: #9aa4b1 !important; font-size: 9.5px !important; }
.briefing-empty { margin: 8px; padding: 11px; border: 1px dashed #d8e1eb; color: #7c8999; font-size: 11px; }
.briefing-gaps { margin: 20px 8px 0; padding: 11px 13px; border: 1px solid #ead9b8; border-radius: 6px; background: #fffaf0; }
.briefing-gaps h2 { margin: 0; color: #8a5d20; font-size: 11px; }
.briefing-gaps ul { margin: 6px 0 0; padding-left: 17px; color: #806c50; font-size: 9.5px; line-height: 1.6; }
.briefing-state { display: grid; align-content: center; justify-items: center; min-height: 360px; text-align: center; }
.briefing-state h2 { margin: 0; color: #293b52; font-size: 16px; }
.briefing-state p { max-width: 360px; color: #738195; font-size: 11px; line-height: 1.7; }
.briefing-footer {
  margin: 22px 8px 0;
  padding-top: 12px;
  border-top: 1px solid #dfe6ee;
  color: #8a96a4;
  font-size: 9.5px;
  line-height: 1.65;
}

@media (max-width: 760px) {
  #preplan-right { overflow: visible; }
  .preplan-right-tabs { padding: 0 16px; }
  .preplan-logic-pane { min-height: 316px; }
  .logic-document { max-height: none; overflow: visible; padding: 16px 16px 24px; }
  .logic-pdf-frame { height: 72vh; min-height: 520px; }
  .logic-stock-grid { grid-template-columns: 1fr; }
  .logic-item-body { padding-left: 12px; }
  .briefing-document { height: auto; max-height: none; overflow: visible; padding: 16px 16px 24px; }
  .briefing-brand span { width: 100%; margin-left: 25px; }
  .briefing-masthead h1 { font-size: 19px; }
  .briefing-index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .briefing-macro-grid { grid-template-columns: 1fr; }
}

/* ===== 盘前早报数据源二级页 ===== */
.source-ledger-page { background: #edf2f8; }
.source-ledger-main {
  min-height: 100vh;
  padding: 28px clamp(20px, 4vw, 58px) 64px;
  color: #314157;
}
.source-ledger-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 3.5vw, 42px);
  border: 1px solid #dce5ef;
  border-radius: 16px;
  background:
    radial-gradient(circle at 88% 20%, rgba(65, 116, 255, .14), transparent 30%),
    linear-gradient(135deg, #fff 0%, #f7faff 66%, #eef4ff 100%);
  box-shadow: 0 15px 40px rgba(31, 55, 86, .07);
}
.source-ledger-brand { display: flex; align-items: center; gap: 8px; color: #132238; font-size: 13px; }
.source-ledger-brand i {
  width: 21px;
  height: 21px;
  border-radius: 6px 2px 6px 2px;
  background: linear-gradient(135deg, #245cff 0 43%, #9bb2ff 44% 60%, #245cff 61% 100%);
  transform: skewX(-8deg);
}
.source-ledger-brand b { font-size: 15px; letter-spacing: -.03em; }
.source-ledger-brand span { color: #73839a; font-size: 11px; }
.source-ledger-back {
  position: absolute;
  top: 30px;
  right: clamp(24px, 3.5vw, 42px);
  padding: 7px 11px;
  border: 1px solid #d4dfeb;
  border-radius: 8px;
  color: #53677f;
  background: rgba(255, 255, 255, .8);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}
.source-ledger-back:hover { border-color: #9db9ec; color: #245cff; }
.source-ledger-kicker {
  margin: 30px 0 6px;
  color: #4978d4;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
}
.source-ledger-hero h1 { margin: 0; color: #162338; font-size: clamp(25px, 3vw, 39px); letter-spacing: -.04em; }
.source-ledger-intro { max-width: 760px; margin: 12px 0 0; color: #627188; font-size: 12px; line-height: 1.8; }
.source-ledger-stats { display: flex; align-items: stretch; gap: 9px; flex-wrap: wrap; margin-top: 25px; }
.source-ledger-stats > div {
  min-width: 104px;
  padding: 10px 14px;
  border: 1px solid rgba(202, 216, 235, .9);
  border-radius: 10px;
  background: rgba(255, 255, 255, .76);
}
.source-ledger-stats strong { display: block; color: #1d3960; font-size: 19px; }
.source-ledger-stats span { color: #79889c; font-size: 9.5px; }
.source-ledger-stats > p { align-self: center; margin: 0 0 0 5px; color: #7d8b9c; font-size: 10px; }
.source-ledger-principles {
  display: grid;
  grid-template-columns: minmax(150px, .35fr) minmax(0, 1fr);
  gap: 25px;
  margin-top: 18px;
  padding: 21px 25px;
  border: 1px solid #dbe5ef;
  border-radius: 13px;
  background: #fff;
}
.source-ledger-principles .source-ledger-kicker { margin: 0 0 4px; }
.source-ledger-principles h2 { margin: 0; color: #1b2c43; font-size: 16px; }
.source-ledger-principles ol { margin: 0; padding-left: 20px; color: #5c6c81; font-size: 11px; line-height: 1.9; }
.source-ledger-toolbar {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 12px 0;
  background: rgba(237, 242, 248, .94);
  backdrop-filter: blur(8px);
}
.source-ledger-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.source-ledger-filters button {
  padding: 6px 10px;
  border: 1px solid #d3deea;
  border-radius: 999px;
  color: #65768b;
  background: #fff;
  font-size: 9.5px;
  cursor: pointer;
}
.source-ledger-filters button.active { border-color: #88abec; color: #255fbf; background: #eaf2ff; font-weight: 750; }
.source-ledger-search { display: flex; align-items: center; gap: 7px; color: #738298; font-size: 10px; }
.source-ledger-search input {
  width: min(230px, 26vw);
  padding: 7px 10px;
  border: 1px solid #d2deea;
  border-radius: 8px;
  color: #31445d;
  background: #fff;
  font: inherit;
  outline: 0;
}
.source-ledger-search input:focus { border-color: #79a2e9; box-shadow: 0 0 0 3px rgba(36, 92, 255, .1); }
.source-ledger-category { margin-top: 14px; padding: 23px; border: 1px solid #dbe5ef; border-radius: 14px; background: #f9fbfd; }
.source-ledger-category > header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .45fr); gap: 20px; align-items: start; }
.source-ledger-category > header > div { display: flex; gap: 13px; }
.source-ledger-category > header > div > span {
  flex: 0 0 auto;
  color: #88a1c4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}
.source-ledger-category h2 { margin: -3px 0 3px; color: #1a2b42; font-size: 17px; }
.source-ledger-category header p { margin: 0; color: #718096; font-size: 10.5px; line-height: 1.65; }
.source-ledger-gap { padding: 9px 11px; border-left: 2px solid #d3ad65; background: #fff9ee; }
.source-ledger-gap b { display: block; margin-bottom: 3px; color: #8c6727; font-size: 9px; }
.source-ledger-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-top: 17px; }
.source-ledger-card { padding: 17px; border: 1px solid #dce5ef; border-radius: 11px; background: #fff; box-shadow: 0 5px 15px rgba(33, 58, 89, .035); }
.source-ledger-card > header { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.source-ledger-tier,
.source-ledger-official,
.source-ledger-status { padding: 2px 6px; border-radius: 999px; font-size: 8.5px; font-weight: 750; }
.source-ledger-tier { color: #536b87; background: #edf3f9; }
.source-ledger-official { margin-left: 4px; color: #276b55; background: #e8f5ef; }
.source-ledger-status.is-ready { color: #297359; background: #ebf7f1; }
.source-ledger-status.is-waiting { color: #966927; background: #fff4df; }
.source-ledger-card h3 { margin: 12px 0 5px; color: #1d3049; font-size: 14px; }
.source-ledger-coverage { min-height: 34px; margin: 0; color: #63748a; font-size: 10.5px; line-height: 1.65; }
.source-ledger-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 14px 0 0; }
.source-ledger-card dl div { min-width: 0; }
.source-ledger-card dt { color: #96a2b1; font-size: 8.5px; }
.source-ledger-card dd { margin: 2px 0 0; color: #4f6178; font-size: 9.5px; line-height: 1.5; }
.source-ledger-card footer { display: flex; justify-content: space-between; gap: 12px; align-items: end; margin-top: 14px; padding-top: 11px; border-top: 1px solid #edf1f5; }
.source-ledger-card footer div { min-width: 0; }
.source-ledger-card footer b { display: block; overflow: hidden; color: #5c7089; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.source-ledger-card footer small { display: block; margin-top: 3px; color: #9aa5b2; font-size: 8px; line-height: 1.45; }
.source-ledger-card footer a { flex: 0 0 auto; color: #3470cf; font-size: 9.5px; font-weight: 700; text-decoration: none; }
.source-ledger-state { display: grid; min-height: 260px; place-content: center; text-align: center; }
.source-ledger-state h2 { margin: 0; color: #273a53; font-size: 17px; }
.source-ledger-state p { margin: 8px 0 0; color: #7b8899; font-size: 11px; }
.source-ledger-state.is-error h2 { color: #a0414b; }

@media (max-width: 980px) {
  .source-ledger-grid { grid-template-columns: 1fr; }
  .source-ledger-category > header { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .source-ledger-main { padding: 14px 12px 48px; }
  .source-ledger-hero { padding: 20px 17px; border-radius: 12px; }
  .source-ledger-back { position: static; display: inline-block; margin-top: 16px; }
  .source-ledger-kicker { margin-top: 22px; }
  .source-ledger-principles { grid-template-columns: 1fr; gap: 12px; padding: 17px; }
  .source-ledger-toolbar { align-items: stretch; flex-direction: column; }
  .source-ledger-search { justify-content: space-between; }
  .source-ledger-search input { width: min(260px, 70vw); }
  .source-ledger-category { padding: 17px 13px; }
  .source-ledger-card dl { grid-template-columns: 1fr; }
  .source-ledger-stats > p { width: 100%; margin: 3px 0 0; }
}

/* ==================== 库(library-*):板块/个股基础信息库 ==================== */
.library-main { max-width: 1080px; }
.library-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.library-coverage { font-size: 12px; color: #7c8494; background: #f4f6fa; border: 1px solid #e6e9f0; border-radius: 999px; padding: 6px 14px; white-space: nowrap; }
.library-search { position: relative; margin: 18px 0 14px; }
.library-search input { width: min(520px, 100%); padding: 10px 14px; border: 1px solid #dde2ea; border-radius: 10px; font-size: 14px; background: #fff; }
.library-search input:focus { outline: 2px solid #bfd3ff; border-color: #2563eb; }
.library-search-results { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; width: min(520px, 100%); max-height: 320px; overflow-y: auto; background: #fff; border: 1px solid #dde2ea; border-radius: 10px; box-shadow: 0 10px 30px rgba(20, 30, 60, .12); }
.library-search-item { display: block; width: 100%; text-align: left; padding: 9px 14px; border: 0; border-bottom: 1px solid #f0f2f7; background: none; font-size: 13px; cursor: pointer; }
.library-search-item:hover { background: #f4f7ff; }
.library-state { margin: 14px 0; padding: 12px 16px; border: 1px solid #e6e9f0; border-radius: 10px; background: #fafbfd; font-size: 13px; color: #5b6472; }
.library-letters { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; }
.library-letter { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border: 1px solid #dde2ea; border-radius: 10px; background: #fff; font-size: 14px; font-weight: 600; color: #333a46; cursor: pointer; }
.library-letter:hover { border-color: #2563eb; color: #2563eb; }
.library-letter.on { background: #eff4ff; border-color: #2563eb; color: #2563eb; }
.library-letter-count { font-size: 11px; font-weight: 400; color: #9aa2b1; }
.library-board-list { display: flex; flex-direction: column; gap: 6px; }
.library-board { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 16px; border: 1px solid #e6e9f0; border-radius: 10px; background: #fff; font-size: 14px; cursor: pointer; text-align: left; }
.library-board:hover { border-color: #2563eb; background: #f8faff; }
.library-board-name { font-weight: 600; color: #2a3140; }
.library-board-meta { font-size: 12px; color: #9aa2b1; white-space: nowrap; }
.library-crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.library-back, .library-board-link { padding: 6px 12px; border: 1px solid #dde2ea; border-radius: 8px; background: #fff; font-size: 12px; color: #445; cursor: pointer; }
.library-back:hover, .library-board-link:hover { border-color: #2563eb; color: #2563eb; }
.library-sub { font-size: 13px; font-weight: 400; color: #9aa2b1; }
.library-children { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; font-size: 13px; color: #5b6472; align-items: center; }
.library-table { width: 100%; border-collapse: collapse; margin: 10px 0 20px; font-size: 13px; background: #fff; border: 1px solid #e6e9f0; border-radius: 10px; overflow: hidden; }
.library-table th { text-align: left; padding: 9px 12px; background: #f4f6fa; color: #7c8494; font-weight: 600; border-bottom: 1px solid #e6e9f0; }
.library-table td { padding: 8px 12px; border-bottom: 1px solid #f0f2f7; }
.library-stock-row { cursor: pointer; }
.library-stock-row:hover td { background: #f4f7ff; }
.library-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin: 14px 0 18px; }
.library-facts > div { border: 1px solid #e6e9f0; border-radius: 10px; padding: 10px 14px; background: #fff; }
.library-facts dt { font-size: 11px; color: #9aa2b1; margin-bottom: 4px; }
.library-facts dd { margin: 0; font-size: 14px; font-weight: 600; color: #2a3140; }
.library-body h3 { margin: 18px 0 8px; font-size: 15px; color: #2a3140; }
.library-text { font-size: 13px; line-height: 1.75; color: #4a5262; margin: 6px 0; }
.library-concept { border-left: 3px solid #dbe4f6; padding: 2px 0 2px 12px; margin: 10px 0; }
.library-concept b { font-size: 13px; color: #2a3140; }
.library-hint { padding: 14px 4px; font-size: 13px; color: #9aa2b1; }
@media (max-width: 760px) {
  .library-title-row { flex-direction: column; }
  .library-facts { grid-template-columns: 1fr 1fr; }
  .library-table { display: block; overflow-x: auto; }
}

