.ledger-inner-body { --data-amber: #b77913; --data-green: #087b53; --data-red: #bf344c; }
.ledger-sr-live { position: fixed; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.today-card[hidden], .search-result-card[hidden] { display: none !important; }
.data-heading-actions { display: flex; align-items: center; gap: 14px; }
.data-heading-actions > b { min-width: 96px; color: var(--ledger-brand); font: 800 30px/1 var(--ledger-num); text-align: right; }
.data-heading-actions > b small { display: block; margin-top: 7px; color: var(--ledger-muted); font: 500 10px var(--ledger-font); }
.data-heading-actions > button, .data-heading > button { min-height: 42px; padding: 0 15px; border: 1px solid #d9e2f8; border-radius: 6px; background: #f4f7ff; color: var(--ledger-deep); font-weight: 700; }
.data-heading-actions > button.is-favorite, .data-heading > button.is-favorite { border-color: #e9c982; background: #fff8e6; color: #9b6810; }

.data-filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 12px; padding: 10px 12px; }
.data-filter-tabs { display: flex; align-items: center; gap: 5px; overflow-x: auto; scrollbar-width: none; }
.data-filter-tabs::-webkit-scrollbar { display: none; }
.data-filter-tabs :is(button, a), .period-switch a { min-height: 38px; padding: 0 14px; border: 0; border-radius: 5px; background: #f3f5f8; color: #5c687a; font-size: 12px; line-height: 38px; white-space: nowrap; }
.data-filter-tabs :is(button, a).active, .period-switch a.active { background: var(--ledger-brand); color: #fff; font-weight: 700; }
.data-inline-search { display: flex; align-items: center; gap: 7px; width: min(310px, 100%); min-height: 40px; padding: 0 11px; border: 1px solid #dfe5ee; border-radius: 6px; background: #f8fafc; }
.data-inline-search:focus-within { border-color: var(--ledger-brand); box-shadow: 0 0 0 3px var(--ledger-tint); background: #fff; }
.data-inline-search svg, .site-search-hero svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--ledger-muted); stroke-width: 1.8; }
.data-inline-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ledger-text); font-size: 13px; }
.data-empty { padding: 72px 20px; border: 1px solid var(--ledger-line); border-radius: 8px; background: #fff; color: var(--ledger-muted); text-align: center; }
.data-empty strong { display: block; color: var(--ledger-text); font-size: 18px; }
.data-empty p { margin: 8px 0 0; }
.data-empty.compact { padding: 34px 20px; border: 0; border-radius: 0; }

/* 今日资料 */
.today-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.today-card { position: relative; display: flex; min-height: 190px; padding: 15px; overflow: hidden; border: 1px solid #dfe4ec; border-top: 3px solid #aeb8c7; border-radius: 7px; background: #fff; box-shadow: var(--ledger-shadow); flex-direction: column; transition: border-color .18s ease, transform .18s ease; }
.today-card:hover { border-color: #bcccf3; transform: translateY(-2px); }
.today-card.is-hit { border-top-color: var(--data-green); }
.today-card.is-miss { border-top-color: #d7a139; }
.today-card.is-pending { border-top-color: var(--ledger-brand); }
.today-card > header { display: flex; align-items: center; justify-content: space-between; }
.today-card > header span, .today-card > header em { padding: 3px 7px; border-radius: 9px; background: #f1f4f8; color: #657185; font-size: 9px; font-style: normal; }
.today-card.is-hit > header em { background: #e8f8f2; color: var(--data-green); }
.today-card.is-miss > header em { background: #fff5df; color: #9b6810; }
.today-card.is-pending > header em { background: var(--ledger-tint); color: var(--ledger-deep); }
.today-card h2 { margin: 13px 0 4px; color: var(--ledger-text); font-size: 15px; }
.today-card > strong { color: #ba2943; font-size: 18px; line-height: 1.55; }
.today-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.today-tags i { min-width: 24px; padding: 2px 6px; border: 1px solid #e0e5ed; border-radius: 4px; background: #f8fafc; color: #536074; font-size: 9px; font-style: normal; text-align: center; }
.today-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 13px; border-top: 1px dashed #e4e8ee; color: var(--ledger-muted); font-size: 9px; }
.today-card > footer span:last-child { color: var(--ledger-deep); }

/* 数据统计 */
.stats-switcher .period-switch, .period-switch { display: flex; gap: 5px; }
.period-switch a { display: inline-block; }
.stats-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.stats-kpis > div { padding: 15px 16px; border: 1px solid var(--ledger-line); border-left: 4px solid var(--ledger-brand); border-radius: 7px; background: #fff; box-shadow: var(--ledger-shadow); }
.stats-kpis small, .stats-kpis span { display: block; color: var(--ledger-muted); font-size: 9px; }
.stats-kpis b { display: block; margin: 5px 0 3px; color: var(--ledger-text); font: 800 22px/1.2 var(--ledger-num); }
.stats-two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.stats-panel { padding-bottom: 12px; overflow: hidden; }
.stats-panel > header, .distribution-card > header, .change-log > header, .library-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 12px 15px; border-bottom: 1px solid var(--ledger-line); }
.stats-panel > header span, .change-log > header span, .library-panel > header span { color: var(--ledger-brand); font: 700 8px var(--ledger-num); letter-spacing: 1.4px; }
.stats-panel > header h2, .distribution-card > header h2, .change-log > header h2, .library-panel > header h2 { margin: 2px 0 0; color: var(--ledger-text); font-size: 14px; }
.stats-panel > header > small, .distribution-card > header > small, .change-log > header > small { color: var(--ledger-muted); font-size: 9px; }
.number-stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; padding: 14px; }
.number-stat-grid > div { display: grid; justify-items: center; padding: 8px 2px; border: 1px solid #e6eaf0; border-radius: 6px; background: #fafbfd; }
.number-stat-grid i { display: grid; width: 33px; height: 33px; place-items: center; border-radius: 50%; background: var(--number-color); color: #fff; font: 800 12px var(--ledger-num); font-style: normal; }
.number-stat-grid i.red { --number-color: var(--ledger-red); }
.number-stat-grid i.blue { --number-color: var(--ledger-blue); }
.number-stat-grid i.green { --number-color: var(--ledger-green); }
.number-stat-grid strong { margin-top: 6px; color: var(--ledger-text); font-size: 9px; }
.number-stat-grid small { color: var(--ledger-muted); font-size: 7px; }
.number-stat-grid.omission strong { color: var(--data-amber); }
.stats-distributions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.distribution-card { padding-bottom: 11px; }
.distribution-row { display: grid; grid-template-columns: 47px minmax(0, 1fr) 52px; align-items: center; gap: 8px; min-height: 29px; padding: 0 14px; }
.distribution-row > span { color: var(--ledger-text-2); font-size: 10px; }
.distribution-row > i { display: block; height: 6px; overflow: hidden; border-radius: 3px; background: #edf0f4; }
.distribution-row > i b { display: block; height: 100%; border-radius: inherit; background: var(--ledger-brand); }
.distribution-row > strong { color: var(--ledger-text); font: 700 10px var(--ledger-num); text-align: right; }
.distribution-row > strong small { margin-left: 4px; color: var(--ledger-muted); font-size: 7px; }
.method-note { margin-top: 12px; padding: 12px 15px; border: 1px solid #dde5f6; border-left: 4px solid var(--ledger-brand); border-radius: 6px; background: #f6f8fd; color: #667287; font-size: 10px; line-height: 1.7; }
.method-note strong { margin-right: 8px; color: var(--ledger-deep); }

/* 命中榜 */
.ranking-toolbar > div:first-child strong { display: block; color: var(--ledger-text); font-size: 12px; }
.ranking-toolbar > div:first-child span { color: var(--ledger-muted); font-size: 9px; }
.ranking-list { overflow: hidden; }
.ranking-table-head, .ranking-row { display: grid; grid-template-columns: minmax(230px, 1.4fr) 130px 70px 90px 95px; align-items: center; gap: 12px; padding: 11px 16px; }
.ranking-table-head { background: #f5f7fa; color: var(--ledger-muted); font-size: 9px; }
.ranking-row { min-height: 78px; border-top: 1px solid #edf0f4; }
.ranking-row:hover { background: #fafcff; }
.ranking-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.ranking-title > i { display: grid; width: 31px; height: 31px; flex: none; place-items: center; border-radius: 6px; background: #eef2f8; color: #6a778a; font: 800 12px var(--ledger-num); font-style: normal; }
.ranking-row:nth-of-type(2) .ranking-title > i, .ranking-row:nth-of-type(3) .ranking-title > i, .ranking-row:nth-of-type(4) .ranking-title > i { background: #fff2d2; color: #a56e0d; }
.ranking-title span { min-width: 0; }
.ranking-title b, .ranking-title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-title b { color: var(--ledger-text); font-size: 13px; }
.ranking-title small { color: var(--ledger-muted); font-size: 9px; }
.ranking-trend { display: flex; gap: 4px; }
.ranking-trend i { width: 10px; height: 10px; border-radius: 50%; background: #cbd2dc; }
.ranking-trend i.hit { background: var(--ledger-green); }
.ranking-trend i.miss { background: #d7a139; }
.ranking-row > strong { color: var(--ledger-text-2); font-size: 11px; }
.ranking-count b { color: var(--data-green); }
.ranking-count i { color: var(--data-amber); font-style: normal; }
.ranking-count em { margin: 0 4px; color: #bcc3cd; font-style: normal; }
.ranking-rate b { display: block; color: var(--ledger-deep); font: 800 14px var(--ledger-num); }
.ranking-rate i { display: block; width: 70px; height: 4px; margin-top: 5px; border-radius: 2px; background: linear-gradient(90deg, var(--ledger-brand) var(--rate), #e9edf3 var(--rate)); }

/* 搜索 */
.site-search-hero { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 12px; }
.site-search-hero svg { width: 22px; height: 22px; margin-left: 4px; }
.site-search-hero input { flex: 1; min-width: 0; height: 42px; border: 0; outline: 0; color: var(--ledger-text); font-size: 15px; }
.site-search-hero button { min-width: 88px; height: 42px; border: 0; border-radius: 5px; background: var(--ledger-brand); color: #fff; font-weight: 700; }
.search-type-tabs { display: flex; gap: 6px; margin-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
.search-type-tabs button { min-height: 36px; padding: 0 14px; border: 1px solid #dde3eb; border-radius: 18px; background: #fff; color: #5d697c; white-space: nowrap; }
.search-type-tabs button.active { border-color: var(--ledger-brand); background: var(--ledger-tint); color: var(--ledger-deep); }
.search-results { display: grid; gap: 8px; }
.search-result-card { display: grid; grid-template-columns: 70px minmax(0, 1fr) 20px; align-items: center; gap: 14px; min-height: 91px; padding: 13px 16px; border: 1px solid var(--ledger-line); border-radius: 7px; background: #fff; box-shadow: var(--ledger-shadow); }
.search-result-card > span { justify-self: start; padding: 4px 9px; border-radius: 11px; background: var(--ledger-tint); color: var(--ledger-deep); font-size: 9px; }
.search-result-card h2 { margin: 0; color: var(--ledger-text); font-size: 14px; }
.search-result-card p { margin: 4px 0 2px; overflow: hidden; color: var(--ledger-text-2); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.search-result-card small { color: var(--ledger-muted); font-size: 9px; }
.search-result-card > i { color: #aeb8c6; font-style: normal; }
.search-suggestions { padding: 20px; }
.search-suggestions h2 { margin: 0 0 13px; font-size: 15px; }
.search-suggestions div { display: flex; flex-wrap: wrap; gap: 8px; }
.search-suggestions a { padding: 7px 12px; border: 1px solid #dfe5ee; border-radius: 5px; background: #f7f9fc; color: var(--ledger-text-2); font-size: 11px; }

/* 数据可信度 */
.credibility-kpis > div:nth-child(2) { border-left-color: var(--ledger-green); }
.credibility-kpis > div:nth-child(3) { border-left-color: #9c64d8; }
.credibility-kpis > div:nth-child(4) { border-left-color: var(--data-amber); }
.source-status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.source-status-grid article { padding: 15px; }
.source-status-grid header { display: flex; align-items: center; gap: 10px; }
.source-status-grid header > i { width: 10px; height: 10px; border-radius: 50%; background: var(--ledger-green); box-shadow: 0 0 0 4px rgba(13,170,112,.1); }
.source-status-grid header b, .source-status-grid header small { display: block; }
.source-status-grid header b { font-size: 13px; }
.source-status-grid header small { color: var(--data-green); font-size: 9px; }
.source-status-grid p { min-height: 38px; color: var(--ledger-text-2); font-size: 10px; line-height: 1.7; }
.source-status-grid footer { padding-top: 10px; border-top: 1px solid #edf0f4; color: var(--ledger-muted); font-size: 8px; }
.change-log { overflow: hidden; }
.change-log > div > article { display: grid; grid-template-columns: 165px 80px minmax(0, 1fr); gap: 12px; padding: 12px 15px; border-top: 1px solid #edf0f4; }
.change-log time { color: var(--ledger-muted); font: 500 9px var(--ledger-num); }
.change-log article > span { color: var(--data-amber); font-size: 10px; }
.change-log article b { color: var(--ledger-text); font-size: 11px; }
.change-log article p { margin: 2px 0 0; color: var(--ledger-muted); font-size: 9px; }

/* 收藏 */
.library-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.library-panel { overflow: hidden; }
.library-panel > header button { min-height: 32px; padding: 0 10px; border: 1px solid #dfe4ec; border-radius: 4px; background: #f7f9fc; color: var(--ledger-muted); font-size: 9px; }
.library-list { display: grid; }
.library-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 82px; padding: 12px 14px; border-top: 1px solid #edf0f4; }
.library-item > a { min-width: 0; }
.library-item > span { justify-self: start; padding: 3px 7px; border-radius: 9px; background: var(--ledger-tint); color: var(--ledger-deep); font-size: 9px; }
.library-item b, .library-item small { display: block; }
.library-item b { overflow: hidden; color: var(--ledger-text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.library-item small { margin-top: 3px; color: var(--ledger-muted); font-size: 9px; }
.library-item button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: #f2f4f7; color: #8d98a8; }
.library-empty { padding: 58px 20px; color: var(--ledger-muted); text-align: center; }
.library-empty strong { display: block; color: var(--ledger-text); font-size: 14px; }
.library-empty p { margin: 5px 0 0; font-size: 10px; }

@media (max-width: 900px) {
    .today-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-distributions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .number-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .ranking-table-head, .ranking-row { grid-template-columns: minmax(210px, 1fr) 120px 70px 90px; }
    .ranking-table-head span:nth-child(3), .ranking-row > strong { display: none; }
}

@media (max-width: 650px) {
    .data-heading { align-items: flex-end; }
    .data-heading-actions { gap: 7px; }
    .data-heading-actions > b { min-width: 64px; font-size: 22px; }
    .data-heading-actions > button, .data-heading > button { min-height: 38px; padding: 0 10px; font-size: 11px; }
    .data-filter-bar { align-items: stretch; flex-direction: column; }
    .data-inline-search { width: 100%; }
    .today-grid { grid-template-columns: 1fr; gap: 8px; }
    .today-card { min-height: 170px; }
    .stats-switcher { flex-direction: column; }
    .stats-switcher .period-switch { overflow-x: auto; }
    .stats-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .stats-kpis > div { padding: 12px; }
    .stats-two-column, .stats-distributions, .library-layout { grid-template-columns: 1fr; }
    .number-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 10px; }
    .distribution-row { grid-template-columns: 40px minmax(0, 1fr) 48px; padding: 0 11px; }
    .ranking-toolbar { align-items: stretch; flex-direction: column; }
    .ranking-toolbar .period-switch { overflow-x: auto; }
    .ranking-table-head { display: none; }
    .ranking-row { grid-template-columns: minmax(0, 1fr) auto; gap: 9px; min-height: 105px; padding: 12px; }
    .ranking-title { grid-column: 1; }
    .ranking-trend { grid-column: 1; }
    .ranking-count { grid-column: 2; grid-row: 1; text-align: right; }
    .ranking-rate { grid-column: 2; grid-row: 2; text-align: right; }
    .ranking-rate i { width: 60px; }
    .site-search-hero { gap: 5px; padding: 8px; }
    .site-search-hero svg { display: none; }
    .site-search-hero input { min-width: 0; font-size: 14px; }
    .site-search-hero button { min-width: 64px; }
    .search-result-card { grid-template-columns: 52px minmax(0, 1fr) 14px; gap: 9px; padding: 12px 10px; }
    .search-result-card p { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .source-status-grid { grid-template-columns: 1fr; gap: 8px; }
    .change-log > div > article { grid-template-columns: 1fr auto; gap: 4px 8px; }
    .change-log article > div { grid-column: 1 / -1; }
    .library-item { grid-template-columns: 50px minmax(0, 1fr) auto; padding: 11px 10px; }
    .data-filter-tabs :is(button, a), .period-switch a, .library-panel > header button, .library-item button { min-height: 44px; }
    .library-item button { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
    .today-card { transition: none; }
    .today-card:hover { transform: none; }
}
