/* Only layout accommodation for added metrics; all fonts, colors and tables
   inherit the current official site and its first-cycle stylesheet cascade. */
/* Keep the board background, switch controls and wide scrolling table in one
   stacking context when native routing hides/shows a leaderboard section. */
.leaderboard-page .unified-board-frame { position: relative; z-index: 0; isolation: isolate; }
.leaderboard-page .p0-board-hero:has(.p0-history[open]) { z-index: auto; isolation: auto !important; transform: none !important; animation-fill-mode: none !important; }
html.local-hide-cycle2-promo [data-cycle-two-rankings-banner] { display: none !important; }
.local-cycle2-startup {
  min-height: 190px;
  padding: 48px 16px;
  text-align: center;
  color: var(--theme-ink, #203031);
}
.local-cycle2-startup p {
  margin: 14px 0 0;
  color: var(--theme-muted, #637078);
}
.local-metric-tabs { margin-bottom: 16px; }
.local-metric-tabs .tabs { flex-wrap: wrap; gap: 6px; }
.local-cycle2-table th { white-space: normal !important; }
.local-cycle2-table .col-dataset-score { width: 160px !important; }
.local-cycle2-table .col-version { width: 200px !important; min-width: 200px; }
.local-cycle2-table .leaderboard-head-label { white-space: normal !important; }
/* Allow three-line metric names without changing the official font or widths. */
:is(#public, #multimodel, #coding).leaderboard-page .local-cycle2-table thead th {
  box-sizing: border-box;
  height: 128px !important;
  padding: 24px 12px !important;
  vertical-align: middle !important;
}
:is(#public, #multimodel, #coding).leaderboard-page .local-cycle2-table thead :is(.leaderboard-header-sort, .leaderboard-head-label, .capability-table-name) {
  line-height: 1.4 !important;
  white-space: normal !important;
}
#multimodel .local-cycle2-table .dataset-score-cell { font-family: "MeriendaLeaderboardNumbers", CNNSansDisplayW04-Regular, "CNN Sans Display W04 Regular", Inter, Arial, sans-serif; }
/* Keep short capability names together, with a separate lane for sort arrows. */
:is(#public, #multimodel) .local-cycle2-table .col-dataset-score { width: 184px !important; }
:is(#public, #multimodel) .local-cycle2-table .leaderboard-header-sort { padding: 0 22px 0 6px; }
#multimodel.leaderboard-page .local-cycle2-table thead .capability-table-name { white-space: nowrap !important; }
html[lang="en"] #multimodel.leaderboard-page .local-cycle2-table thead .capability-table-name { white-space: normal !important; }
html[lang="en"] :is(#public, #multimodel, #coding).leaderboard-page .local-cycle2-table thead th { height: 160px !important; }
/* Keep the three-track home preview's multiline headers away from row edges. */
#home .home-preview-table.local-cycle2-table thead th {
  box-sizing: border-box;
  height: 112px !important;
  padding: 20px 7px !important;
  vertical-align: middle !important;
}
/* The native 144% radar zoom clipped the labels at card edges. */
.leaderboard-page .system-grid .capability-radar { width: min(112%, 400px); }
/* Cycle 2 open-source entries reuse the Cycle 1 version pill and scroll cycle. */
:is(#public, #multimodel, #coding) .local-cycle2-table .local-public-meta {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 4px;
  width: 100%; min-width: 0; margin-top: 5px;
}
:is(#public, #multimodel, #coding) .local-cycle2-table .local-public-meta > :is(.leaderboard-version-badge,.local-repository-text,.local-organization-badge,.local-product-text) {
  display: block; box-sizing: border-box; min-width: 0; max-width: 100%; height: 20px;
  padding: 2px 5px; overflow: hidden; border: 1px solid rgb(47 162 65 / 0.18);
  border-radius: 999px; background: rgb(52 160 64 / 0.06); color: #2f6f3c;
  font: 600 11px/1.3 Inter, Arial, "Microsoft YaHei", sans-serif;
  letter-spacing: 0.01em; white-space: nowrap; text-decoration: none;
}
:is(#public, #multimodel, #coding) .local-cycle2-table .local-academic-meta > .leaderboard-version-badge {
  flex: 0 0 32%; color: #5e6f77; border-color: rgb(94 111 119 / 0.18); background: rgb(94 111 119 / 0.08);
}
:is(#public, #multimodel, #coding) .local-cycle2-table .local-academic-meta > .local-repository-text { flex: 1 1 0; width: auto; }
:is(#public, #multimodel, #coding) .local-cycle2-table .local-academic-meta > :only-child { flex: 1 1 0; }
:is(#public, #multimodel, #coding) .local-cycle2-table .local-commercial-meta { flex-direction: column; align-items: stretch; gap: 3px; }
:is(#public, #multimodel, #coding) .local-cycle2-table .local-commercial-meta > .local-organization-badge { flex: none; width: 100%; color: #5e6f77; border-color: rgb(94 111 119 / 0.18); background: rgb(94 111 119 / 0.08); }
:is(#public, #multimodel, #coding) .local-cycle2-table .local-commercial-meta > .local-product-text { flex: none; width: 100%; }
.local-public-meta .leaderboard-meta-scroll-text { display: inline-block; width: max-content; max-width: none; white-space: nowrap; font: inherit; color: inherit; vertical-align: top; }
.local-public-meta .is-meta-overflowing > .leaderboard-meta-scroll-text { animation: leaderboard-meta-cycle var(--meta-scroll-duration,5s) ease-in-out 0.6s infinite; }
.local-commercial-meta .local-organization-viewport { display: block; width: 100%; height: 20px; overflow: hidden; }
.local-public-meta :is(.local-repository-text,.leaderboard-product-link):hover { color: #2fa241; border-color: rgb(47 162 65 / 0.42); background: rgb(52 160 64 / 0.12); }
.local-commercial-meta .is-missing { opacity: .65; }
:is(#public, #multimodel, #coding) .local-cycle2-table .local-public-meta > .local-github-icon {
  display: inline-flex; align-items: center; justify-content: center; align-self: flex-start;
  flex: 0 0 auto; width: 22px; height: 20px; padding: 2px; border-radius: 999px;
}
.local-public-meta .local-github-icon svg { display: block; width: 14px; height: 14px; flex: none; }
/* Commercial identity is a compact editorial stack, not a set of input fields.
   Only real metadata takes space; academic identities retain the native layout. */
:is(#public, #multimodel, #coding) .local-commercial-table tbody > tr > td {
  height: auto !important;
  padding-top: 14px !important;
  padding-bottom: 14px !important;
  vertical-align: middle;
}
:is(#public, #multimodel, #coding) .local-commercial-table td:nth-child(2) .leaderboard-model-cell {
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
  min-height: 0; gap: 0;
}
:is(#public, #multimodel, #coding) .local-commercial-table td:nth-child(2) .leaderboard-model-cell > .version-link {
  display: block; min-height: 0; margin: 0;
  font-family: "Segoe UI Variable Display", "Segoe UI", "Microsoft YaHei UI", Arial, sans-serif !important;
  font-size: 18px !important; font-weight: 600; line-height: 26px !important;
  letter-spacing: -.2px;
  text-align: left !important;
}
:is(#public, #multimodel, #coding) .local-commercial-table .local-commercial-meta {
  display: flex; flex-direction: column; align-items: flex-start;
  min-height: 0; margin-top: 6px; gap: 5px;
}
:is(#public, #multimodel, #coding) .local-commercial-table .local-commercial-meta > :is(.local-organization-badge, .local-product-text) {
  font-family: "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei UI", Arial, sans-serif;
  font-size: 12px; font-weight: 400; line-height: 20px; letter-spacing: 0;
}
:is(#public, #multimodel, #coding) .local-commercial-table .local-commercial-meta > .local-organization-badge {
  position: relative; height: 20px; padding: 0 0 0 19px;
  border: 0; border-radius: 0; color: #617079; background: transparent;
}
.local-commercial-table .local-organization-icon {
  position: absolute; left: 0; top: 2px; width: 15px; height: 15px;
  opacity: .7; pointer-events: none;
}
:is(#public, #multimodel, #coding) .local-commercial-table .local-commercial-meta > .local-product-text {
  width: fit-content; max-width: 100%; height: 24px; padding: 1px 8px;
  border-radius: 6px; color: #39754a; border-color: #d9eadf; background: #f5faf6;
}
:is(#public, #multimodel, #coding) .local-commercial-table .local-commercial-meta > .local-github-icon {
  width: 24px; padding: 4px; align-self: flex-start;
}
:is(#public, #multimodel, #coding) .local-commercial-table .local-commercial-meta > .leaderboard-product-link:hover {
  color: #2f8645; border-color: #bcd8c3; background: #edf7ef;
}
:is(#public, #multimodel, #coding) .local-commercial-table .local-commercial-meta > .leaderboard-product-link:not(.local-github-icon) {
  position: relative; padding-left: 27px; padding-right: 24px;
}
.local-commercial-table .local-product-icon {
  position: absolute; left: 7px; top: 4px; width: 14px; height: 14px;
  pointer-events: none;
}
.local-commercial-table .local-product-viewport { display: block; min-width: 0; overflow: hidden; }
.local-commercial-table .leaderboard-product-link:not(.local-github-icon)::after {
  content: "↗"; position: absolute; right: 0; top: 0; bottom: 0; width: 22px;
  display: grid; place-items: center; background: inherit; color: rgb(57 117 74 / .72);
  font-size: 12px; line-height: 20px; pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .local-public-meta .is-meta-overflowing > .leaderboard-meta-scroll-text { animation: none; }
  .local-public-meta .is-meta-overflowing { overflow-x: auto !important; scrollbar-width: none; }
}
.board-cycle-label { display: inline-flex; align-items: center; gap: 8px; }
@media(max-width:760px) { .local-metric-tabs .tabs { gap: 4px; } .board-cycle-controls { flex-wrap: wrap; } }

/* The product board is a subset of the closed-source board. */
.leaderboard-edition-switch-nested {
  max-width: 100%;
  flex-wrap: wrap;
}
.leaderboard-edition-switch-nested .leaderboard-closed-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 3px;
  border: 1px solid var(--theme-line-strong, #b9c2ca);
  border-radius: 8px;
  background: var(--theme-surface, #fff);
}
.leaderboard-edition-switch-nested .leaderboard-closed-group:has(button.active) {
  border-color: var(--theme-accent, #4f8587);
}
.leaderboard-edition-switch-nested .leaderboard-closed-group [data-leaderboard-edition="commercial"] {
  min-width: 0;
  min-height: 28px;
  height: auto;
  padding: 5px 10px;
  border: 1px solid var(--theme-line-strong, #b9c2ca);
  border-radius: 5px;
}
.leaderboard-closed-group button:focus-visible {
  outline: 2px solid var(--theme-accent, #4f8587);
  outline-offset: 1px;
}
.local-commercial-empty {
  display: grid;
  min-height: 140px;
  place-items: center;
  text-align: center;
}
.local-commercial-empty p {
  margin: 0;
  color: var(--theme-muted, #637078);
}
@media (max-width: 620px) {
  .leaderboard-edition-switch.leaderboard-edition-switch-nested { display: flex; }
  .leaderboard-edition-switch-nested .leaderboard-closed-group { row-gap: 3px; }
}

/* Home preview: the published overall top ten of each of the six boards. */
#home .home-preview-editions {
  align-self: stretch;
  margin: 0 0 14px;
  justify-content: flex-start;
}
#home .local-home-top10 { max-height: none; }
#home .local-home-top10 .col-version { width: 220px !important; }
#home .home-preview-table.local-cycle2-table:not(.coding-table):not(.multimodel-table) .col-dataset-score:nth-child(9) { width: 280px !important; }
#home .local-home-top10 .version-link { white-space: normal; overflow-wrap: anywhere; }
#home .local-home-top10 .local-home-company {
  display: block; margin-top: 4px;
  color: #617079; font-size: 12px; font-weight: 400; line-height: 1.5;
  white-space: normal; overflow-wrap: anywhere;
}
#home .home-preview-editions [data-home-preview-edition="commercial"] {
  min-width: 0; min-height: 28px; height: auto; padding: 5px 10px;
  border: 1px solid var(--theme-line-strong, #b9c2ca); border-radius: 5px;
}
#home #homePreviewOpen { text-decoration: none; }
/* Keep the number and its bar inside the score column at every viewport width. */
:is(#home, #public, #multimodel, #coding) .leaderboard-main-section .local-cycle2-table .col-score {
  width: 240px !important;
}
:is(#home, #public, #multimodel, #coding) .leaderboard-main-section .local-cycle2-table .leaderboard-overall-score {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
:is(#home, #public, #multimodel, #coding) .leaderboard-main-section .local-cycle2-table .leaderboard-overall-score > span {
  width: auto;
  min-width: 0;
  white-space: nowrap;
}
:is(#home, #public, #multimodel, #coding) .leaderboard-main-section .local-cycle2-table .leaderboard-overall-track {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

/* Same closed-evaluation card, status strip and actions as the Cycle 1 notice. */
#accessDialog .evaluation-request-closed-dialog {
  width: min(720px, calc(100vw - 28px));
  gap: 0;
  overflow: auto;
  border: 1px solid color-mix(in srgb, var(--theme-accent) 20%, var(--theme-line));
  border-radius: 22px;
  padding: 0;
  background: var(--theme-surface);
  box-shadow: 0 30px 90px rgba(17, 24, 39, 0.22), 0 0 0 8px color-mix(in srgb, var(--theme-accent-soft) 42%, transparent);
}
#accessDialog .evaluation-request-closed-dialog:focus { outline: none; }
#accessDialog .evaluation-request-closed-dialog :is(a,button):focus-visible {
  outline: 3px solid var(--theme-accent);
  outline-offset: 2px;
}
#accessDialog .evaluation-request-closed-head {
  align-items: center;
  gap: 18px;
  padding: 28px 32px 24px;
  border-bottom: 1px solid color-mix(in srgb, var(--theme-accent) 16%, var(--theme-line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--theme-accent-soft) 68%, var(--theme-surface)), var(--theme-surface) 72%);
}
#accessDialog .evaluation-request-closed-head > div { gap: 8px; }
#accessDialog .evaluation-request-closed-head > div > span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  border: 1px solid color-mix(in srgb, var(--theme-accent) 26%, var(--theme-line));
  border-radius: 999px;
  padding: 3px 10px;
  background: color-mix(in srgb, var(--theme-surface) 65%, transparent);
  color: var(--theme-accent);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: none;
}
#accessDialog .evaluation-request-closed-head h2 {
  max-width: 620px;
  font-size: clamp(24px, 3vw, 31px);
  font-weight: 650;
  letter-spacing: -0.02em;
}
#accessDialog .evaluation-request-closed-section { display: grid; gap: 20px; padding: 28px 32px 30px; }
#accessDialog .evaluation-request-closed-status {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  border: 1px solid color-mix(in srgb, var(--theme-accent) 30%, var(--theme-line));
  border-radius: 16px;
  padding: 14px 16px;
  background: linear-gradient(110deg, color-mix(in srgb, var(--theme-accent-soft) 78%, var(--theme-surface)), var(--theme-surface));
}
#accessDialog .evaluation-request-closed-status-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--theme-accent);
  color: #fff;
  font-size: 20px;
  font-weight: 750;
}
#accessDialog .evaluation-request-closed-status > div { display: grid; gap: 3px; }
#accessDialog .evaluation-request-closed-status strong { color: var(--theme-ink); font-size: 17px; font-weight: 700; }
#accessDialog .evaluation-request-closed-status > div > span { color: var(--theme-muted); font-size: 12px; line-height: 1.5; }
#accessDialog .evaluation-request-closed-copy { max-width: 600px; margin: 0; color: var(--theme-ink); font-size: 16px; line-height: 1.7; }
#accessDialog .evaluation-request-closed-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 12px; }
#accessDialog .evaluation-request-closed-actions :is(a.primary, a.small-button) {
  display: inline-flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border-radius: 12px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
#accessDialog .evaluation-request-closed-actions :is(a.primary, a.small-button)::after { margin-left: auto; font-size: 16px; font-weight: 600; }
#accessDialog .evaluation-request-closed-actions a.primary::after { content: "→"; }
#accessDialog .evaluation-request-closed-actions a.small-button::after { content: "↗"; }
#accessDialog .evaluation-request-closed-actions :is(a.primary, a.small-button):hover { transform: translateY(-1px); }
#accessDialog .evaluation-request-closed-actions a.primary {
  border: 1px solid var(--theme-strong);
  background: var(--theme-strong);
  color: #fff;
  box-shadow: 0 9px 20px color-mix(in srgb, var(--theme-strong) 18%, transparent);
}
#accessDialog .evaluation-request-closed-actions a.small-button {
  border-color: color-mix(in srgb, var(--theme-accent) 30%, var(--theme-line-strong));
  background: color-mix(in srgb, var(--theme-accent-soft) 42%, var(--theme-surface));
  color: var(--theme-strong);
  box-shadow: 0 7px 18px color-mix(in srgb, var(--theme-strong) 7%, transparent);
}
@media (max-width: 720px) {
  #accessDialog :is(.evaluation-request-closed-head,.evaluation-request-closed-section) { padding-right: 20px; padding-left: 20px; }
  #accessDialog .evaluation-request-closed-head h2 { font-size: 23px; }
  #accessDialog .evaluation-request-closed-actions { grid-template-columns: 1fr; }
}

.community-links {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--theme-line-strong, #ccd8d7);
  border-radius: 9px;
  background: var(--theme-surface, #fff);
  color: var(--theme-ink, #203031);
}
.community-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 36px;
  height: 34px;
  box-sizing: border-box;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  transition: background-color 160ms ease, color 160ms ease;
}
.community-link + .community-link { position: relative; }
.community-link + .community-link::before {
  content: "";
  position: absolute;
  left: -2px;
  width: 1px;
  height: 16px;
  background: var(--theme-line-strong, #ccd8d7);
}
.community-link svg { display: block; width: 18px; height: 18px; flex-shrink: 0; }
.community-link-hug { font-size: 21px; line-height: 1; }
.community-link-arrow { color: var(--theme-muted, #718887); font-size: 13px; }
.community-link:hover { background: var(--theme-accent-soft, #eaf0ef); color: var(--theme-ink, #203031); }
.community-link:focus-visible { outline: 2px solid var(--theme-accent, #4f8587); outline-offset: 2px; }
.intro-header .community-links {
  margin-left: auto;
}
@media (max-width: 1799px) {
  .top-nav-actions .community-link-name,
  .top-nav-actions .community-link-arrow { display: none; }
  .top-nav-actions .community-link { padding-inline: 8px; }
}
@media (max-width: 1280px) {
  .community-links-preview .figma-top-nav {
    grid-template-columns: minmax(0, 1fr) auto !important;
    height: auto !important;
    min-height: 72px;
    padding-block: 10px !important;
    row-gap: 8px !important;
  }
  .community-links-preview .figma-top-nav .top-nav.tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start !important;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .community-links-preview .figma-top-nav .top-nav .tab { flex: 0 0 auto; }
  .community-links-preview .top-nav-actions { grid-column: 2; grid-row: 1; }
}
@media (max-width: 720px) {
  .community-links-preview .figma-top-nav .top-nav-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
  }
  .community-links-preview .figma-top-nav .top-nav.tabs { grid-row: 3; }
  .top-nav-actions .community-links { margin-right: auto; }
  .community-link { min-height: 38px; }
  .intro-header .community-link-name,
  .intro-header .community-link-arrow { display: none; }
  .intro-header .community-link { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .community-link { transition: none; }
}

:root { --aml-community-links-ready: 1; }

/* These direct routes already deliver their active view in HTML.
   Suppress only the ordinary boot message, not a real loading failure. */
html[data-aml-cycle2-preview]:has(head link[rel="canonical"]:is([href*="/leaderboard/"], [href$="/docs"]))
  #localCycle2Startup:has(> #localCycle2StartupStatus[data-i18n-en^="Loading Cycle 2"]) {
  display: none;
}
/* Match the board's released state before its adapter takes over. */
html[data-aml-cycle2-preview] #localCycle2Startup:not([hidden]) ~ .leaderboard-page [data-cycle-two-rankings-banner] {
  display: none !important;
}
