.pbx-leaderboard {
  --ranking-ink: #303641;
  --ranking-green: #28674f;
  --ranking-line: #dfe5e1;
  margin: 26px 0;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--ranking-line);
  border-radius: 8px;
  background: #fff;
}
.pbx-leaderboard *, .pbx-leaderboard *::before, .pbx-leaderboard *::after { box-sizing: border-box; }
.pbx-leaderboard button { font: inherit; cursor: pointer; }
.pbx-leaderboard :is(button, summary, [tabindex]):focus-visible { outline: 2px solid #397d69; outline-offset: 3px; }
.pbx-ranking-card-head, .pbx-difficulty-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.markdown .pbx-ranking-card-head h3, .markdown .pbx-difficulty-heading h3 { margin: 0; color: #243b32; font-size: 18px; line-height: 1.4; }
.markdown .pbx-ranking-card-head p, .markdown .pbx-difficulty-heading p { max-width: 570px; margin: 5px 0 0; color: #718078; font-size: 11px; line-height: 1.6; }
.pbx-ranking-card-head > span, .pbx-difficulty-heading > span { flex-shrink: 0; padding: 5px 9px; border: 1px solid var(--ranking-line); border-radius: 999px; color: #64766b; font-size: 10px; white-space: nowrap; }
.pbx-leaderboard-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 210px)); gap: 3px; margin-top: 17px; border-bottom: 1px solid var(--ranking-line); }
.pbx-leaderboard-tabs button { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 1px 7px; align-items: center; padding: 9px 11px 10px; border: 0; border-bottom: 2px solid transparent; border-radius: 5px 5px 0 0; background: transparent; color: #718078; text-align: left; }
.pbx-leaderboard-tabs button > span { grid-row: 1 / 3; color: #9aa39d; font: 9px/1 'Space Mono', monospace; }
.pbx-leaderboard-tabs button > strong { color: #4b5e53; font-size: 12px; line-height: 1.3; font-weight: 600; }
.pbx-leaderboard-tabs button > small { color: #859087; font-size: 9px; line-height: 1.3; }
.pbx-leaderboard-tabs button[aria-selected="true"] { border-bottom-color: #315f49; background: #f2f6f3; }
.pbx-leaderboard-tabs button[aria-selected="true"] > span, .pbx-leaderboard-tabs button[aria-selected="true"] > strong { color: #294b3a; }
[id^="pbx-leaderboard-panel-"][hidden] { display: none; }

.markdown .pbx-paper-ranking { margin: 12px 0 0; }
.pbx-chart-legend { display: flex; min-height: 30px; align-items: center; justify-content: flex-end; gap: 18px; color: #59616b; font: 11px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.pbx-chart-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.pbx-chart-legend i { display: inline-flex; align-items: center; justify-content: center; font-style: normal; }
.pbx-legend-full { width: 14px; height: 18px; border: 1px solid #353c46; background: #ce694f; }
.pbx-legend-partial { min-width: 34px; height: 20px; padding: 0 4px; border: 1px solid #9298a1; background: #fafafa; color: #69717d; font-size: 9px; }
.pbx-paper-ranking-scroll { width: 100%; overflow-x: auto; overflow-y: hidden; padding: 0 0 5px; scrollbar-color: #aebfb4 #f4f7f5; scrollbar-width: thin; }
.pbx-paper-chart { display: grid; grid-template-columns: 28px 48px minmax(780px, 1fr); width: 100%; min-width: 856px; }
.pbx-chart-y-title { display: flex; height: 330px; align-items: center; justify-content: center; color: #414854; font: 12px/1 serif; writing-mode: vertical-rl; transform: rotate(180deg); }
.pbx-chart-axis { position: relative; height: 330px; border-right: 1px solid #cbd0d8; color: #727b87; font: 11px/1 serif; font-variant-numeric: tabular-nums; }
.pbx-chart-axis span { position: absolute; right: 9px; transform: translateY(50%); }
.pbx-chart-axis span:nth-child(1) { bottom: 288px; }
.pbx-chart-axis span:nth-child(2) { bottom: 214px; }
.pbx-chart-axis span:nth-child(3) { bottom: 141px; }
.pbx-chart-axis span:nth-child(4) { bottom: 68px; }
.pbx-chart-plot { position: relative; height: 330px; border-bottom: 0; }
.pbx-chart-gridline { position: absolute; z-index: 0; right: 0; left: 0; height: 1px; background-image: linear-gradient(to right, #dfe3e8 55%, transparent 55%); background-size: 7px 1px; pointer-events: none; }
.pbx-chart-gridline:nth-child(1) { bottom: 288px; }
.pbx-chart-gridline:nth-child(2) { bottom: 214px; }
.pbx-chart-gridline:nth-child(3) { bottom: 141px; }
.pbx-chart-gridline:nth-child(4) { bottom: 68px; height: 1px; background: #cbd0d8; }
.pbx-chart-columns { position: absolute; z-index: 1; inset: 0; display: grid; grid-template-columns: repeat(10, minmax(74px, 1fr)); }
.pbx-model-column { position: relative; min-width: 0; height: 330px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ranking-ink); transition: background-color .14s ease; }
.pbx-model-column:hover, .pbx-model-column:focus, .pbx-model-column.is-active { background: rgba(40, 103, 79, .045); }
.pbx-model-partial { position: absolute; top: 8px; left: 50%; min-width: 48px; padding: 4px 5px; border: 1px solid #9298a1; background: #fafafa; color: #69717d; font: 11px/1.05 Georgia, "Times New Roman", serif; font-variant-numeric: tabular-nums; transform: translateX(-50%); transition: border-color .14s ease, color .14s ease, background-color .14s ease; }
.pbx-model-logo { position: absolute; bottom: calc(68px + var(--full-height) + 35px); left: 50%; width: 27px; height: 27px; margin: 0; border: 0; border-radius: 4px; box-shadow: none; object-fit: contain; transform: translateX(-50%); }
.pbx-model-logo[data-logo="gpt"] { width: 34px; height: 34px; }
.pbx-model-logo[data-logo="kimi"], .pbx-model-logo[data-logo="hy"] { width: 24px; height: 24px; }
.pbx-model-logo[data-logo="glm"] { width: 27px; height: 27px; }
.pbx-model-logo[data-logo="qwen"] { width: 44px; height: 44px; }
.pbx-model-full { position: absolute; bottom: calc(68px + var(--full-height) + 6px); left: 50%; color: #202630; font: 600 11px/1 Georgia, "Times New Roman", serif; font-variant-numeric: tabular-nums; white-space: nowrap; transform: translateX(-50%); }
.pbx-model-bar { position: absolute; right: 13%; bottom: 68px; left: 13%; height: var(--full-height); min-height: 1px; border: 1px solid #353c46; background: var(--model-color); transition: filter .14s ease, box-shadow .14s ease; }
.pbx-model-name { position: absolute; right: 2px; bottom: 4px; left: 2px; height: 28px; color: #303641; font: 10px/1.3 Georgia, "Times New Roman", serif; text-align: center; overflow-wrap: anywhere; }
.pbx-model-column:is(:hover, :focus, .is-active) .pbx-model-bar { filter: saturate(1.2) brightness(.96); box-shadow: 0 0 0 2px rgba(40, 103, 79, .14); }
.pbx-model-column:is(:hover, :focus, .is-active) .pbx-model-partial { border-color: #28674f; background: #f3f7f4; color: #244d3f; }
.pbx-model-column.is-pinned { box-shadow: inset 0 -3px #397d69; }
.markdown .pbx-ranking-readout { min-height: 20px; margin: 7px 0 0 76px; color: #456451; font: 500 10px/1.6 'Space Mono', monospace; }
.markdown .pbx-paper-ranking figcaption { margin: 5px 0 0 76px; color: #77837b; font-size: 10px; line-height: 1.65; }
.pbx-ranking-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; margin-top: 10px; color: #7b877e; font-size: 10px; line-height: 1.7; }
.markdown .pbx-ranking-methods { margin: 10px 0 0; color: #6b786e; font-size: 11px; line-height: 1.8; }
.pbx-ranking-methods > summary { width: fit-content; cursor: pointer; color: #5d7766; }
.markdown .pbx-ranking-methods p { margin: 8px 0; font-size: 11px; line-height: 1.8; }

.pbx-process-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-top: 18px; }
.markdown .pbx-process-head h4 { margin: 0; color: #334d3c; font-size: 14px; line-height: 1.4; }
.markdown .pbx-process-head p { margin: 4px 0 0; color: #7b887e; font-size: 10px; line-height: 1.5; }
.pbx-process-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px 14px; color: #6e7b73; font-size: 9px; }
.pbx-process-legend span { display: inline-flex; align-items: center; gap: 5px; }
.pbx-process-legend i { width: 11px; height: 11px; border: 1px solid rgba(36, 61, 50, .18); }
.pbx-process-legend i[data-stage="modeling"] { background: #4a535e; }
.pbx-process-legend i[data-stage="execution"] { background: #858b92; }
.pbx-process-legend i[data-stage="validation"] { background: #c5c8cb; }
.pbx-process-scroll { width: 100%; overflow-x: auto; overflow-y: hidden; margin-top: 8px; padding-bottom: 5px; scrollbar-color: #aebfb4 #f4f7f5; scrollbar-width: thin; }
.pbx-process-chart-layout { display: grid; grid-template-columns: 28px 48px minmax(780px, 1fr); min-width: 856px; width: 100%; }
.pbx-stage-y-title { display: flex; height: 360px; align-items: center; justify-content: center; color: #414854; font: 12px/1 serif; writing-mode: vertical-rl; transform: rotate(180deg); }
.pbx-stage-axis { position: relative; height: 360px; border-right: 1px solid #cbd0d8; color: #727b87; font: 10px/1 serif; font-variant-numeric: tabular-nums; }
.pbx-stage-axis span { position: absolute; right: 9px; transform: translateY(50%); }
.pbx-stage-axis span:nth-child(1) { bottom: 308px; }
.pbx-stage-axis span:nth-child(2) { bottom: 253px; }
.pbx-stage-axis span:nth-child(3) { bottom: 198px; }
.pbx-stage-axis span:nth-child(4) { bottom: 143px; }
.pbx-stage-axis span:nth-child(5) { bottom: 88px; }
.pbx-stage-plot { position: relative; height: 360px; }
.pbx-stage-gridline { position: absolute; z-index: 0; right: 0; left: 0; height: 1px; background-image: linear-gradient(to right, #dfe3e8 55%, transparent 55%); background-size: 7px 1px; pointer-events: none; }
.pbx-stage-gridline[data-value="100"] { bottom: 308px; }
.pbx-stage-gridline[data-value="75"] { bottom: 253px; }
.pbx-stage-gridline[data-value="50"] { bottom: 198px; }
.pbx-stage-gridline[data-value="25"] { bottom: 143px; }
.pbx-stage-gridline[data-value="0"] { bottom: 88px; background: #cbd0d8; }
.pbx-stage-columns { position: absolute; z-index: 1; inset: 0; display: grid; grid-template-columns: repeat(10, minmax(74px, 1fr)); }
.pbx-stage-model { position: relative; min-width: 0; height: 360px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ranking-ink); transition: background-color .14s ease, box-shadow .14s ease; }
.pbx-stage-model:hover, .pbx-stage-model:focus, .pbx-stage-model.is-active { background: rgba(40, 103, 79, .045); }
.pbx-stage-model.is-pinned { box-shadow: inset 0 -3px #397d69; }
.pbx-stage-partial { position: absolute; top: 6px; left: 50%; min-width: 54px; padding: 3px 5px; border: 1px solid #7f8991; background: #fafafa; color: #4f5962; font: 600 10px/1.05 'Space Mono', monospace; text-align: center; transform: translateX(-50%); }
.pbx-stage-partial small { display: block; margin-top: 2px; color: #89928f; font: 7px/1.1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; text-transform: uppercase; }
.pbx-stage-bars { position: absolute; top: 52px; right: 14%; bottom: 88px; left: 14%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.pbx-stage-bars > i { position: relative; display: block; flex: 1; max-width: 16px; min-height: 1px; border: 1px solid rgba(36, 61, 50, .3); border-bottom: 0; font-style: normal; transition: filter .14s ease, transform .14s ease; }
.pbx-stage-bars > i > em { position: absolute; top: -13px; left: 50%; color: #52625a; font: 7px/1 'Space Mono', monospace; font-style: normal; transform: translateX(-50%); }
.pbx-stage-model:is(:hover, :focus, .is-active) .pbx-stage-bars > i { filter: saturate(1.2) brightness(.95); transform: translateY(-2px); }
.pbx-stage-model:is(:hover, :focus, .is-active) .pbx-stage-partial { border-color: #28674f; background: #f3f7f4; color: #244d3f; }
.pbx-stage-identity { position: absolute; right: 2px; bottom: 29px; left: 2px; display: flex; min-width: 0; height: 53px; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px; }
.pbx-process-logo { width: 18px; height: 18px; margin: 0; border: 0; border-radius: 3px; box-shadow: none; object-fit: contain; }
.pbx-process-logo[data-logo="gpt"] { width: 23px; height: 23px; margin-top: -2px; margin-bottom: -3px; }
.pbx-process-logo[data-logo="kimi"], .pbx-process-logo[data-logo="hy"] { width: 17px; height: 17px; }
.pbx-process-logo[data-logo="glm"] { width: 19px; height: 19px; margin-top: -1px; margin-bottom: -1px; }
.pbx-process-logo[data-logo="qwen"] { width: 31px; height: 31px; margin-top: -7px; margin-bottom: -6px; }
.pbx-stage-identity strong { display: block; width: 100%; height: 23px; color: #303641; font: 9px/1.15 Georgia, "Times New Roman", serif; text-align: center; overflow-wrap: anywhere; }
.pbx-stage-turns { position: absolute; right: 1px; bottom: 7px; left: 1px; color: #718078; font: 8px/1 'Space Mono', monospace; text-align: center; white-space: nowrap; }
.markdown .pbx-process-readout { min-height: 20px; margin: 7px 0 0 76px; color: #456451; font: 500 10px/1.6 'Space Mono', monospace; }
.markdown .pbx-process-note { margin: 5px 0 0 76px; color: #77837b; font-size: 10px; line-height: 1.65; }
.pbx-process-note strong { color: #53685b; font-weight: 600; }

.pbx-difficulty-section { margin-top: 28px; padding-top: 23px; border-top: 1px solid var(--ranking-line); }
.pbx-difficulty-chart { display: grid; gap: 4px; margin-top: 16px; }
.pbx-difficulty-row { display: grid; grid-template-columns: 28px minmax(150px, 210px) minmax(90px, 1fr) 42px; min-height: 30px; align-items: center; gap: 9px; width: 100%; padding: 3px 6px; border: 0; border-radius: 3px; background: transparent; color: #405248; text-align: left; transition: background-color .14s ease; }
.pbx-difficulty-row:hover, .pbx-difficulty-row:focus, .pbx-difficulty-row.is-active { background: #f1f6f2; }
.pbx-difficulty-row.is-pinned { box-shadow: inset 3px 0 #397d69; }
.pbx-difficulty-rank { color: #98a29b; font: 9px/1 'Space Mono', monospace; }
.pbx-difficulty-label { min-width: 0; color: #3b5145; font-size: 11px; line-height: 1.3; overflow-wrap: anywhere; }
.pbx-difficulty-track { position: relative; display: block; height: 11px; overflow: hidden; border-radius: 2px; background: #edf1ee; }
.pbx-difficulty-track::after { position: absolute; inset: 0 auto 0 0; width: var(--difficulty-width); border-radius: inherit; background: linear-gradient(90deg, #dda66c, #bc6254); content: ""; transition: filter .14s ease; }
.pbx-difficulty-row:is(:hover, :focus, .is-active) .pbx-difficulty-track::after { filter: saturate(1.2) brightness(.95); }
.pbx-difficulty-value { color: #815044; font: 600 10px/1 'Space Mono', monospace; text-align: right; }
.markdown .pbx-difficulty-readout { min-height: 18px; margin: 9px 0 0 6px; color: #456451; font: 500 10px/1.6 'Space Mono', monospace; }
.markdown .pbx-difficulty-note { margin: 6px 0 0 6px; color: #718078; font-size: 10px; line-height: 1.7; }
.pbx-difficulty-note strong { color: #53685b; font-weight: 600; }
.pbx-leaderboard:not(.is-ready) :is(.pbx-paper-ranking, .pbx-difficulty-section) { display: none; }

@media (max-width: 700px) {
  .pbx-leaderboard { padding: 16px 12px; }
  .pbx-paper-chart { grid-template-columns: 24px 42px minmax(740px, 1fr); min-width: 806px; }
  .pbx-process-chart-layout { grid-template-columns: 24px 42px minmax(740px, 1fr); min-width: 806px; }
  .pbx-chart-y-title { font-size: 11px; }
  .pbx-stage-y-title { font-size: 11px; }
  .markdown .pbx-ranking-readout, .markdown .pbx-paper-ranking figcaption, .markdown .pbx-process-readout, .markdown .pbx-process-note { margin-left: 4px; }
  .pbx-difficulty-row { grid-template-columns: 24px minmax(104px, 1.3fr) minmax(72px, 1fr) 37px; gap: 6px; padding-right: 2px; padding-left: 2px; }
  .pbx-difficulty-label { font-size: 10px; }
}
@media (max-width: 420px) {
  .pbx-ranking-card-head, .pbx-difficulty-heading { display: block; }
  .pbx-ranking-card-head > span, .pbx-difficulty-heading > span { display: inline-flex; margin-top: 9px; }
  .pbx-chart-legend { justify-content: flex-start; gap: 12px; margin-top: 7px; }
  .pbx-leaderboard-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pbx-leaderboard-tabs button { grid-template-columns: 18px minmax(0, 1fr); padding: 8px 6px 9px; }
  .pbx-leaderboard-tabs button > strong { font-size: 11px; }
  .pbx-process-head { display: block; }
  .pbx-process-legend { justify-content: flex-start; margin-top: 9px; }
  .pbx-difficulty-label { line-height: 1.2; }
}
