.comprehensive-panel { padding: 22px; }
.comprehensive-tabs .report-tab { padding: 0 16px; }
.ca-subnav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 0 18px; border-bottom: 1px solid #f0dfcf; margin-bottom: 18px; }
.comprehensive-panel .ca-subnav-title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.5; color: #704a31; }
.ca-subtab { padding: 8px 12px; border: 1px solid #efc08f; border-radius: 8px; background: #fff7eb; color: #a75b1c; font-size: 13px; cursor: pointer; transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease; }
.ca-subtab:hover { border-color: #df842b; color: #914914; background: #ffedd8; transform: translateY(-1px); }
.ca-subtab.active { border-color: #c96724; color: #fff; background: linear-gradient(135deg, #c96724, #a94f1b); box-shadow: 0 5px 12px rgba(201, 103, 36, .22); }
.ca-subtab.active { font-weight: 750; }
.ca-filter-toggle { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 11px; border: 1px solid #edc18f; border-radius: 9px; color: #a75b1c; background: #fffaf3; cursor: pointer; font-size: 12px; font-weight: 750; white-space: nowrap; transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.ca-filter-toggle:hover { color: #914914; border-color: #d9772b; background: #fff0dc; box-shadow: 0 5px 12px rgba(201, 103, 36, .14); transform: translateY(-1px); }
.ca-filter-toggle.is-expanded { color: #fff; border-color: #c96724; background: linear-gradient(135deg, #d9772b, #b55b1e); box-shadow: 0 5px 12px rgba(201, 103, 36, .2); }
.ca-filter-toggle.is-expanded:hover { color: #fff; background: linear-gradient(135deg, #e28737, #bd6422); }
.ca-filter-toggle-icon { flex: 0 0 auto; }
.ca-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 16px; padding: 18px; background: linear-gradient(135deg, #fffaf3, #fff4e7); border: 1px solid #efd9c3; border-radius: 9px; margin-bottom: 22px; }
.ca-field { display: flex; flex-direction: column; gap: 7px; min-width: 125px; flex: 1 1 140px; max-width: 320px; font-size: 12px; color: #806f61; }
.ca-field input, .ca-field select, .ca-chart-select select, .ca-pagination select { width: 100%; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid #ead6c0; border-radius: 7px; color: #624a39; background: #fff; font: inherit; font-size: 13px; }
.ca-button, .ca-primary { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 13px; border: 1px solid #ead6c0; border-radius: 7px; color: #725d4d; background: #fff; font-size: 13px; cursor: pointer; white-space: nowrap; }
.ca-primary { color: #fff; background: #d9772b; border-color: #d9772b; }
.ca-button:hover { color: #a9571d; border-color: #e6a66b; background: #fff5e8; }
.ca-button:disabled { opacity: .4; cursor: default; }
.ca-error { color: #c65d44; margin: 0; width: 100%; font-size: 13px; }
.ca-error:empty { display: none; }
.ca-result-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.ca-view-switch { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid #eee6dc; border-radius: 11px; background: #f6f3ef; }
.ca-view-switch .ca-button { min-height: 34px; gap: 7px; padding: 0 15px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #8b7b6c; font-weight: 500; transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease; }
.ca-view-switch .ca-button svg { flex-shrink: 0; }
.ca-view-switch .ca-button:hover { color: #a9571d; background: #fff8ef; }
.ca-view-switch .ca-button.active { color: #b65c16; background: #fff; border-color: #efd2b0; box-shadow: 0 2px 5px rgba(117, 74, 31, .09); font-weight: 700; }
.ca-view-switch .ca-button:focus-visible { outline: 2px solid #df8b35; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .ca-view-switch .ca-button { transition: none; } }
.ca-chart-select { display: flex; align-items: center; gap: 8px; color: #806f61; font-size: 12px; }
.ca-chart-select select { width: 160px; }
.ca-exports { margin-left: auto; display: flex; gap: 8px; }
.ca-note { color: #897363; font-size: 12px; line-height: 1.8; margin: 0 0 16px; }
/* Light ivory tables with distinct grouped headers and restrained row emphasis. */
.ca-table-scroll { max-width: 100%; overflow: auto; border: 1px solid #e9e2d3; border-radius: 9px; background: #fff; }
.ca-table { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: 13px; white-space: nowrap; color: #595448; font-variant-numeric: tabular-nums; }
.ca-table th, .ca-table td { padding: 12px 15px; text-align: right; border-bottom: 1px solid #eee9de; }
.ca-table th { background: #faf6e9; color: #665b3f; font-weight: 650; }
.ca-table thead tr:first-child th[colspan] { text-align: center; color: #756035; background: #f5eacb; }
.ca-table thead tr:nth-child(2) th { padding-top: 8px; padding-bottom: 8px; font-size: 12px; color: #786b4e; }
.ca-table th:first-child, .ca-table td:first-child { text-align: left; position: sticky; left: 0; background: #fff; z-index: 1; border-right: 1px solid #eae3d4; }
.ca-table th:first-child { background: #faf6e9; z-index: 2; }
.ca-table th button { border: 0; padding: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.ca-table th button:focus-visible { outline: 2px solid #d7944c; outline-offset: 2px; }
.ca-table th button span { font-size: 11px; color: #a99a78; }
.ca-table tbody tr:nth-child(even) td { background-color: #fdfbf6; }
.ca-table tbody tr:hover td { background-color: #faf1d9; }
.ca-table tbody tr:last-child td { border-bottom: 0; }
.ca-table td.ca-up { color: #c84c45; }
.ca-table td.ca-down { color: #23816f; }
.ca-link { border: 0; background: none; color: #94702e; cursor: pointer; font-size: 13px; }
.ca-pagination { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 16px; font-size: 12px; color: #897363; }
.ca-pagination > span { margin-right: auto; }
.ca-pagination select { width: 62px; height: 32px; }
.ca-empty { padding: 55px 20px; text-align: center; color: #9b8775; background: #fffaf5; border: 1px dashed #efdcc5; border-radius: 8px; }
.ca-bars { padding: 24px 20px; border: 1px solid #ecd9c8; border-radius: 9px; background: linear-gradient(135deg, #fff, #fffaf5); display: grid; gap: 18px; }
.ca-bar-row { display: grid; grid-template-columns: minmax(120px, 220px) minmax(100px, 1fr) 95px; align-items: center; gap: 16px; font-size: 12px; }
.ca-bar-row > span { color: #725d4d; }
.ca-bar-row small { display: block; color: #a18c79; font-size: 11px; }
.ca-bar-row strong { text-align: right; font-variant-numeric: tabular-nums; color: #b76520; }
.ca-bar-track { height: 18px; border-radius: 5px; background: #f9ead9; overflow: hidden; }
.ca-bar-track i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #f4b86a, #e1802b); }
.ca-distribution-chart { display: flex; gap: 10px; min-height: 330px; padding: 24px 18px 14px; border: 1px solid #ecd9c8; border-radius: 9px; background: linear-gradient(135deg, #fff, #fffaf5); }
.ca-distribution-y { width: 42px; display: flex; flex-direction: column; justify-content: space-between; padding: 2px 0 42px; color: #927862; font-size: 11px; text-align: right; }
.ca-distribution-plot { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ca-distribution-bars { flex: 1; min-height: 250px; display: flex; align-items: flex-end; gap: 5px; padding: 0 4px; border-left: 1px solid #d9c9ba; border-bottom: 1px solid #d9c9ba; }
.ca-distribution-bar { flex: 1 1 0; min-width: 18px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; color: #876e59; font-size: 10px; }
.ca-distribution-bar i { width: min(34px, 82%); min-height: 2px; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, #f2a24e, #d16b22); transition: height .25s ease; }
.ca-distribution-bar-value { min-height: 14px; color: #a65b20; font-size: 10px; font-variant-numeric: tabular-nums; }
.ca-distribution-bar span { max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transform: rotate(-35deg); transform-origin: top center; }
.ca-distribution-axis { height: 42px; padding-top: 26px; color: #765f4e; font-size: 12px; text-align: center; }
.ca-line-chart-wrap { overflow-x: auto; padding: 18px 18px 10px; border: 1px solid #ecd9c8; border-radius: 9px; background: linear-gradient(135deg, #fff, #fffaf5); }
.ca-line-chart-title { margin-bottom: 5px; color: #684a37; font-size: 13px; font-weight: 750; }
.ca-line-chart { display: block; min-width: 680px; width: 100%; height: 330px; overflow: visible; }
.ca-line-chart g line { stroke: #eadfd4; stroke-width: 1; stroke-dasharray: 3 4; }
.ca-line-chart g text { fill: #927862; font-size: 11px; }
.ca-line-chart .ca-axis { stroke: #bda994; stroke-width: 1.2; }
.ca-line-chart polyline { fill: none; stroke: #d9772b; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ca-line-chart circle { fill: #fff; stroke: #c45e12; stroke-width: 2.5; }
.ca-line-chart .ca-line-label { fill: #765f4e; font-size: 11px; }
.ca-normal-summary { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; padding: 16px 20px; color: #624a39; font-size: 13px; line-height: 1.8; font-variant-numeric: tabular-nums; }
.ca-normal-summary span { white-space: nowrap; }
.ca-chart-caption { font-size: 13px; color: #806f61; }
.ca-flow { width: 100%; max-height: 650px; background: #fffcf7; border: 1px solid #f0e4d4; border-radius: 10px; }
.ca-flow text { font-size: 12px; fill: #756653; }
.ca-report-index { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; padding: 15px; border-radius: 8px; background: #fff6e9; }
.ca-report-index a { color: #b75d20; font-size: 13px; text-decoration: none; }
.ca-report-section { margin-top: 30px; scroll-margin-top: 100px; }
.ca-report-section h3 { font-size: 16px; color: #684a37; }
.ca-report-section p { font-size: 12px; color: #897363; line-height: 1.8; }
.ca-academic-reports { display: grid; gap: 22px; }
.ca-academic-card { overflow: hidden; border: 1px solid #eadfd1; border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(84, 61, 37, .06); }
.ca-academic-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 24px 28px 20px; border-bottom: 1px solid #eee4d8; background: linear-gradient(135deg, #fffaf4, #fff); }
.ca-academic-school { margin: 0 0 5px; color: #a45d22; font-size: 14px; font-weight: 650; }
.ca-academic-card-head h3 { margin: 0; color: #3e342c; font-size: 24px; letter-spacing: .03em; }
.ca-academic-exam { margin: 8px 0 0; color: #82766b; font-size: 13px; }
.ca-academic-card-head dl { display: grid; grid-template-columns: repeat(4, minmax(74px, auto)); gap: 12px; margin: 0; }
.ca-academic-card-head dl div { min-width: 72px; padding-left: 12px; border-left: 1px solid #eadfd1; }
.ca-academic-card-head dt { color: #9b8c7d; font-size: 11px; }
.ca-academic-card-head dd { margin: 5px 0 0; color: #4b4038; font-size: 14px; font-weight: 650; }
.ca-academic-section { padding: 20px 28px 24px; }
.ca-academic-section + .ca-academic-section { border-top: 1px solid #f0e9e0; }
.ca-academic-section h4 { margin: 0 0 14px; color: #4f3e31; font-size: 16px; }
.ca-academic-overview-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 14px; }
.ca-academic-overview-grid > div { padding: 14px 16px; border: 1px solid #eee5db; border-radius: 9px; background: #fffdfa; }
.ca-academic-overview-grid b { color: #a15d25; font-size: 13px; }
.ca-academic-overview-grid p { margin: 7px 0 0; color: #65584d; font-size: 13px; line-height: 1.7; }
.ca-academic-grid { overflow: auto; border: 1px solid #eee5db; border-radius: 9px; }
.ca-academic-head, .ca-academic-row { display: grid; grid-template-columns: 72px minmax(240px, 1.3fr) minmax(180px, 1fr) minmax(180px, 1fr); min-width: 780px; align-items: stretch; }
.ca-academic-head { color: #796958; background: #faf5ec; font-size: 12px; font-weight: 700; }
.ca-academic-head span, .ca-academic-row > * { padding: 10px 12px; border-right: 1px solid #f0e9e0; }
.ca-academic-head span:last-child, .ca-academic-row > *:last-child { border-right: 0; }
.ca-academic-row { color: #5d5147; font-size: 12px; line-height: 1.6; border-top: 1px solid #f3eee8; }
.ca-academic-row:nth-child(odd) { background: #fffdfa; }
.ca-academic-row strong { color: #a15d25; font-size: 13px; }
.ca-academic-page-note { margin: 12px 2px 0; color: #9a8b7d; font-size: 12px; }
@media (max-width: 760px) {
    .ca-academic-card-head { display: block; }
    .ca-academic-card-head dl { grid-template-columns: repeat(2, minmax(90px, 1fr)); margin-top: 18px; }
    .ca-academic-overview-grid { grid-template-columns: 1fr; }
    .ca-academic-section { padding: 18px 16px 20px; }
    .ca-academic-card-head { padding: 20px 16px 17px; }
}
.ca-detail-dialog { width: min(1100px, 92vw); max-height: 85vh; padding: 24px; border: 1px solid #efd8be; border-radius: 15px; box-shadow: 0 24px 80px #38200c33; color: #624a39; }
.ca-detail-dialog::backdrop { background: #3d241655; backdrop-filter: blur(3px); }
.ca-detail-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; }
.ca-detail-head h2 { margin: 0; font-size: 19px; }
#caDetailBody { overflow: auto; }
#caPrintSheet { display: none; }
.comprehensive-analysis button:focus-visible, .comprehensive-analysis select:focus-visible, .comprehensive-analysis input:focus-visible { outline: 3px solid #f2b46e; outline-offset: 2px; }
@media (max-width: 680px) {
    .comprehensive-panel { padding: 14px; }
    .ca-filters { padding: 12px; gap: 12px; }
    .ca-field { max-width: none; flex-basis: calc(50% - 12px); min-width: 100px; }
    .ca-exports { margin-left: 0; }
    .ca-bar-row { grid-template-columns: 100px minmax(30px, 1fr) 62px; gap: 8px; }
    .ca-bars { padding: 15px 10px; }
    .module-view.analysis-mode { padding: 20px 14px 36px; }
}
@media print {
    body.ca-printing > :not(#caPrintSheet) { display: none !important; }
    body.ca-printing #caPrintSheet { display: block; font-size: 10px; }
    #caPrintSheet .ca-table-scroll { overflow: visible; border: 0; }
    #caPrintSheet .ca-table { font-size: 8px; white-space: normal; }
    #caPrintSheet th, #caPrintSheet td { position: static; padding: 4px; }
    @page { size: A3 landscape; margin: 12mm; }
}
/* Reference tables retain compact, centered, fully gridded cells. */
.ca-reference-scroll { border-radius: 9px; border-color: #e9e2d3; }
.ca-reference-table { border-collapse: collapse; color: #595448; font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; }
.ca-reference-table th, .ca-reference-table td { border: 1px solid #eae3d4; padding: 7px 6px; text-align: center; line-height: 1.35; font-variant-numeric: tabular-nums; }
.ca-reference-table th, .ca-reference-table th:first-child { background: #faf6e9; color: #665b3f; font-size: 14px; font-weight: 600; }
.ca-reference-table thead tr:first-child th[colspan] { background: #f5eacb; color: #756035; }
.ca-reference-table td { background: #fff; font-size: 12px; }
.ca-reference-table tbody tr:nth-child(even) td { background: #fdfbf6; }
.ca-reference-table td:first-child, .ca-reference-table th:first-child { position: static; text-align: center; }
.ca-reference-table tbody tr:hover td { background: #faf1d9; }
.ca-reference-chart { width: 100%; min-width: 0; height: 450px; background: #fff; margin-bottom: 20px; }
.ca-reference-entity { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; font: inherit; color: #94702e; cursor: pointer; }
.ca-reference-entity:hover { text-decoration: underline; }
.ca-range { min-width: 220px; }
.ca-range > div { display: flex; gap: 8px; align-items: center; }
.ca-range input { width: 95px; }
.ca-multifield { position: relative; }
.ca-multiselect { color: #624a39; font-size: 13px; }
.ca-multiselect summary { display: flex; align-items: center; justify-content: space-between; height: 36px; padding: 0 10px; box-sizing: border-box; border: 1px solid #ead6c0; border-radius: 7px; background: #fff; cursor: pointer; list-style: none; }
.ca-multiselect summary::after { content: '⌄'; }
.ca-multi-options { position: absolute; left: 0; top: 61px; z-index: 5; min-width: 270px; max-height: 270px; overflow: auto; border: 1px solid #ead6c0; border-radius: 8px; padding: 8px; background: #fff; box-shadow: 0 8px 24px #63482b24; }
.ca-multi-options label { display: flex; gap: 7px; align-items: center; padding: 6px; white-space: nowrap; }
.ca-multi-options input { width: 15px; height: 15px; accent-color: #c96724; }
@media (max-width:680px) { .ca-reference-chart { height: 440px; } }

.ca-view-switch a { text-decoration: none; }
.ca-result-section { scroll-margin-top: 110px; }
.ca-result-section:focus { outline: none; }
.ca-chart-section { margin-top: 32px; padding-top: 24px; border-top: 1px solid #efdfcd; }
.ca-chart-section-head { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.ca-chart-section-head h3 { margin: 0; font-size: 16px; color: #704a31; }
.ca-return-table { margin-left: auto; padding: 5px 0; color: #b65c16; font-size: 13px; text-decoration: none; }
.ca-return-table:hover { color: #8f4512; text-decoration: underline; }
.ca-return-table:focus-visible { outline: 2px solid #df8b35; outline-offset: 3px; }

.ca-access-scope,.scoped-head p { color:#7a6550; font-size:13px; margin:0; }
.ca-access-scope { margin:0 0 14px; }
#reportView.has-scoped-knowledge > .report-panel { display:none !important; }
.scoped-head { display:flex; justify-content:space-between; align-items:center; gap:16px; margin:20px 0; }
#scopedKnowledge .report-card { margin-bottom:20px; padding:22px; }
.scoped-metrics { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:16px; margin-bottom:24px; }
.scoped-metrics > div { background:#fff8ee; border-radius:12px; padding:18px; }
.scoped-metrics span { display:block; color:#826e56; font-size:13px; }
.scoped-metrics strong { display:block; margin-top:8px; font-size:26px; color:#a75d13; }
.scoped-tools { display:flex; gap:12px; align-items:center; margin:16px 0; }
.scoped-tools input,.scoped-tools select { border:1px solid #e3d8ca; border-radius:8px; padding:9px 12px; background:white; }
.scoped-chart { height:330px; }
@media(max-width:700px) { .scoped-metrics {grid-template-columns:repeat(2,minmax(0,1fr));} .scoped-head,.scoped-tools {flex-wrap:wrap;} }

/* Hierarchy: primary navigation, report choices, filter fields, then results. */
#moduleView.analysis-mode, #homeView, #reportView { min-height:calc(100vh + 16px); padding:16px clamp(16px, 2.5vw, 40px) 40px; }
#comprehensiveAnalysis .comprehensive-toolbar, #homeView > .toolbar, #reportView > .report-tabs { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:18px; padding:0 0 8px; margin-bottom:14px; border:0; border-bottom:1px solid #e9e4de; border-radius:0; background:#fff; box-shadow:0 5px 10px -9px #4b3d2c55; }
:is(#comprehensiveTabs, #reportTabs, #homeView .collection-view-switch) { display:flex; min-width:0; flex-wrap:nowrap; gap:2px; padding:0; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin; scrollbar-color:#e6d8c8 transparent; }
:is(#comprehensiveTabs .report-tab, #reportTabs .report-tab, #homeView .collection-view-switch button) { position:relative; flex-shrink:0; height:44px; min-height:44px; cursor:pointer; white-space:nowrap; transform:none; padding:0 13px; border:0; border-radius:5px 5px 0 0; background:transparent; color:#996a42; font-size:14px; font-weight:500; box-shadow:none; }
:is(#comprehensiveTabs .report-tab, #reportTabs .report-tab, #homeView .collection-view-switch button):hover { color:#ad5815; background:#fff8ee; }
:is(#comprehensiveTabs .report-tab, #reportTabs .report-tab, #homeView .collection-view-switch button).active { color:#c46b19; background:#fffaf2; font-weight:750; box-shadow:none; }
:is(#comprehensiveTabs .report-tab, #reportTabs .report-tab, #homeView .collection-view-switch button).active::after { content:''; position:absolute; bottom:0; left:13px; right:13px; height:3px; border-radius:3px 3px 0 0; background:#e18a2b; }
#comprehensivePanel { min-width:0; padding:0; border:0; border-radius:0; background:#fff; }
#comprehensiveContent .ca-filter-anchor { flex:0 0 auto; margin-left:auto; }
#comprehensiveContent .ca-query-panel { position:absolute; top:calc(100% - 3px); right:0; z-index:20; width:min(520px, 100%); box-sizing:border-box; overflow:auto; overscroll-behavior:contain; margin:0; padding:16px; border:1px solid #e8e2d9; border-radius:12px; background:#fff; box-shadow:0 18px 48px #40352a26,0 5px 14px #40352a14; animation:ca-filter-appear .16s ease-out; }
#comprehensiveContent .ca-query-panel[hidden] { display:none; }
#comprehensiveContent .ca-filter-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:14px; padding-bottom:11px; border-bottom:1px solid #f0ede8; }
#comprehensiveContent .ca-filter-head h3 { margin:0; color:#4c4339; font-size:14px; font-weight:650; }
#comprehensiveContent .ca-filter-reset { display:inline-flex; align-items:center; gap:5px; padding:4px 6px; border:0; border-radius:5px; color:#837567; background:transparent; font-size:12px; cursor:pointer; }
#comprehensiveContent .ca-filter-reset:hover { color:#af611c; background:#fff5e8; }
#comprehensiveContent .ca-filter-reset:focus-visible, #comprehensiveContent .ca-filter-toggle:focus-visible { outline:2px solid #d7944c; outline-offset:2px; }
@keyframes ca-filter-appear { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
@media(prefers-reduced-motion:reduce) { #comprehensiveContent .ca-query-panel { animation:none; } }
#comprehensiveContent .ca-subnav { position:sticky; top:var(--ca-primary-nav-height, 53px); z-index:14; flex-wrap:nowrap; gap:12px; padding:10px 12px; margin:0 0 18px; border:1px solid #e9e5df; border-radius:10px; background:#f8f7f4; box-shadow:0 5px 10px -9px #4b3d2c55; }
#comprehensiveContent .ca-subtabs-shell { position:relative; flex:1; min-width:0; }
#comprehensiveContent .ca-subtabs-shell::before, #comprehensiveContent .ca-subtabs-shell::after { content:''; position:absolute; top:0; bottom:0; z-index:1; width:56px; pointer-events:none; opacity:0; transition:opacity .16s ease; }
#comprehensiveContent .ca-subtabs-shell::before { left:0; background:linear-gradient(to right,#f8f7f4 0%,#f8f7f4f5 20%,#f8f7f4b3 52%,#f8f7f44d 78%,#f8f7f400 100%); }
#comprehensiveContent .ca-subtabs-shell::after { right:0; background:linear-gradient(to left,#f8f7f4 0%,#f8f7f4f5 20%,#f8f7f4b3 52%,#f8f7f44d 78%,#f8f7f400 100%); }
#comprehensiveContent .ca-subtabs-shell:has([data-subnav-scroll="left"]:not([hidden]))::before, #comprehensiveContent .ca-subtabs-shell:has([data-subnav-scroll="right"]:not([hidden]))::after { opacity:1; }
#comprehensiveContent .ca-subtabs { display:flex; flex-wrap:nowrap; align-items:center; min-width:0; gap:5px; padding:2px 0; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:none; scroll-padding-inline:34px; }
#comprehensiveContent .ca-subtabs::-webkit-scrollbar { display:none; }
#comprehensiveContent .ca-subnav-scroll { position:absolute; top:50%; z-index:2; display:flex; align-items:center; justify-content:center; width:30px; height:30px; padding:0; transform:translateY(-50%); border:1px solid #e6d9c9; border-radius:50%; background:#fffdf9; color:#9b622c; box-shadow:0 2px 9px #66523918; cursor:pointer; opacity:0; pointer-events:none; transition:opacity .16s ease,background .16s ease; }
#comprehensiveContent .ca-subnav-scroll[hidden] { display:none; }
#comprehensiveContent .ca-subnav-scroll-left { left:0; }
#comprehensiveContent .ca-subnav-scroll-right { right:0; }
#comprehensiveContent .ca-subtabs-shell:is(:hover,:focus-within) .ca-subnav-scroll { opacity:1; pointer-events:auto; }
#comprehensiveContent .ca-subnav-scroll:hover { background:#fff0da; color:#a95613; }
#comprehensiveContent .ca-subnav-scroll:focus-visible { outline:2px solid #d7944c; outline-offset:-3px; }
@media(hover:none) { #comprehensiveContent .ca-subnav-scroll { opacity:1; pointer-events:auto; } }
@media(prefers-reduced-motion:reduce) { #comprehensiveContent .ca-subnav-scroll, #comprehensiveContent .ca-subtabs-shell::before, #comprehensiveContent .ca-subtabs-shell::after { transition:none; } }
#comprehensiveContent .ca-subtab { flex-shrink:0; min-height:32px; padding:5px 11px; border:1px solid transparent; border-radius:6px; background:transparent; color:#736a5f; font-weight:500; white-space:nowrap; box-shadow:none; }
#comprehensiveContent .ca-subtab:hover { color:#ad5c1b; background:#fff2df; transform:none; }
#comprehensiveContent .ca-subtab.active { color:#a95613; border-color:#efcfaa; background:#fff0da; font-weight:700; box-shadow:none; }
#comprehensiveContent .ca-subnav-title { margin:0; font-size:14px; font-weight:650; color:#624b35; white-space:nowrap; }
#comprehensiveContent .ca-filter-toggle { flex-shrink:0; align-self:flex-start; width:34px; height:34px; min-height:34px; justify-content:center; margin:2px 0 0 auto; padding:0; border:1px solid #ded6ca; border-radius:6px; background:#fff; color:#796958; font-weight:500; box-shadow:none; }
#comprehensiveContent .ca-filter-toggle:hover, #comprehensiveContent .ca-filter-toggle.is-expanded { color:#a65c20; border-color:#e5c49e; background:#fff9f0; box-shadow:none; transform:none; }
#comprehensiveContent .ca-filter-toggle.has-active-filters { color:#b45f16; border-color:#e9bd85; background:#fff0da; box-shadow:inset 0 0 0 1px #f7dfbe; }
#comprehensiveContent .ca-filter-toggle.has-active-filters:hover { background:#ffe9c8; border-color:#dda459; }
#comprehensiveContent .ca-filters { gap:12px 16px; align-items:flex-start; padding:0; margin:0; border:0; border-radius:0; background:#fff; }
#comprehensiveContent .ca-query-panel .ca-filters { padding:0; margin:0; }
#comprehensiveContent .ca-query-panel .ca-multi-options { position:static; box-sizing:border-box; width:100%; min-width:0; max-height:200px; margin-top:5px; box-shadow:none; }
#comprehensiveContent .ca-query-panel .ca-multi-options label { white-space:normal; }
#comprehensiveContent .ca-query-panel .ca-multifield { align-items:flex-start; }
#comprehensiveContent .ca-query-panel .ca-multifield > span { padding-top:8px; }
#comprehensiveContent .ca-query-panel .ca-error { margin:0; }
#comprehensiveContent .ca-query-panel .ca-error:empty { display:none; }
#comprehensiveContent .ca-field { --filter-control-width:120px; flex-direction:row; align-items:center; flex:0 0 auto; min-width:0; max-width:100%; gap:6px; color:#81776c; }
#comprehensiveContent .ca-field:is([data-field-label="学科"], [data-field-label="级别"], [data-field-label="文理科"], [data-field-label="学生分类"], [data-field-label="分数段"], [data-field-label="分层"], [data-field-label="层次"]) { --filter-control-width:92px; }
#comprehensiveContent .ca-field[data-field-label="年级"] { --filter-control-width:128px; }
#comprehensiveContent .ca-field[data-field-label="学校"] { --filter-control-width:220px; }
#comprehensiveContent .ca-field:is([data-field-label="组块"], [data-field-label="组块2"]) { --filter-control-width:180px; }
#comprehensiveContent .ca-field:has(> input[type="search"]) { --filter-control-width:150px; }
#comprehensiveContent .ca-field > span { flex-shrink:0; white-space:nowrap; }
#comprehensiveContent .ca-field > select, #comprehensiveContent .ca-field > input, #comprehensiveContent .ca-multiselect { flex:none; width:var(--filter-control-width); min-width:0; }
#comprehensiveContent .ca-range > div { flex:1; min-width:0; }
#comprehensiveContent .ca-range { flex-basis:280px; min-width:250px; }
#comprehensiveContent .ca-range > div { gap:5px; }
#comprehensiveContent .ca-field input, #comprehensiveContent .ca-field select, #comprehensiveContent .ca-multiselect summary { height:32px; border-color:#e1dcd5; color:#423d36; border-radius:5px; }
#comprehensiveContent .ca-field select:disabled { color:#70675b; background:#f6f5f2; opacity:1; }
#comprehensiveContent .ca-multi-options { top:calc(100% + 5px); left:auto; right:0; }
#comprehensiveContent .ca-multi-options input[type="checkbox"] { width:15px; height:15px; flex-shrink:0; }
#comprehensiveContent .ca-result-toolbar { gap:12px; margin-bottom:12px; }
#comprehensiveContent .ca-result-heading { display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; min-width:0; }
#comprehensiveContent .ca-result-title { display:flex; align-items:center; gap:9px; margin:0; color:#302c27; font-size:18px; font-weight:700; line-height:1.4; }
#comprehensiveContent .ca-result-title::before { content:''; width:4px; height:17px; flex-shrink:0; border-radius:3px; background:#e38b2c; }
#comprehensiveContent .ca-academic-report-title { max-width:min(980px, calc(100vw - 360px)); font-size:17px; letter-spacing:.01em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#comprehensiveContent .ca-academic-report { width:100%; }
#comprehensiveContent .ca-academic-report-heading { margin:0 0 12px; padding:9px 12px; border:1px solid #dedede; background:#fff; color:#222; text-align:center; font-size:16px; font-weight:700; line-height:1.5; }
#comprehensiveContent .ca-academic-report .ca-academic-section { margin:0 0 18px; padding:16px 0 0; border-top:1px solid #eee5da; }
#comprehensiveContent .ca-academic-report .ca-academic-section:first-child { padding-top:0; border-top:0; }
#comprehensiveContent .ca-academic-report .ca-academic-section h3 { margin:0 0 10px; color:#4c4035; font-size:16px; line-height:1.5; }
#comprehensiveContent .ca-academic-report .ca-academic-section .ca-table-scroll { border-radius:8px; }
#comprehensiveContent .ca-quality-subject-tabs { display:grid; grid-template-columns:repeat(9, minmax(0, 1fr)); gap:4px; margin:0 0 6px; padding:5px; border:1px solid #e7ddd0; border-radius:10px; background:#fbf7f1; box-shadow:0 2px 7px rgba(123,88,48,.06); }
#comprehensiveContent .ca-quality-subject-tabs button { min-width:0; height:32px; padding:0 8px; border:0; border-radius:7px; background:transparent; color:#746557; font-size:12px; cursor:pointer; transition:background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease; }
#comprehensiveContent .ca-quality-subject-tabs button:hover { color:#ad631d; background:#fff0dc; transform:translateY(-1px); }
#comprehensiveContent .ca-quality-subject-tabs button.active { background:linear-gradient(135deg,#e59b43,#c87525); color:#fff; font-weight:700; box-shadow:0 3px 8px rgba(193,111,34,.25); }
#comprehensiveContent .ca-quality-radar { position:relative; min-height:350px; border:1px solid #dedede; background:#fff; overflow:hidden; }
#comprehensiveContent .ca-quality-radar-legend { display:flex; justify-content:center; flex-wrap:wrap; gap:8px 18px; padding:12px 12px 0; color:#555; font-size:11px; }
#comprehensiveContent .ca-quality-radar-legend span { display:inline-flex; align-items:center; gap:5px; white-space:nowrap; }
#comprehensiveContent .ca-quality-radar-legend i { display:inline-block; width:12px; height:12px; border-radius:3px; }
#comprehensiveContent .ca-quality-radar svg { display:block; width:100%; height:335px; }
#comprehensiveContent .ca-quality-radar-ring { fill:none; stroke:#a7d171; stroke-width:1.25; opacity:.72; }
#comprehensiveContent .ca-quality-radar-axis { stroke:#c8c8c8; stroke-width:1; }
#comprehensiveContent .ca-quality-radar-label { fill:#333; font-family:inherit; font-size:12px; }
#comprehensiveContent .ca-quality-radar-series { stroke-linejoin:round; }
#comprehensiveContent .ca-quality-radar-node { cursor:pointer; outline:none; transition:r .12s ease, stroke-width .12s ease; }
#comprehensiveContent .ca-quality-radar-node:hover, #comprehensiveContent .ca-quality-radar-node:focus { r:6; stroke:#fff; stroke-width:2; }
#comprehensiveContent .ca-quality-radar-tooltip { position:absolute; z-index:5; width:206px; padding:10px 12px; border-radius:6px; background:rgba(54,54,54,.94); box-shadow:0 8px 22px rgba(0,0,0,.22); color:#fff; pointer-events:none; font-size:12px; line-height:1.55; }
#comprehensiveContent .ca-quality-radar-tooltip[hidden] { display:none; }
#comprehensiveContent .ca-quality-radar-tooltip strong { display:block; margin-bottom:4px; font-size:14px; font-weight:700; }
#comprehensiveContent .ca-quality-radar-tooltip span { display:flex; align-items:center; gap:7px; min-height:22px; white-space:nowrap; }
#comprehensiveContent .ca-quality-radar-tooltip span i { width:6px; height:6px; border-radius:50%; background:#65b6cd; flex:none; }
#comprehensiveContent .ca-quality-radar-tooltip span b { margin-left:auto; font-size:13px; font-weight:700; }
/* Attach the findings to their chart as a restrained report footer. */
#comprehensiveContent .ca-quality-radar:has(+ .ca-quality-conclusion) { border-bottom:0; }
#comprehensiveContent .ca-quality-conclusion { display:grid; grid-template-columns:56px minmax(0,1fr); column-gap:24px; margin:0; padding:20px 24px; border:1px solid #dedede; border-top:1px solid #eceae7; border-radius:0 0 8px 8px; background:#faf9f7; color:#514c46; font-size:13px; line-height:1.8; }
#comprehensiveContent .ca-quality-conclusion-head { padding-top:1px; color:#34312d; font-size:14px; }
#comprehensiveContent .ca-quality-conclusion-head strong { font-weight:600; }
#comprehensiveContent .ca-quality-conclusion-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; }
#comprehensiveContent .ca-quality-conclusion-item { display:grid; grid-template-columns:6em minmax(0,1fr); align-items:baseline; gap:16px; min-width:0; }
#comprehensiveContent .ca-quality-conclusion-label { color:#766e64; font-weight:500; white-space:nowrap; }
#comprehensiveContent .ca-quality-conclusion-item > span:last-child { overflow-wrap:anywhere; }
#comprehensiveContent .ca-quality-conclusion-names { display:flex; flex-wrap:wrap; gap:2px 16px; min-height:1.8em; }
#comprehensiveContent .ca-quality-strength, #comprehensiveContent .ca-quality-weakness { color:#514c46; }
@media (max-width:760px) {
    #comprehensiveContent .ca-quality-subject-tabs { display:flex; overflow-x:auto; scrollbar-width:thin; }
    #comprehensiveContent .ca-quality-subject-tabs button { min-width:68px; flex:0 0 auto; }
    #comprehensiveContent .ca-quality-conclusion { grid-template-columns:1fr; gap:10px; padding:16px; }
    #comprehensiveContent .ca-quality-conclusion-item { gap:10px; }
}
#comprehensiveContent .ca-access-scope { margin:0; color:#92877b; font-size:12px; }
#comprehensiveContent .ca-result-toolbar .ca-exports { margin-left:auto; }
#comprehensiveContent .ca-chart-section { margin-top:24px; padding-top:18px; border-color:#e9e4de; }
#comprehensiveContent .ca-chart-section-head { gap:12px; margin-bottom:12px; }
#comprehensiveContent .ca-chart-section-head h3 { font-size:18px; color:#302c27; font-weight:700; }
@media(max-width:760px) {
    #comprehensiveAnalysis .comprehensive-toolbar { grid-template-columns:minmax(0,1fr); gap:8px; }
    #analysisModeSwitch { justify-self:end; }
    #comprehensiveContent .ca-subnav { gap:8px; padding:8px; }
    #comprehensiveContent .ca-filters { margin:0 8px 8px; padding:8px; }
    #comprehensiveContent .ca-result-heading { flex-basis:100%; }
    #comprehensiveContent .ca-result-toolbar .ca-exports { margin-left:auto; }
    #comprehensiveContent .ca-result-toolbar { gap:8px; }
    #comprehensiveContent .ca-academic-report-title { max-width:calc(100vw - 48px); font-size:15px; white-space:normal; }
}
@media(max-width:480px) {
    #comprehensiveContent .ca-result-toolbar > .ca-view-switch { flex:1; }
    #comprehensiveContent .ca-result-toolbar > .ca-view-switch .ca-button { flex:1; }
}

:is(#comprehensiveTabs .report-tab, #reportTabs .report-tab, #homeView .collection-view-switch button):focus-visible, #comprehensiveContent .ca-subtab:focus-visible { outline-offset:-3px; }

/* Compact content navigation shared by collection and knowledge analysis. */
#homeView > .toolbar { grid-template-columns:minmax(0,1fr); }
#homeView > .toolbar > .filters { min-width:0; }
#reportView > .report-tabs > .report-actions { min-width:0; padding:0; border:0; border-radius:0; background:transparent; }
#reportView .knowledge-scope-trigger { min-height:38px; }
@media(max-width:1100px) {
    #reportView > .report-tabs { grid-template-columns:minmax(0,1fr); gap:8px; }
    #reportView > .report-tabs > .report-actions { justify-self:end; }
}
@media(max-width:680px) {
    #reportView > .report-tabs > .report-actions { width:100%; }
}

@media(max-width:680px) {
    #comprehensiveContent .ca-field { flex-direction:column; align-items:stretch; flex-basis:calc(50% - 8px); min-width:100px; gap:4px; }
    #comprehensiveContent .ca-field > input, #comprehensiveContent .ca-field > select, #comprehensiveContent .ca-multiselect { flex:none; width:100%; }
    #comprehensiveContent .ca-range, #comprehensiveContent .ca-multifield { flex-basis:100%; }
    #comprehensiveContent .ca-multi-options { left:0; right:0; min-width:0; }
    #comprehensiveContent .ca-query-panel .ca-multifield { align-items:stretch; }
    #comprehensiveContent .ca-query-panel .ca-multifield > span { padding-top:0; }
}

/* Text actions are identifiable before hovering; ordinary values stay plain. */
table td :is(.ca-link, .ca-reference-entity, .view-link, a[href]) {
    color: #a05d17; text-decoration: underline; text-decoration-color: #d5b28a;
    text-underline-offset: 4px; cursor: pointer; border-radius: 4px;
}
table td :is(.ca-link, .ca-reference-entity, .view-link, a[href]):hover {
    color: #884b0e; background: #fff0d9; text-decoration-color: currentColor;
}
table td :is(button, a[href]):focus-visible { outline: 2px solid #d7944c; outline-offset: 3px; }

/* Detached headers escape the table's horizontal overflow and sit below both navigation rows. */
#comprehensiveContent .ca-sticky-table-head { position:fixed; z-index:12; overflow:hidden; background:#faf6e9; box-shadow:0 4px 10px #51432a18; }
#comprehensiveContent .ca-sticky-table-head[hidden] { display:none; }
#comprehensiveContent .ca-sticky-table-head .ca-table { margin:0; }
@media print { #comprehensiveContent .ca-sticky-table-head { display:none !important; } }

#comprehensiveContent .ca-table thead tr:not(:first-child) th:first-child:not([data-ca-first-column]) { position:static; }

#comprehensiveContent .ca-school-combobox { flex:none; width:var(--filter-control-width); min-width:0; }
#comprehensiveContent .ca-field:has(.ca-school-combobox) { align-items:flex-start; }
#comprehensiveContent .ca-field:has(.ca-school-combobox) > span { padding-top:8px; }
#comprehensiveContent .ca-school-trigger { box-sizing:border-box; display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; min-height:32px; padding:6px 9px; border:1px solid #e6ddd2; border-radius:6px; background:#fff; color:#625749; font:inherit; font-size:12px; text-align:left; cursor:pointer; transition:border-color .2s, box-shadow .2s; }
#comprehensiveContent .ca-school-trigger:hover { border-color:#d6b58b; }
#comprehensiveContent .ca-school-trigger:focus-visible, #comprehensiveContent .ca-school-trigger[aria-expanded="true"] { outline:0; border-color:#dcaa6c; box-shadow:0 0 0 2px #edb8791a; }
#comprehensiveContent .ca-school-value { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
#comprehensiveContent .ca-school-arrow { display:flex; flex:none; align-items:center; color:#938574; }
#comprehensiveContent .ca-school-arrow svg { transition:transform .2s ease; }
#comprehensiveContent .ca-school-trigger[aria-expanded="true"] .ca-school-arrow svg { transform:rotate(180deg); }
#comprehensiveContent .ca-school-options { position:fixed; inset:auto; z-index:100; box-sizing:border-box; display:flex; flex-direction:column; max-height:250px; overflow:hidden; margin:0; padding:0; border:1px solid #e8dfd4; border-radius:9px; background:#fff; box-shadow:0 8px 24px #49341c1c, 0 2px 6px #49341c0a; }
#comprehensiveContent .ca-school-options[hidden], #comprehensiveContent .ca-field > [hidden] { display:none; }
#comprehensiveContent .ca-school-searchbar { position:relative; flex:none; padding:8px; border-bottom:1px solid #f0ece6; background:#fff; }
#comprehensiveContent .ca-school-searchbar > svg { position:absolute; top:18px; left:17px; color:#a2978a; pointer-events:none; }
#comprehensiveContent .ca-school-searchbar .ca-school-search { box-sizing:border-box; display:block; width:100%; min-width:0; height:34px; padding:6px 9px 6px 29px; border:1px solid #ebe5dc; border-radius:6px; background:#faf9f7; color:#514a41; font:inherit; font-size:12px; outline:0; }
#comprehensiveContent .ca-school-searchbar .ca-school-search:focus { border-color:#dcaa6c; background:#fff; box-shadow:0 0 0 2px #edb87912; }
#comprehensiveContent .ca-school-search::placeholder { color:#a1988c; }
#comprehensiveContent .ca-school-list { min-height:0; overflow:auto; overscroll-behavior:contain; padding:4px; }
#comprehensiveContent .ca-school-list button { display:block; width:100%; padding:7px 8px; border:0; border-radius:5px; text-align:left; background:transparent; color:#625749; font:inherit; font-size:12px; cursor:pointer; }
#comprehensiveContent .ca-school-list button:is(:hover,.is-focused) { background:#fff7eb; }
#comprehensiveContent .ca-school-list button[aria-selected="true"] { background:#fff0da; color:#a65c20; }
#comprehensiveContent .ca-school-list[aria-multiselectable] button[aria-selected="true"]::before { content:'✓ '; }
#comprehensiveContent .ca-school-list button:disabled { opacity:.5; cursor:default; }
#comprehensiveContent .ca-school-empty { margin:0; padding:12px 8px; color:#9b9186; font-size:12px; }
#comprehensiveContent .ca-school-trigger:disabled { color:#70675b; background:#f6f5f2; cursor:default; box-shadow:none; border-color:#e6ddd2; }
@media(max-width:680px) {
    #comprehensiveContent .ca-school-combobox { width:100%; }
    #comprehensiveContent .ca-field:has(.ca-school-combobox) { align-items:stretch; }
    #comprehensiveContent .ca-field:has(.ca-school-combobox) > span { padding-top:0; }
}
@media(prefers-reduced-motion:reduce) { #comprehensiveContent .ca-school-arrow svg { transition:none; } }

/* 学科统计报告：图表与参考系统的表格分节保持同一数据口径。图表使用
   独立卡片承载，横向滚动只发生在 SVG 内部，不撑开报告页面。 */
.ca-subject-charts { display: block; width: 100%; }
.ca-subject-chart-intro { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 11px 14px; border: 1px solid #f0e3d4; border-radius: 9px; background: #fffbf5; color: #8b7764; font-size: 12px; }
.ca-subject-chart-intro strong { color: #a95719; font-size: 14px; }
.ca-subject-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.ca-subject-chart-card { min-width: 0; overflow: hidden; padding: 16px 14px 12px; border: 1px solid #eee4d9; border-radius: 10px; background: #fff; box-shadow: 0 3px 14px rgba(103, 70, 35, .06); }
.ca-subject-chart-card h4 { margin: 0 0 9px; color: #59483a; font-size: 14px; font-weight: 700; }
.ca-subject-chart-card svg { display: block; width: 100%; height: auto; min-height: 160px; overflow: visible; }
.ca-subject-chart-card:has(.ca-subject-line), .ca-subject-chart-card:has(.ca-subject-distribution) { grid-column: 1 / -1; }
.ca-subject-bars, .ca-subject-stacked { max-height: 390px; }
.ca-subject-bar-label, .ca-subject-bar-value, .ca-subject-x-label, .ca-subject-y-label { fill: #776758; font-family: inherit; font-size: 11px; }
.ca-subject-bar-value { fill: #5a493b; font-weight: 650; }
.ca-subject-bar-track { fill: #f7eee4; }
.ca-subject-line { min-height: 330px; }
.ca-subject-grid { stroke: #eee8e1; stroke-width: 1; }
.ca-subject-axis { stroke: #bdb1a3; stroke-width: 1; }
.ca-subject-series polyline { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.ca-subject-legend { display: flex; flex-wrap: wrap; gap: 7px 14px; margin: -2px 0 8px; color: #7c6e61; font-size: 11px; }
.ca-subject-legend span, .ca-subject-chart-note span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ca-subject-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.ca-subject-distribution-bar { fill: #d98538; opacity: .82; }
.ca-subject-reference-line { fill: none; stroke: #4f8c99; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.ca-subject-chart-note { display: flex; gap: 16px; margin-top: 3px; color: #847568; font-size: 11px; }
.ca-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.ca-dot-bar { background: #d98538; }
.ca-dot-line { background: #4f8c99; }
.ca-academic-charts { width: 100%; }
.ca-academic-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.ca-academic-chart-grid .ca-subject-chart-card { min-width: 0; }
@media (max-width: 900px) { .ca-academic-chart-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .ca-subject-chart-grid { grid-template-columns: 1fr; } .ca-subject-chart-card:has(.ca-subject-line), .ca-subject-chart-card:has(.ca-subject-distribution) { grid-column: auto; } }
@media (max-width: 600px) { .ca-subject-chart-intro { align-items: flex-start; flex-direction: column; gap: 4px; } .ca-subject-chart-card { padding: 12px 8px 9px; } }

/* Keep exam names readable within the compact filter popover. */
#comprehensiveContent .ca-field[data-field-label="考试"] { --filter-control-width: min(320px, calc(100vw - 132px)); }

/* Compact native filter menus; school/exam selectors keep their own styling. */
#comprehensiveContent .ca-query-panel .ca-field:not([data-field-label="学校"]):not([data-field-label="考试"]) > select {
    appearance:none;
    box-sizing:border-box;
    padding:6px 29px 6px 10px;
    border:1px solid #e5dfd6;
    border-radius:7px;
    background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23958b7c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;
    color:#5e5549;
    font-size:12px;
    line-height:18px;
    cursor:pointer;
    transition:border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
#comprehensiveContent .ca-query-panel .ca-field:not([data-field-label="学校"]):not([data-field-label="考试"]) > select:hover:not(:disabled) {
    border-color:#d7bc99;
    background-color:#fffdf9;
}
#comprehensiveContent .ca-query-panel .ca-field:not([data-field-label="学校"]):not([data-field-label="考试"]) > select:is(:focus-visible,:open) {
    outline:0;
    border-color:#d6a76d;
    box-shadow:0 0 0 3px #e9bd811a;
}
#comprehensiveContent .ca-query-panel .ca-field:not([data-field-label="学校"]):not([data-field-label="考试"]) > select:disabled {
    color:#a39a8e;
    background-color:#f6f4f0;
    border-color:#ebe6de;
    cursor:default;
    box-shadow:none;
}
@supports (appearance:base-select) {
    #comprehensiveContent .ca-query-panel .ca-field:not([data-field-label="学校"]):not([data-field-label="考试"]) > select,
    #comprehensiveContent .ca-query-panel .ca-field:not([data-field-label="学校"]):not([data-field-label="考试"]) > select::picker(select) {
        appearance:base-select;
    }
    #comprehensiveContent .ca-query-panel .ca-field:not([data-field-label="学校"]):not([data-field-label="考试"]) > select {
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:8px;
        padding-right:9px;
        background-image:none;
    }
    #comprehensiveContent .ca-query-panel .ca-field:not([data-field-label="学校"]):not([data-field-label="考试"]) > select::picker-icon {
        content:"";
        display:block;
        width:14px;
        height:14px;
        padding:0;
        border:0;
        rotate:none;
        flex:none;
        color:transparent;
        background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23958b7c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/14px no-repeat;
        transition:transform .18s ease;
    }
    #comprehensiveContent .ca-query-panel .ca-field:not([data-field-label="学校"]):not([data-field-label="考试"]) > select:open::picker-icon {
        transform:rotate(180deg);
    }
    #comprehensiveContent .ca-query-panel .ca-field:not([data-field-label="学校"]):not([data-field-label="考试"]) > select::picker(select) {
        box-sizing:border-box;
        min-width:anchor-size(width);
        max-height:240px;
        overflow:auto;
        overscroll-behavior:contain;
        margin-block:5px;
        padding:5px;
        border:1px solid #e9e2d7;
        border-radius:9px;
        background:#fff;
        box-shadow:0 8px 24px #49341c1c, 0 2px 6px #49341c08;
        scrollbar-width:thin;
        scrollbar-color:#d8d0c5 transparent;
    }
    #comprehensiveContent .ca-query-panel .ca-field:not([data-field-label="学校"]):not([data-field-label="考试"]) > select option {
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:12px;
        min-height:32px;
        padding:6px 9px;
        border:0;
        border-radius:5px;
        background:#fff;
        color:#665c4e;
        font-size:12px;
        line-height:20px;
        cursor:pointer;
    }
    #comprehensiveContent .ca-query-panel .ca-field:not([data-field-label="学校"]):not([data-field-label="考试"]) > select option:is(:hover,:focus) {
        outline:0;
        background:#faf5ec;
    }
    #comprehensiveContent .ca-query-panel .ca-field:not([data-field-label="学校"]):not([data-field-label="考试"]) > select option:checked {
        background:#fff1dd;
        color:#a65c20;
        font-weight:600;
    }
    #comprehensiveContent .ca-query-panel .ca-field:not([data-field-label="学校"]):not([data-field-label="考试"]) > select option::checkmark {
        order:1;
        margin-inline-start:auto;
        color:#c47e30;
    }
    #comprehensiveContent .ca-query-panel .ca-field:not([data-field-label="学校"]):not([data-field-label="考试"]) > select option:disabled {
        color:#b5aca0;
        cursor:default;
    }
}
@media(prefers-reduced-motion:reduce) {
    #comprehensiveContent .ca-query-panel .ca-field > select,
    #comprehensiveContent .ca-query-panel .ca-field > select::picker-icon { transition:none; }
}

/* Full academic-year labels stay on a single line. */
#comprehensiveContent .ca-query-panel .ca-field[data-field-label="学期"] { --filter-control-width:230px; }
#comprehensiveContent .ca-query-panel .ca-field[data-field-label="学期"] > select,
#comprehensiveContent .ca-query-panel .ca-field[data-field-label="学期"] > select option { white-space:nowrap; }
#comprehensiveContent .ca-query-panel .ca-field[data-field-label="学期"] > select::picker(select) { min-width:230px; }
@media(max-width:680px) {
    #comprehensiveContent .ca-query-panel .ca-field[data-field-label="学期"] { flex-basis:100%; }
}
