.stats-main { max-width: 1280px; padding: 0 44px 44px; margin: 0 auto; }
.stats-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; min-height: 280px; padding: 45px 52px 42px; border-radius: var(--radius-lg); color: #fff; background: radial-gradient(circle at 84% 16%, rgba(98, 133, 255, .3), transparent 29%), linear-gradient(122deg, #101a2b 0%, #172a49 64%, #1c355d 100%); position: relative; overflow: hidden; }
.stats-hero::after { content: ""; width: 440px; height: 440px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; position: absolute; inset: -265px -130px auto auto; pointer-events: none; }
.stats-hero > * { position: relative; z-index: 1; }
.stats-hero .eyebrow { color: #aebfff; }
.stats-hero h1 { margin: 0; font-size: clamp(35px, 4vw, 57px); line-height: .98; letter-spacing: -.065em; }
.stats-hero h1 em { color: #a9baff; font-style: normal; }
.stats-hero p:not(.eyebrow) { max-width: 620px; color: #c3ccdc; line-height: 1.7; font-size: 13px; margin: 19px 0 0; }
.stats-hero-action { flex: 0 0 auto; text-decoration: none; }
.reference-disclaimer { display: flex; align-items: flex-start; gap: 11px; margin: 19px 0 0; padding: 13px 15px; border: 1px solid #dfe5f2; border-radius: 12px; background: #fbfcff; }
.disclaimer-icon { display: grid; place-items: center; width: 19px; height: 19px; flex: 0 0 19px; border-radius: 50%; color: var(--blue); background: var(--blue-soft); font-size: 12px; font-weight: 900; }
.reference-disclaimer p { color: #69758a; font-size: 11px; line-height: 1.6; margin: 0; }
.reference-disclaimer strong { color: var(--ink); }
.stats-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 20px; }
.stats-card { min-height: 125px; display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: 0 3px 14px rgba(31,45,74,.025); border-top: 3px solid #d7deec; }
.stats-card.accent-blue { border-top-color: var(--blue); }
.stats-card.accent-orange { border-top-color: var(--orange); }
.stats-card.accent-mint { border-top-color: #45ba87; }
.stats-card span { color: var(--muted); font-size: 11px; font-weight: 750; }
.stats-card strong { color: var(--ink); font-size: 34px; line-height: 1; letter-spacing: -.06em; }
.stats-card small { color: #9aa4b4; font-size: 10px; }
.stats-section { margin-top: 37px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.section-head .eyebrow { margin-bottom: 7px; }
.section-head h2 { margin: 0; font-size: 25px; letter-spacing: -.05em; }
.section-head > p, .section-head-stack p:not(.eyebrow) { color: var(--muted); font-size: 11px; margin: 7px 0 0; }
.section-kicker { color: var(--blue); font-size: 11px; font-weight: 800; padding-bottom: 3px; }
.unit-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.unit-stat { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.unit-stat-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.unit-stat-number { color: var(--blue); font-size: 10px; font-weight: 900; }
.unit-stat h3 { font-size: 12px; line-height: 1.35; margin: 0; }
.unit-stat-count { color: var(--ink); font-size: 18px; font-weight: 850; white-space: nowrap; }
.unit-stat-label { color: var(--muted); font-size: 9px; }
.unit-stat-bar { height: 5px; overflow: hidden; border-radius: 99px; background: #eef1f6; margin-top: 13px; }
.unit-stat-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #315efb, #87a1ff); }
.unit-stat-meta { display: flex; justify-content: space-between; gap: 8px; color: #8994a7; font-size: 9px; margin-top: 8px; }
.section-head-stack { align-items: flex-end; }
.reference-tools { display: flex; align-items: flex-end; flex-direction: column; gap: 10px; }
.stats-search { display: flex; align-items: center; gap: 7px; width: min(260px, 100%); height: 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 0 10px; }
.stats-search span { color: var(--blue); font-size: 19px; line-height: 1; }
.stats-search input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 11px; }
.stats-search input::placeholder { color: #9aa4b4; }
.reference-tabs { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.reference-tab { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; color: var(--muted); background: var(--surface); font-size: 10px; font-weight: 800; }
.reference-tab:hover, .reference-tab.is-active { border-color: #b8c6ff; color: var(--blue); background: var(--blue-soft); }
.table-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.reference-table { width: 100%; border-collapse: collapse; text-align: right; }
.reference-table th { color: #8994a7; background: #f7f8fb; font-size: 10px; font-weight: 850; padding: 12px 15px; }
.reference-table td { color: #556176; border-top: 1px solid #eef0f4; font-size: 11px; padding: 12px 15px; vertical-align: middle; }
.reference-table tr:hover td { background: #fbfcff; }
.reference-table td:first-child { color: var(--ink); font-weight: 850; }
.reference-type { display: inline-flex; border-radius: 99px; padding: 4px 7px; color: var(--blue); background: var(--blue-soft); font-size: 9px; font-weight: 800; white-space: nowrap; }
.reference-type.book-question { color: #9a641d; background: #fff3df; }
.reference-type.course-material { color: var(--mint-ink); background: var(--mint); }
.usage-count { color: var(--ink); font-size: 16px; font-weight: 900; }
.example-links { display: flex; flex-wrap: wrap; gap: 4px; }
.example-link { color: var(--blue); font-size: 9px; text-decoration: none; }
.example-link:hover { text-decoration: underline; }
.table-empty { color: var(--muted); text-align: center; padding: 32px 16px; font-size: 11px; }
.split-section { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 13px; }
.insight-panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 19px; background: var(--surface); }
.ranking-list { display: grid; gap: 10px; }
.ranking-row { display: grid; grid-template-columns: 23px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.ranking-index { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 7px; color: var(--blue); background: var(--blue-soft); font-size: 10px; font-weight: 900; }
.ranking-label { min-width: 0; color: var(--ink); font-size: 11px; font-weight: 800; }
.ranking-label small { display: block; overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; }
.ranking-usage { color: var(--blue); font-size: 12px; font-weight: 900; white-space: nowrap; }
.warning-panel { background: #fffdf9; border-color: #f3e4ca; }
.warning-panel .eyebrow { color: #ae7423; }
.warning-count { color: #9a641d; background: #fff1d7; border-radius: 99px; padding: 5px 9px; font-size: 11px; font-weight: 900; }
.panel-note { color: var(--muted); font-size: 10px; line-height: 1.6; margin: -4px 0 14px; }
.missing-list { display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.missing-item { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid #f1eadf; padding: 6px 0; }
.missing-item strong { color: var(--ink); font-size: 10px; }
.missing-item span { color: #9a8a72; font-size: 9px; text-align: left; }
.stats-error { padding: 50px 20px; color: var(--muted); text-align: center; }
@media (max-width: 960px) {
  .stats-main { padding-left: 24px; padding-right: 24px; }
  .stats-cards { grid-template-columns: repeat(2, 1fr); }
  .unit-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .section-head-stack { align-items: flex-start; flex-direction: column; }
  .reference-tools { width: 100%; align-items: stretch; }
  .stats-search { width: 100%; }
  .reference-tabs { justify-content: flex-start; }
}
@media (max-width: 680px) {
  .stats-main { padding-left: 16px; padding-right: 16px; }
  .stats-hero { display: block; min-height: 0; padding: 34px 25px 27px; }
  .stats-hero h1 { font-size: 37px; }
  .stats-hero-action { display: inline-flex; margin-top: 25px; }
  .unit-stats-grid, .split-section { grid-template-columns: 1fr; }
  .reference-table th:nth-child(2), .reference-table td:nth-child(2), .reference-table th:nth-child(5), .reference-table td:nth-child(5) { display: none; }
  .reference-table th, .reference-table td { padding: 11px 9px; }
  .reference-table th:nth-child(4), .reference-table td:nth-child(4) { text-align: left; }
}
@media (max-width: 430px) {
  .stats-cards { gap: 8px; }
  .stats-card { min-height: 110px; padding: 13px; }
  .stats-card strong { font-size: 27px; }
  .stats-card span { font-size: 10px; }
  .topbar-nav { margin-inline-end: 0; }
  .topbar-link { padding-inline: 7px; }
}
.stats-reference-button { display: grid; gap: 4px; width: 100%; border: 0; padding: 0; color: inherit; background: transparent; text-align: right; cursor: pointer; }
.stats-reference-button:hover strong, .stats-reference-button:focus-visible strong { color: var(--blue); }
.stats-reference-button:focus-visible { outline: 2px solid #aabcfb; outline-offset: 3px; border-radius: 4px; }
.stats-reference-button strong { color: var(--ink); font-size: 11px; }
.stats-reference-button small { color: var(--blue); font-size: 9px; font-weight: 750; line-height: 1.35; }
.ranking-reference-button { appearance: none; border: 0; padding: 0; background: transparent; text-align: right; cursor: pointer; }
.ranking-reference-button:hover, .ranking-reference-button:focus-visible { color: var(--blue); outline: none; }
