/* Final visual layer. Keep this file loaded after styles.css. */

.figma-top-nav {
  border-bottom-color: #cbd4d8 !important;
  background: #dce3e7 !important;
  box-shadow: 0 1px 0 rgba(44, 54, 59, 0.04) !important;
}

.figma-top-nav :is(.figma-brand-copy strong, .figma-brand-copy span, .top-nav .tab) {
  color: #293136 !important;
}

.figma-top-nav .brand-mark {
  border-color: #bbc6cc !important;
  background: rgba(255, 255, 255, 0.52) !important;
  color: #293136 !important;
}

.figma-top-nav .top-nav .tab:hover {
  border-color: rgba(82, 99, 108, 0.14) !important;
  background: rgba(255, 255, 255, 0.36) !important;
}

.figma-top-nav .top-nav .tab.active {
  border-color: #c3cdd2 !important;
  background: #f8f8f6 !important;
  color: #293136 !important;
}

.figma-top-nav :is(.access-identity, .access-exit-button) {
  border-color: #bcc8ce !important;
  background: rgba(255, 255, 255, 0.38) !important;
  color: #293136 !important;
}

.figma-top-nav .access-identity span { color: #6e7a80 !important; }
.figma-top-nav .access-identity strong { color: #293136 !important; }

.figma-top-nav .access-exit-button:hover {
  border-color: #aebbc1 !important;
  background: rgba(255, 255, 255, 0.68) !important;
  color: #293136 !important;
}

.figma-top-nav :is(.access-session, .access-entry) .access-cta {
  border-color: #30393e !important;
  background: #30393e !important;
  color: #fff !important;
}

#home > .home-hero,
:is(#public, #multimodel, #coding, #run, #benchmark-details, #rules, #api-guide) > .figma-page-hero {
  position: relative !important;
  width: 100% !important;
  margin-top: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #e9edf0 !important;
  box-shadow: 0 0 0 100vmax #e9edf0 !important;
  clip-path: inset(0 -100vmax);
  min-height: 300px !important;
  align-content: center !important;
  align-items: center !important;
  padding-top: 44px !important;
  padding-bottom: 44px !important;
}

#home > .home-hero {
  min-height: 300px !important;
  padding: 44px 0 !important;
}

:is(#public, #multimodel, #coding, #run, #benchmark-details, #rules, #api-guide) > .figma-page-hero > :is(div, button),
#home > .home-hero > * {
  align-self: center;
}

.button-with-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

.button-icon {
  display: inline-block;
  width: 16px;
  min-width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background-color: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.icon-trophy { -webkit-mask-image: url("/static/icons/trophy.svg"); mask-image: url("/static/icons/trophy.svg"); }
.icon-play { -webkit-mask-image: url("/static/icons/play.svg"); mask-image: url("/static/icons/play.svg"); }
.icon-book-open { -webkit-mask-image: url("/static/icons/book-open.svg"); mask-image: url("/static/icons/book-open.svg"); }
.icon-mail { -webkit-mask-image: url("/static/icons/mail.svg"); mask-image: url("/static/icons/mail.svg"); }
.icon-eye { -webkit-mask-image: url("/static/icons/eye.svg"); mask-image: url("/static/icons/eye.svg"); }
.icon-house { -webkit-mask-image: url("/static/icons/house.svg"); mask-image: url("/static/icons/house.svg"); }
.icon-chart-column { -webkit-mask-image: url("/static/icons/chart-column-increasing.svg"); mask-image: url("/static/icons/chart-column-increasing.svg"); }
.icon-gauge { -webkit-mask-image: url("/static/icons/gauge.svg"); mask-image: url("/static/icons/gauge.svg"); }
.icon-database { -webkit-mask-image: url("/static/icons/database.svg"); mask-image: url("/static/icons/database.svg"); }
.icon-shield-check { -webkit-mask-image: url("/static/icons/shield-check.svg"); mask-image: url("/static/icons/shield-check.svg"); }
.icon-log-out { -webkit-mask-image: url("/static/icons/log-out.svg"); mask-image: url("/static/icons/log-out.svg"); }
.icon-circle-plus { -webkit-mask-image: url("/static/icons/circle-plus.svg"); mask-image: url("/static/icons/circle-plus.svg"); }
.icon-code { -webkit-mask-image: url("/static/icons/code.svg"); mask-image: url("/static/icons/code.svg"); }

.figma-top-nav .top-nav .tab {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  white-space: nowrap;
}

.figma-top-nav .top-nav .nav-icon {
  width: 15px;
  min-width: 15px;
  height: 15px;
  flex-basis: 15px;
  opacity: 0.7;
}

.figma-top-nav .top-nav .tab:is(:hover, .active) .nav-icon {
  opacity: 1;
}

.figma-top-nav :is(.access-exit-button, .access-cta) .button-icon {
  width: 15px;
  min-width: 15px;
  height: 15px;
  flex-basis: 15px;
}

/* Keep the authenticated actions spacious without crowding the nav links. */
.figma-top-nav .access-session {
  gap: 12px !important;
}

.figma-top-nav .access-session .access-identity {
  width: 250px !important;
  min-width: 250px !important;
  justify-content: center;
}

.figma-top-nav .access-session .access-exit-button {
  width: 78px !important;
  min-width: 78px !important;
  padding-inline: 12px !important;
}

.figma-top-nav :is(.access-session, .access-entry) .access-cta {
  width: 210px !important;
  min-width: 210px !important;
}

@media (max-width: 1400px) {
  .figma-top-nav .access-session {
    gap: 10px !important;
  }

  .figma-top-nav .access-session .access-identity {
    width: 190px !important;
    min-width: 190px !important;
  }

  .figma-top-nav .access-session .access-exit-button {
    width: 72px !important;
    min-width: 72px !important;
  }

  .figma-top-nav :is(.access-session, .access-entry) .access-cta {
    width: 190px !important;
    min-width: 190px !important;
  }
}

@media (max-width: 720px) {
  .figma-top-nav .access-session .access-identity {
    width: auto !important;
    min-width: 0 !important;
  }

  .figma-top-nav .access-session .access-exit-button {
    width: 58px !important;
    min-width: 58px !important;
    padding-inline: 0 !important;
  }

  .figma-top-nav :is(.access-session, .access-entry) .access-cta {
    width: 132px !important;
    min-width: 132px !important;
  }
}

/* Benchmark track cards use the same content edges as the section heading. */
#home .tracks-section .track-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  justify-content: stretch !important;
  gap: 24px !important;
}

#home .tracks-section .track-card {
  min-width: 0;
  min-height: 188px !important;
  grid-template-rows: auto 1fr auto;
  padding: 24px !important;
}

#home .track-card-heading {
  display: flex;
  align-items: center;
  gap: 11px;
}

#home .track-card-heading h3 {
  margin: 0;
}

#home .track-card-icon {
  width: 19px;
  min-width: 19px;
  height: 19px;
  flex-basis: 19px;
  color: var(--theme-strong);
  opacity: 0.84;
}

#home .track-card p {
  max-width: 36ch;
}

#home .track-card button {
  border-color: var(--theme-strong) !important;
  background: var(--theme-strong) !important;
}

@media (max-width: 1180px) {
  #home .tracks-section .track-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 720px) {
  #home .tracks-section .track-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

#home .home-hero .figma-eyebrow,
:is(#public, #multimodel, #coding, #run, #benchmark-details, #rules, #api-guide) > .figma-page-hero .figma-eyebrow {
  color: #69767d !important;
  font-weight: 500 !important;
}

#home .home-hero h1,
:is(#public, #multimodel, #coding, #run, #benchmark-details, #rules, #api-guide) > .figma-page-hero h1 {
  color: #252c30 !important;
}

#home .home-hero .hero-description,
:is(#public, #multimodel, #coding, #run, #benchmark-details, #rules, #api-guide) > .figma-page-hero p:not(.figma-eyebrow) {
  color: #5e6970 !important;
  box-sizing: border-box !important;
  width: min(960px, 100%) !important;
  max-width: 960px !important;
  line-height: 1.55 !important;
  white-space: normal !important;
  text-wrap: wrap !important;
}

/*
 * Normalize the hero copy column. The base layout used a narrower grid track on
 * Home and a separate split track on Evaluation, so identical paragraph widths
 * still wrapped at different points in the browser.
 */
#home > .home-hero {
  grid-template-columns: minmax(0, 900px) !important;
}

#home > .home-hero > .hero-copy,
:is(#public, #multimodel, #coding, #run, #benchmark-details, #rules, #api-guide) > .figma-page-hero > .hero-copy,
:is(#run, #rules, #api-guide) > .figma-page-hero > div:first-child {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 900px !important;
}

#run > .figma-page-hero.split {
  grid-template-columns: minmax(0, 900px) minmax(280px, 1fr) !important;
}

#home > .home-hero > .hero-copy > .hero-description,
:is(#public, #multimodel, #coding, #benchmark-details) > .figma-page-hero > .hero-copy > p,
:is(#run, #rules, #api-guide) > .figma-page-hero > div:first-child > p {
  display: block !important;
  box-sizing: border-box !important;
  width: min(900px, 100%) !important;
  max-width: 900px !important;
  min-height: 3.1em !important;
  margin-right: auto !important;
  color: #5e6970 !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  line-height: 1.55 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  text-wrap: balance !important;
  white-space: normal !important;
}

#home .home-hero .hero-actions button {
  border-color: #c6d0d5 !important;
  background: rgba(255, 255, 255, 0.46) !important;
  color: #293136 !important;
}

#home .home-hero .hero-actions button:hover {
  border-color: #abb9bf !important;
  background: rgba(255, 255, 255, 0.76) !important;
}

#home .home-hero .hero-actions button.primary {
  border-color: #30393e !important;
  background: #30393e !important;
  color: #fff !important;
}

#home .preview-tabs.board-switch.tabs {
  display: grid !important;
  grid-template-columns: repeat(3, 118px) !important;
  justify-content: end !important;
  width: 100% !important;
  height: auto !important;
  gap: 10px !important;
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--figma-line) !important;
  border-radius: 0 !important;
  padding: 10px 0 22px !important;
  background: transparent !important;
}

#home .home-board-card {
  padding: 26px 28px 34px !important;
}

#home .preview-tabs.board-switch.tabs button {
  width: 118px !important;
  min-width: 118px !important;
  height: 36px !important;
  min-height: 36px !important;
  border: 1px solid var(--figma-line) !important;
  border-radius: 7px !important;
  padding: 0 16px !important;
  background: var(--figma-card) !important;
  color: var(--figma-ink) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  gap: 7px !important;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease !important;
}

#home .preview-tabs.board-switch.tabs button:not(.active):hover,
.leaderboard-page .board-switch.tabs .tab:not(.active):hover {
  border-color: #b9c5cb !important;
  background: #f7f9fa !important;
}

#home .preview-tabs.board-switch.tabs .button-icon,
.leaderboard-page .board-switch.tabs .button-icon {
  width: 14px !important;
  min-width: 14px !important;
  height: 14px !important;
  flex-basis: 14px !important;
  opacity: 0.78;
}

#home .preview-tabs.board-switch.tabs button.active .button-icon,
.leaderboard-page .board-switch.tabs .tab.active .button-icon {
  opacity: 1;
}

.leaderboard-page .board-switch.tabs {
  gap: 12px !important;
}

.leaderboard-page .board-switch.tabs .tab {
  min-width: 144px !important;
  height: 44px !important;
  min-height: 44px !important;
  border-radius: 8px !important;
  padding: 0 20px !important;
  gap: 9px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease !important;
}

.leaderboard-page .board-switch.tabs .button-icon {
  width: 16px !important;
  min-width: 16px !important;
  height: 16px !important;
  flex-basis: 16px !important;
}

#home .preview-open-button {
  display: flex !important;
  width: max-content !important;
  min-height: 42px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  margin: 16px 0 0 auto !important;
  border-color: #cbd4d8 !important;
  padding: 0 16px !important;
  background: #fff !important;
  color: #293136 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease !important;
}

#home .preview-open-button:hover {
  border-color: #aebbc1 !important;
  background: #f5f8f9 !important;
  color: #1f272b !important;
}

#home .preview-open-button .button-icon {
  width: 15px !important;
  min-width: 15px !important;
  height: 15px !important;
  flex-basis: 15px !important;
}

/* Match Multimodal and Coding rank columns to Textual. */
:is(#multimodel, #coding) :is(.leaderboard-main-section, .subdataset-detail-table) .col-rank {
  width: 64px !important;
}

/* Keep Textual Overall at 120px; use 220px for every other model column. */
#public .leaderboard-main-section .col-version,
#home .home-preview-public .col-version {
  width: 120px !important;
}

#public .subdataset-detail-table .col-version,
#multimodel :is(.leaderboard-main-section, .subdataset-detail-table) .col-version,
#coding :is(.leaderboard-main-section, .subdataset-detail-table) .col-version,
#home :is(.home-preview-multimodal, .home-preview-coding) .col-version {
  width: 220px !important;
}

/* Let metric columns absorb spare fixed-table width instead of stretching Model. */
#public .subdataset-detail-table :is(.col-score, .col-question-type-score),
#multimodel :is(.leaderboard-main-section, .subdataset-detail-table) :is(.col-dataset-score, .col-question-type-score),
#coding :is(.leaderboard-main-section, .subdataset-detail-table) :is(.col-dataset-score, .col-question-type-score),
#home :is(.home-preview-multimodal, .home-preview-coding) .col-dataset-score {
  width: auto !important;
}

:is(#public, #multimodel) .leaderboard-table td:nth-child(2) .version-link,
#home :is(.home-preview-public, .home-preview-multimodal) td:nth-child(2) .version-link {
  display: inline-flex !important;
  max-width: 100% !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  text-align: center !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Highlight the winning rank and left-align model columns on full leaderboards. */
:is(#public, #multimodel, #coding) .leaderboard-table .rank-badge.rank-badge-gold {
  color: #d4af37 !important;
}

:is(#public, #multimodel, #coding) :is(.leaderboard-main-section, .subdataset-detail-table) .leaderboard-table thead th:nth-child(2),
:is(#public, #multimodel, #coding) .leaderboard-table td:nth-child(2),
#home .home-preview-table th:nth-child(2),
#home .home-preview-table td:nth-child(2) {
  text-align: left !important;
}

:is(#public, #multimodel, #coding) .leaderboard-table td:nth-child(2) .leaderboard-model-cell {
  align-items: flex-start !important;
  justify-content: flex-start !important;
  justify-items: start !important;
  text-align: left !important;
}

:is(#public, #multimodel, #coding) .leaderboard-table td:nth-child(2) .version-link,
#home .home-preview-table td:nth-child(2) .version-link {
  justify-content: flex-start !important;
  text-align: left !important;
}

/* Keep the API contract readable without changing its request/response structure. */
#api-guide .guide-contract-card {
  border-color: #d9e0e3 !important;
  background: #fff !important;
}

#api-guide .guide-contract-card .card-title-row p {
  max-width: 1120px !important;
  color: #4f5b62 !important;
  font-size: 15px !important;
  line-height: 1.62 !important;
}

#api-guide .guide-contract-card .card-title-row p code {
  border: 1px solid #dfe5e8;
  border-radius: 4px;
  padding: 1px 5px;
  background: #f4f7f8;
  color: #26343c;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}

#api-guide .guide-contract-card pre {
  border-color: #dce3e6 !important;
  background: #f7f9f9 !important;
  color: #1e2c34 !important;
}

#api-guide .guide-contract-card .param-table {
  border-color: #dce3e6 !important;
}

#api-guide .guide-contract-card .param-table > * {
  border-color: #e2e7e9 !important;
  color: #4b5860 !important;
  font-weight: 450 !important;
}

#api-guide .guide-contract-card .param-table > span:nth-child(3n + 1) {
  color: #26343c !important;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px !important;
  font-weight: 600 !important;
}

#api-guide .guide-contract-card .param-table > span:nth-child(3n + 2) {
  color: #26343c !important;
  font-weight: 600 !important;
}

#api-guide .guide-contract-card .param-table > span:nth-child(3n) {
  color: #4b5860 !important;
  font-weight: 450 !important;
}

#api-guide .guide-contract-card .param-table b {
  background: #eef2f3 !important;
  color: #2d3b43 !important;
  font-family: Inter, Arial, "Microsoft YaHei", sans-serif !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

#home .preview-tabs.board-switch.tabs button.active {
  border-color: #1e1d1a !important;
  background: #1e1d1a !important;
  color: #fff !important;
}

#home .home-preview-rank-toolbar {
  min-height: 42px !important;
  margin: 12px 0 16px !important;
}

#home .leaderboard-rank-control {
  min-height: 38px !important;
  gap: 9px !important;
  border: 1px solid var(--figma-line) !important;
  border-radius: 8px !important;
  padding: 0 10px 0 12px !important;
  background: var(--figma-card) !important;
}

#home .leaderboard-rank-control > span {
  width: 46px !important;
  min-width: 46px !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
}

#home .leaderboard-rank-control select {
  width: 247px !important;
  min-width: 247px !important;
  max-width: 247px !important;
  height: 34px !important;
  border: 0 !important;
  background: transparent !important;
  font-size: 13px !important;
  font-weight: 400 !important;
}

/* Give every title band a clear, consistent handoff to page content. */
:is(#public, #multimodel, #coding) > .unified-board-frame,
#run > .figma-page-hero + .eval-grid-top,
#benchmark-details > .figma-page-hero + .dataset-section,
#rules > .figma-page-hero + .rules-panel,
#api-guide > .figma-page-hero + .api-contract-list {
  margin-top: 32px !important;
}

#benchmark-details > .figma-page-hero + .dataset-section,
#rules > .figma-page-hero + .rules-panel {
  margin-top: 12px !important;
}

/* Keep dataset cards comfortably inset from their section boundary. */
#benchmark-details .dataset-section {
  padding: 28px 30px !important;
}

#benchmark-details .dataset-section > p {
  margin-bottom: 4px !important;
}

@media (max-width: 720px) {
  #benchmark-details .dataset-section {
    padding: 22px 18px !important;
  }
}

@media (max-width: 720px) {
  #home .preview-tabs.board-switch.tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  #home .preview-tabs.board-switch.tabs button {
    width: auto !important;
    min-width: 0 !important;
  }

  #home .home-board-card {
    padding: 18px !important;
  }

  #home .leaderboard-rank-control > span {
    width: auto !important;
    min-width: 0 !important;
  }

  #home .leaderboard-rank-control select {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  #home > .home-hero {
    padding: 38px 0 !important;
  }
}

/* Color themes ----------------------------------------------------------- */
:root,
html[data-theme="slate"] {
  --theme-page: #f8f8f6;
  --theme-surface: #fffefa;
  --theme-surface-soft: #f2f4f4;
  --theme-nav: #dce3e7;
  --theme-nav-line: #cbd4d8;
  --theme-hero: #e9edf0;
  --theme-line: #d9d4cb;
  --theme-line-strong: #bcc8ce;
  --theme-ink: #252c30;
  --theme-muted: #5e6970;
  --theme-strong: #30393e;
  --theme-strong-hover: #222a2e;
  --theme-accent: #6d858f;
  --theme-accent-soft: #e5ecef;
  --theme-pattern: rgba(88, 108, 118, 0.075);
  --theme-ring: rgba(88, 108, 118, 0.11);
  --figma-bg: var(--theme-page);
  --figma-card: var(--theme-surface);
  --figma-ink: var(--theme-ink);
  --figma-muted: var(--theme-muted);
  --figma-line: var(--theme-line);
  --figma-cream: var(--theme-accent-soft);
  --figma-cream-2: var(--theme-surface-soft);
}

html[data-theme="ember"] {
  --theme-page: #f6f5f2;
  --theme-surface: #ffffff;
  --theme-surface-soft: #f1efeb;
  --theme-nav: #e8e5df;
  --theme-nav-line: #d5d0c7;
  --theme-hero: #efede8;
  --theme-line: #d9d3c9;
  --theme-line-strong: #c5beb2;
  --theme-ink: #2e2d29;
  --theme-muted: #68665f;
  --theme-strong: #4b4b43;
  --theme-strong-hover: #383832;
  --theme-accent: #e96343;
  --theme-accent-soft: #fbe9e3;
  --theme-pattern: rgba(103, 91, 73, 0.07);
  --theme-ring: rgba(233, 99, 67, 0.12);
  --figma-bg: var(--theme-page);
  --figma-card: var(--theme-surface);
  --figma-ink: var(--theme-ink);
  --figma-muted: var(--theme-muted);
  --figma-line: var(--theme-line);
  --figma-cream: var(--theme-accent-soft);
  --figma-cream-2: var(--theme-surface-soft);
}

html[data-theme="signal"] {
  --theme-page: #f4f5f7;
  --theme-surface: #ffffff;
  --theme-surface-soft: #eceef1;
  --theme-nav: #e4e7eb;
  --theme-nav-line: #d1d6dc;
  --theme-hero: #edf0f4;
  --theme-line: #d6dae0;
  --theme-line-strong: #bcc5d1;
  --theme-ink: #171a1f;
  --theme-muted: #5e6672;
  --theme-strong: #20242a;
  --theme-strong-hover: #0f1114;
  --theme-accent: #7fa3dc;
  --theme-accent-soft: #e5edfa;
  --theme-pattern: rgba(91, 125, 176, 0.075);
  --theme-ring: rgba(152, 187, 237, 0.19);
  --figma-bg: var(--theme-page);
  --figma-card: var(--theme-surface);
  --figma-ink: var(--theme-ink);
  --figma-muted: var(--theme-muted);
  --figma-line: var(--theme-line);
  --figma-cream: #eef5cb;
  --figma-cream-2: var(--theme-surface-soft);
}

html[data-theme="harbor"] {
  --theme-page: #f4f7f7;
  --theme-surface: #ffffff;
  --theme-surface-soft: #eaf0ef;
  --theme-nav: #dce8e7;
  --theme-nav-line: #c8d8d6;
  --theme-hero: #e5eeee;
  --theme-line: #cfdbd9;
  --theme-line-strong: #b4c9c6;
  --theme-ink: #203031;
  --theme-muted: #5b6b6c;
  --theme-strong: #285154;
  --theme-strong-hover: #1c3d40;
  --theme-accent: #4f8587;
  --theme-accent-soft: #dfeceb;
  --theme-pattern: rgba(67, 111, 113, 0.075);
  --theme-ring: rgba(79, 133, 135, 0.14);
  --figma-bg: var(--theme-page);
  --figma-card: var(--theme-surface);
  --figma-ink: var(--theme-ink);
  --figma-muted: var(--theme-muted);
  --figma-line: var(--theme-line);
  --figma-cream: var(--theme-accent-soft);
  --figma-cream-2: var(--theme-surface-soft);
}

html[data-theme="nocturne"] {
  color-scheme: dark;
  --theme-page: #080d13;
  --theme-surface: #111922;
  --theme-surface-soft: #182430;
  --theme-nav: #0c141c;
  --theme-nav-line: #22313f;
  --theme-hero: #0e1923;
  --theme-line: #273846;
  --theme-line-strong: #3c5366;
  --theme-ink: #f0f4f7;
  --theme-muted: #a4b0ba;
  --theme-strong: #df7455;
  --theme-strong-hover: #ee8768;
  --theme-accent: #ef8a69;
  --theme-accent-soft: #33221f;
  --theme-pattern: rgba(124, 154, 177, 0.075);
  --theme-ring: rgba(239, 138, 105, 0.13);
  --figma-bg: var(--theme-page);
  --figma-card: var(--theme-surface);
  --figma-ink: var(--theme-ink);
  --figma-muted: var(--theme-muted);
  --figma-line: var(--theme-line);
  --figma-cream: var(--theme-accent-soft);
  --figma-cream-2: var(--theme-surface-soft);
  --figma-danger: #ff8b83;
  --figma-success: #69d0a5;
}

html[data-theme] body,
html[data-theme] .figma-shell,
html[data-theme] .figma-content {
  background: var(--theme-page) !important;
  color: var(--theme-ink) !important;
}

/* Stable three-part navigation: brand, routes, compact action cluster. */
.figma-top-nav {
  grid-template-columns: 210px minmax(570px, 1fr) auto !important;
  gap: 12px !important;
  border-bottom-color: var(--theme-nav-line) !important;
  background: var(--theme-nav) !important;
}

.figma-top-nav .figma-brand {
  width: max-content;
  max-width: 100%;
  gap: 0 !important;
  white-space: nowrap;
}

.figma-top-nav .figma-brand-copy,
.figma-top-nav .figma-brand-copy strong {
  white-space: nowrap;
}

.figma-top-nav .top-nav.tabs {
  justify-content: center !important;
  gap: 2px !important;
}

.figma-top-nav .top-nav .tab {
  min-width: 0 !important;
  padding-inline: 10px !important;
}

.top-nav-actions {
  position: relative;
  display: flex;
  min-width: 0;
  align-self: stretch;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.top-nav-actions .auth-box {
  align-self: stretch !important;
  margin-left: 0 !important;
}

.figma-top-nav :is(.figma-brand-copy strong, .figma-brand-copy span, .top-nav .tab) {
  color: var(--theme-ink) !important;
}

.figma-top-nav .brand-mark,
.figma-top-nav :is(.access-identity, .access-exit-button) {
  border-color: var(--theme-line-strong) !important;
  background: rgba(255, 255, 255, 0.48) !important;
  color: var(--theme-ink) !important;
}

.figma-top-nav .top-nav .tab.active {
  border-color: var(--theme-line-strong) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-ink) !important;
}

.figma-top-nav :is(.access-session, .access-entry) .access-cta,
html[data-theme] button.primary,
html[data-theme] .board-switch.tabs .tab.active,
html[data-theme] #home .preview-tabs.board-switch.tabs button.active {
  border-color: var(--theme-strong) !important;
  background: var(--theme-strong) !important;
  color: #fff !important;
}

.figma-top-nav :is(.access-session, .access-entry) .access-cta:hover,
html[data-theme] button.primary:hover {
  border-color: var(--theme-strong-hover) !important;
  background: var(--theme-strong-hover) !important;
}

.theme-control {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
}

.theme-toggle {
  display: inline-flex !important;
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  border: 1px solid var(--theme-line-strong) !important;
  border-radius: 8px !important;
  padding: 0 !important;
  background: rgba(255, 255, 255, 0.46) !important;
  color: var(--theme-ink) !important;
}

.theme-toggle:hover,
.theme-toggle[aria-expanded="true"] {
  background: var(--theme-surface) !important;
}

.icon-palette {
  width: 17px !important;
  min-width: 17px !important;
  height: 17px !important;
  -webkit-mask-image: url("/static/icons/palette.svg");
  mask-image: url("/static/icons/palette.svg");
}

.theme-current-swatch {
  width: 7px;
  height: 7px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: var(--theme-accent);
  box-shadow: 0 0 0 1px var(--theme-strong);
}

.theme-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 264px;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  padding: 8px;
  background: var(--theme-surface);
  box-shadow: 0 18px 40px rgba(31, 39, 43, 0.16);
}

.theme-menu[hidden] { display: none !important; }

.theme-menu button {
  display: grid !important;
  grid-template-columns: 54px minmax(0, 1fr);
  width: 100% !important;
  min-height: 54px !important;
  align-items: center !important;
  gap: 12px !important;
  border: 0 !important;
  border-radius: 6px !important;
  padding: 7px 9px !important;
  background: transparent !important;
  color: var(--theme-ink) !important;
  text-align: left !important;
}

.theme-menu button:hover,
.theme-menu button.active {
  background: var(--theme-surface-soft) !important;
}

.theme-menu button.active {
  box-shadow: inset 3px 0 0 var(--theme-accent);
}

.theme-menu button > span:last-child {
  display: grid;
  gap: 2px;
}

.theme-menu strong {
  font-size: 13px;
  font-weight: 650;
}

.theme-menu small {
  color: var(--theme-muted);
  font-size: 11px;
}

.theme-swatches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 52px;
  height: 28px;
  overflow: hidden;
  border: 1px solid rgba(30, 35, 38, 0.12);
  border-radius: 5px;
}

.theme-swatches i { display: block; }
.theme-swatches.slate i:nth-child(1) { background: #e9edf0; }
.theme-swatches.slate i:nth-child(2) { background: #6d858f; }
.theme-swatches.slate i:nth-child(3) { background: #30393e; }
.theme-swatches.ember i:nth-child(1) { background: #f6f5f2; }
.theme-swatches.ember i:nth-child(2) { background: #e96343; }
.theme-swatches.ember i:nth-child(3) { background: #4b4b43; }
.theme-swatches.signal i:nth-child(1) { background: #98bbed; }
.theme-swatches.signal i:nth-child(2) { background: #daf512; }
.theme-swatches.signal i:nth-child(3) { background: #20242a; }
.theme-swatches.harbor i:nth-child(1) { background: #e5eeee; }
.theme-swatches.harbor i:nth-child(2) { background: #4f8587; }
.theme-swatches.harbor i:nth-child(3) { background: #285154; }
.theme-swatches.nocturne i:nth-child(1) { background: #0e1923; }
.theme-swatches.nocturne i:nth-child(2) { background: #ef8a69; }
.theme-swatches.nocturne i:nth-child(3) { background: #111922; }

#home > .home-hero,
:is(#public, #multimodel, #coding, #run, #benchmark-details, #rules, #api-guide) > .figma-page-hero {
  background: var(--theme-hero) !important;
  box-shadow: 0 0 0 100vmax var(--theme-hero) !important;
}

#home > .home-hero::before,
:is(#public, #multimodel, #coding, #run, #benchmark-details, #rules, #api-guide) > .figma-page-hero::before {
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0,
    transparent 158px,
    var(--theme-pattern) 159px,
    var(--theme-pattern) 161px,
    transparent 162px,
    transparent 320px
  ) !important;
}

#home > .home-hero::after,
:is(#public, #multimodel, #coding, #run, #benchmark-details, #rules, #api-guide) > .figma-page-hero::after {
  border-color: var(--theme-ring) !important;
  box-shadow: 0 0 0 52px color-mix(in srgb, var(--theme-ring) 48%, transparent), 0 0 0 104px color-mix(in srgb, var(--theme-ring) 24%, transparent) !important;
}

#home .home-hero h1,
:is(#public, #multimodel, #coding, #run, #benchmark-details, #rules, #api-guide) > .figma-page-hero h1 {
  color: var(--theme-ink) !important;
}

#home .home-hero .hero-description,
:is(#public, #multimodel, #coding, #run, #benchmark-details, #rules, #api-guide) > .figma-page-hero p:not(.figma-eyebrow),
#home > .home-hero > .hero-copy > .hero-description,
:is(#public, #multimodel, #coding, #benchmark-details) > .figma-page-hero > .hero-copy > p,
:is(#run, #rules, #api-guide) > .figma-page-hero > div:first-child > p {
  color: var(--theme-muted) !important;
}

html[data-theme] :is(
  .home-board-card,
  .track-card,
  .flow-grid article,
  .route-grid article,
  .unified-board-frame,
  .figma-panel,
  .snapshot-card,
  .rules-panel,
  .rules-mode-section,
  .api-contract-section,
  .guide-contract-card,
  .dataset-card-grid article,
  .dataset-section,
  .eval-access-card,
  .current-job-panel,
  .recent-jobs-panel,
  .private-results-panel
) {
  border-color: var(--theme-line) !important;
  background: var(--theme-surface) !important;
}

/* Match Evaluation Modes to the Public Submission Eligibility panel. */
#rules .rules-mode-section {
  box-sizing: border-box;
  width: 100%;
  gap: 22px;
  padding: 26px 24px;
  border: 1px solid var(--figma-line);
  border-radius: 8px;
  background: var(--figma-card);
}

#rules .rules-mode-section > p {
  margin: -10px 0 0;
}

#rules .rules-mode-section .rule-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

@media (max-width: 900px) {
  #rules .rules-mode-section .rule-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  #rules .rules-mode-section {
    padding: 18px 16px;
  }
}

/* Present Submission Flow as one connected horizontal sequence. */
#rules .numbered-flow {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 36px;
  overflow-x: auto;
  padding: 2px 2px 10px;
}

#rules .numbered-flow article {
  position: relative;
  min-width: 0;
}

#rules .numbered-flow article:not(:last-child)::after {
  position: absolute;
  z-index: 2;
  top: 22px;
  right: -30px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--theme-strong);
  content: "→";
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

html[data-theme] :is(.leaderboard-table, .data-table, .recent-jobs-table, .private-results-table) thead th,
html[data-theme] .param-table b {
  border-color: var(--theme-line) !important;
  background: var(--theme-surface-soft) !important;
  color: var(--theme-ink) !important;
}

html[data-theme] :is(.leaderboard-table, .data-table, .recent-jobs-table, .private-results-table) tbody tr {
  border-color: var(--theme-line) !important;
  background-color: var(--theme-surface) !important;
}

/* Use one softer UI typeface for column labels across every table. */
table thead th,
.param-table b,
:is(#home, #public, #multimodel, #coding) .leaderboard-table.leaderboard-table thead :is(th, .leaderboard-head-label, .dataset-group-head, .dataset-metric-head) {
  font-family: "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei UI", sans-serif !important;
}

/* Carry the selected palette through the complete product surface. */
html[data-theme] :is(
  .unified-board-frame,
  .leaderboard-main-section,
  .leaderboard-detail-panel,
  .leaderboard-detail-head,
  .subdataset-detail-table,
  .board-frame-head,
  .api-example,
  .api-code-block,
  .param-table,
  .current-job-scroll,
  .active-jobs-panel,
  .run-detail-panel,
  .job-cancel-panel,
  .job-stat,
  .job-meta-chip,
  .dataset-option,
  .private-result-card
) {
  border-color: var(--theme-line) !important;
  background-color: var(--theme-surface) !important;
}

html[data-theme] :is(
  .figma-content,
  .leaderboard-page,
  .evaluation-page,
  .benchmark-details-page,
  .rules-page,
  .api-guide-page
) :is(h1, h2, h3, h4, label, th, strong) {
  color: var(--theme-ink);
}

html[data-theme] :is(
  .board-frame-head,
  .leaderboard-detail-head,
  .home-section-head,
  .dataset-section,
  .rules-mode-section,
  .api-contract-section,
  .figma-panel
) p {
  color: var(--theme-muted) !important;
}

html[data-theme] :is(input, select, textarea) {
  border-color: var(--theme-line-strong) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-ink) !important;
}

html[data-theme] :is(input, select, textarea):focus {
  border-color: var(--theme-accent) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent) 17%, transparent) !important;
}

html[data-theme] :is(
  .board-switch.tabs .tab:not(.active),
  #home .preview-tabs.board-switch.tabs button:not(.active),
  .preview-open-button,
  .hero-actions button:not(.primary),
  .access-exit-button,
  .dataset-toggle
) {
  border-color: var(--theme-line) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-ink) !important;
}

html[data-theme] :is(
  .board-switch.tabs .tab:not(.active),
  #home .preview-tabs.board-switch.tabs button:not(.active),
  .preview-open-button,
  .hero-actions button:not(.primary),
  .access-exit-button
):hover {
  border-color: var(--theme-line-strong) !important;
  background: var(--theme-surface-soft) !important;
}

html[data-theme] .figma-top-nav .access-identity span,
html[data-theme] :is(.empty-state, .dataset-detail-empty, .job-meta-chip span) {
  color: var(--theme-muted) !important;
}

html[data-theme] .figma-top-nav .access-identity strong {
  color: var(--theme-ink) !important;
}

/* Dataset selectors: compact, legible, and visibly tied to the active theme. */
html[data-theme] :is(#public, #multimodel, #coding) .dataset-detail-selector {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px !important;
  padding: 12px 0 4px;
}

html[data-theme] :is(#public, #multimodel, #coding) .dataset-detail-selector .dataset-toggle {
  position: relative;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 7px !important;
  padding: 0 13px 0 12px !important;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--theme-line) 50%, transparent);
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

html[data-theme] :is(#public, #multimodel, #coding) .dataset-detail-selector .dataset-toggle::before {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--theme-line-strong);
  content: "";
}

html[data-theme] :is(#public, #multimodel, #coding) .dataset-detail-selector .dataset-toggle:hover {
  border-color: var(--theme-accent) !important;
  background: color-mix(in srgb, var(--theme-accent-soft) 48%, var(--theme-surface)) !important;
}

html[data-theme] :is(#public, #multimodel, #coding) .dataset-detail-selector .dataset-toggle.active {
  border-color: color-mix(in srgb, var(--theme-accent) 62%, var(--theme-line)) !important;
  background: var(--theme-accent-soft) !important;
  color: var(--theme-ink) !important;
  box-shadow: inset 3px 0 0 var(--theme-accent), 0 1px 0 color-mix(in srgb, var(--theme-accent) 18%, transparent);
}

html[data-theme] :is(#public, #multimodel, #coding) .dataset-detail-selector .dataset-toggle.active::before {
  background: var(--theme-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent) 14%, transparent);
}

html[data-theme] #home .home-hero .hero-actions button:not(.primary),
html[data-theme] #home .preview-open-button,
html[data-theme] .leaderboard-rank-control {
  border-color: var(--theme-line-strong) !important;
  background: color-mix(in srgb, var(--theme-surface) 82%, transparent) !important;
  color: var(--theme-ink) !important;
}

html[data-theme="ember"] :is(.theme-toggle, .top-nav .tab.active) {
  box-shadow: inset 0 -2px 0 rgba(233, 99, 67, 0.42) !important;
}

html[data-theme="signal"] :is(.theme-toggle, .top-nav .tab.active) {
  box-shadow: inset 0 -2px 0 #c8df25 !important;
}

html[data-theme="harbor"] :is(.theme-toggle, .top-nav .tab.active) {
  box-shadow: inset 0 -2px 0 #4f8587 !important;
}

@media (max-width: 1640px) and (min-width: 1101px) {
  .figma-top-nav {
    grid-template-columns: 190px minmax(510px, 1fr) auto !important;
    gap: 8px !important;
    padding-inline: 20px !important;
  }

  .figma-top-nav .top-nav .tab {
    gap: 5px !important;
    padding-inline: 7px !important;
    font-size: 12px !important;
  }

  .figma-top-nav .access-session .access-identity {
    width: 168px !important;
    min-width: 168px !important;
  }

  .figma-top-nav :is(.access-session, .access-entry) .access-cta {
    width: 174px !important;
    min-width: 174px !important;
  }
}

@media (max-width: 1100px) {
  .figma-top-nav {
    grid-template-columns: 1fr auto !important;
  }

  .top-nav-actions {
    justify-self: end;
  }

  .figma-top-nav .top-nav.tabs {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .top-nav-actions {
    gap: 6px;
  }

  .theme-toggle {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
  }

  .theme-menu {
    position: fixed;
    top: calc(var(--top-nav-height, 120px) + 8px);
    right: 12px;
    width: min(264px, calc(100vw - 24px));
  }
}

/* Evaluation-key steps in the API Guide hero. */
#api-guide > .figma-page-hero {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px) !important;
  gap: 48px !important;
}

#api-guide .guide-key-steps {
  display: grid;
  width: 100%;
  max-width: 340px;
  justify-self: end;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--theme-line-strong) 78%, transparent);
  border-radius: 10px;
  padding: 20px 22px;
  background: color-mix(in srgb, var(--theme-surface) 82%, transparent);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--theme-ink) 8%, transparent);
}

#api-guide .guide-key-steps-kicker {
  color: var(--theme-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#api-guide .guide-key-steps h2 {
  margin: 0 0 6px;
  color: var(--theme-ink);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
}

#api-guide .guide-key-steps ol {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#api-guide .guide-key-steps li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
}

#api-guide .guide-key-steps li > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--theme-strong);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

#api-guide .guide-key-steps li > div {
  display: grid;
  gap: 3px;
  padding-top: 1px;
}

#api-guide .guide-key-steps li strong {
  color: var(--theme-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

#api-guide .guide-key-steps li p {
  width: auto !important;
  min-height: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  color: var(--theme-muted) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
  text-wrap: wrap !important;
}

@media (max-width: 980px) {
  #api-guide > .figma-page-hero {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  #api-guide .guide-key-steps {
    max-width: 520px;
    justify-self: start;
  }
}

/* Keep Verify and Cancel identical in the evaluation access dialog. */
.access-dialog-actions button {
  width: 96px !important;
  min-width: 96px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 14px !important;
}

/* Public Add/Search smoke test ------------------------------------------ */
.integration-test-backdrop {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(19, 27, 29, 0.48);
  backdrop-filter: blur(5px);
}

.integration-test-dialog {
  display: grid;
  width: min(720px, calc(100vw - 28px));
  max-height: min(860px, calc(100vh - 32px));
  gap: 22px;
  overflow: auto;
  border: 1px solid var(--theme-line);
  border-radius: 10px;
  padding: 28px;
  background: var(--theme-surface);
  color: var(--theme-ink);
  box-shadow: 0 28px 80px rgba(17, 24, 39, 0.24);
}

.integration-test-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
}

.integration-test-head > div {
  display: grid;
  gap: 7px;
}

.integration-test-head span {
  color: var(--theme-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.integration-test-head h2 {
  color: var(--theme-ink);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
}

.integration-test-head p,
.integration-security-note {
  color: var(--theme-muted);
  font-size: 13px;
  line-height: 1.55;
}

.integration-dialog-close {
  width: 36px;
  min-width: 36px;
  height: 36px;
  border-radius: 8px;
  padding: 0;
  font-size: 22px;
  font-weight: 400;
}

.integration-test-form {
  display: grid;
  gap: 16px;
}

.integration-test-form > label,
.integration-auth-grid label,
.integration-advanced label {
  display: grid;
  gap: 7px;
  color: var(--theme-ink);
  font-size: 13px;
  font-weight: 600;
}

.integration-test-form input,
.integration-test-form select {
  height: 44px;
  border-radius: 8px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.integration-auth-grid,
.integration-advanced > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.integration-test-form [hidden] {
  display: none !important;
}

.full-eval-checklist {
  display: grid;
  gap: 16px;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--theme-accent) 28%, var(--theme-line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--theme-accent-soft) 62%, var(--theme-surface));
}

.full-eval-checklist[hidden] {
  display: none !important;
}

.full-eval-checklist-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.full-eval-checklist-head h3 {
  margin: 4px 0 5px;
  color: var(--theme-ink);
  font-size: 17px;
}

.full-eval-checklist-head p {
  max-width: 660px;
  color: var(--theme-muted);
  font-size: 12px;
  line-height: 1.55;
}

.checklist-kicker {
  color: var(--theme-accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}

.checklist-status {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid var(--theme-line);
  border-radius: 999px;
  color: var(--theme-muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.full-eval-checklist[data-complete="true"] {
  border-color: color-mix(in srgb, var(--theme-positive, #149c75) 48%, var(--theme-line));
}

.full-eval-checklist[data-complete="true"] .checklist-status {
  border-color: color-mix(in srgb, var(--theme-positive, #149c75) 48%, var(--theme-line));
  color: var(--theme-positive, #149c75);
}

.full-eval-checklist-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.full-eval-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 70px;
  padding: 12px;
  border: 1px solid var(--theme-line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--theme-surface) 84%, transparent);
  cursor: pointer;
}

.full-eval-check:has(input:checked) {
  border-color: color-mix(in srgb, var(--theme-accent) 48%, var(--theme-line));
  background: color-mix(in srgb, var(--theme-accent-soft) 78%, var(--theme-surface));
}

.full-eval-check input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--theme-accent);
}

.full-eval-check span {
  display: grid;
  gap: 4px;
}

.full-eval-check strong {
  color: var(--theme-ink);
  font-size: 12px;
}

.full-eval-check small {
  color: var(--theme-muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
}

.evaluation-request-form #requestSubmissionGuide {
  margin-top: -4px;
}

.integration-advanced {
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--theme-surface-soft);
}

.integration-advanced summary {
  color: var(--theme-ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.integration-advanced > div {
  margin-top: 14px;
}

.integration-advanced label span {
  color: var(--theme-muted);
  font-size: 11px;
  font-weight: 400;
}

.integration-security-note {
  margin: 0;
  border-left: 3px solid var(--theme-accent);
  padding: 8px 11px;
  background: var(--theme-accent-soft);
}

.integration-test-actions,
.integration-complete-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.integration-test-progress {
  display: grid;
  gap: 20px;
}

.integration-test-progress[hidden] {
  display: none !important;
}

.integration-progress-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--theme-line);
  padding-bottom: 16px;
}

.integration-progress-summary > div {
  display: grid;
  gap: 4px;
}

.integration-progress-summary span:first-child {
  color: var(--theme-muted);
  font-size: 11px;
  text-transform: uppercase;
}

.integration-stage-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.integration-stage-list > div {
  display: grid;
  justify-items: center;
  gap: 7px;
  color: var(--theme-muted);
  font-size: 12px;
  text-align: center;
}

.integration-stage-list i {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--theme-line-strong);
  border-radius: 50%;
  background: var(--theme-surface);
  font-style: normal;
}

.integration-stage-list .active,
.integration-stage-list .done {
  color: var(--theme-ink);
  font-weight: 600;
}

.integration-stage-list .active i {
  border-color: var(--theme-accent);
  box-shadow: 0 0 0 4px var(--theme-accent-soft);
}

.integration-stage-list .done i {
  border-color: #258448;
  background: #258448;
  color: #fff;
}

.integration-stage-list .failed i {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

.integration-live-progress {
  display: grid;
  gap: 8px;
}

.integration-live-progress > div {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--theme-surface-soft);
}

.integration-live-progress i {
  display: block;
  min-width: 3px;
  height: 100%;
  border-radius: inherit;
  background: #258448;
  transition: width 220ms ease;
}

.integration-live-progress p {
  color: var(--theme-muted);
  font-size: 12px;
}

.integration-test-success,
.integration-test-error {
  display: grid;
  gap: 7px;
  border: 1px solid #b9dfc6;
  border-radius: 8px;
  padding: 16px;
  background: #f0faf3;
  color: #176536;
}

.integration-test-error {
  border-color: #efc1bb;
  background: #fff5f3;
  color: var(--danger);
}

.integration-test-success p,
.integration-test-error p {
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .integration-test-dialog {
    padding: 20px 16px;
  }

  .integration-auth-grid,
  .integration-advanced > div {
    grid-template-columns: 1fr;
  }

  .integration-stage-list {
    gap: 4px;
  }

  .integration-stage-list > div {
    font-size: 10px;
  }

  .integration-stage-list i {
    width: 26px;
    height: 26px;
  }
}

/* Evaluation access request -------------------------------------------- */
.evaluation-request-dialog {
  width: min(760px, calc(100vw - 28px));
}

.evaluation-request-success-dialog {
  width: min(460px, calc(100vw - 28px));
  max-height: calc(100vh - 32px);
  overflow: visible;
  padding: 34px 32px 30px;
}

.evaluation-request-success-content {
  display: grid;
  justify-items: center;
  gap: 12px;
  color: var(--theme-ink);
  text-align: center;
}

.evaluation-request-success-content > i {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: #258448;
  color: #fff;
  font-size: 22px;
  font-style: normal;
  font-weight: 700;
}

.evaluation-request-success-content h3 {
  margin: 2px 0 0;
  font-size: 24px;
  font-weight: 650;
}

.evaluation-request-success-content p {
  max-width: 360px;
  margin: 0;
  color: var(--theme-muted);
  font-size: 14px;
  line-height: 1.6;
}

.evaluation-request-success-content .integration-complete-actions {
  justify-content: center;
  margin-top: 6px;
}

.evaluation-request-success-content .integration-complete-actions button {
  min-width: 112px;
}

.evaluation-request-test-state {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  border: 1px solid #e4c986;
  border-radius: 9px;
  padding: 14px 16px;
  background: #fff9e9;
  color: #725416;
}

.evaluation-request-test-state > i,
.evaluation-request-success > i {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #f0d995;
  font-style: normal;
  font-weight: 700;
}

.evaluation-request-test-state > div {
  display: grid;
  gap: 3px;
}

.evaluation-request-test-state p {
  color: inherit;
  font-size: 12px;
  line-height: 1.45;
}

.evaluation-request-test-state.passed {
  border-color: #b9dfc6;
  background: #f0faf3;
  color: #176536;
}

.evaluation-request-test-state.passed > i,
.evaluation-request-success > i {
  background: #258448;
  color: #fff;
}

.evaluation-request-test-state.failed {
  border-color: #efc1bb;
  background: #fff5f3;
  color: var(--danger);
}

.evaluation-request-test-state.failed > i {
  background: #f8ddd8;
}

.evaluation-request-form {
  gap: 20px;
}

.evaluation-request-form [hidden] {
  display: none !important;
}

#requestApiFields {
  display: grid;
  gap: 14px;
}

.evaluation-request-section {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--theme-line);
  padding-top: 18px;
}

.evaluation-request-section h3 {
  color: var(--theme-ink);
  font-size: 16px;
  font-weight: 650;
}

.evaluation-request-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.evaluation-request-type-card {
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 11px !important;
  min-height: 92px;
  border: 1px solid var(--theme-line);
  border-radius: 10px;
  padding: 15px;
  background: var(--theme-surface);
  color: var(--theme-ink) !important;
  cursor: pointer;
}

.evaluation-request-type-card:has(input:checked) {
  border-color: var(--theme-accent);
  background: var(--theme-surface-soft);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-accent) 14%, transparent);
}

.evaluation-request-type-card input {
  width: 18px !important;
  height: 18px !important;
  margin: 2px 0 0;
}

.evaluation-request-type-card span {
  display: grid;
  gap: 6px;
}

.evaluation-request-type-card strong {
  font-size: 13px;
  font-weight: 650;
}

.evaluation-request-type-card small {
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

.existing-key-request {
  display: grid;
  gap: 8px;
  border-left: 3px solid var(--theme-accent);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--theme-surface-soft);
}

.existing-key-request[hidden] {
  display: none !important;
}

.existing-key-request p {
  margin: 0;
  color: var(--theme-muted);
  font-size: 12px;
}

.evaluation-request-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 96px;
  border: 1px solid var(--theme-line-strong);
  border-radius: 8px;
  padding: 11px;
  background: var(--theme-surface);
  color: var(--theme-ink);
  outline: none;
  font: 13px/1.5 Inter, Arial, "Microsoft YaHei", sans-serif;
}

.evaluation-request-form input[readonly] {
  background: var(--theme-surface-soft) !important;
  color: var(--theme-muted) !important;
}

.evaluation-request-confirm {
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px !important;
  color: var(--theme-ink) !important;
  font-weight: 500 !important;
  line-height: 1.45;
}

.evaluation-request-confirm input {
  width: 18px !important;
  height: 18px !important;
  margin: 1px 0 0;
  padding: 0;
}

.evaluation-request-success {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 20px 4px 4px;
  color: var(--theme-ink);
  text-align: center;
}

.evaluation-request-success > i {
  width: 44px;
  height: 44px;
  font-size: 20px;
}

.evaluation-request-success h3 {
  font-size: 24px;
  font-weight: 550;
}

.evaluation-request-success p {
  max-width: 520px;
  color: var(--theme-muted);
  font-size: 14px;
  line-height: 1.55;
}

.evaluation-request-success > div {
  display: grid;
  gap: 5px;
  width: min(100%, 430px);
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  padding: 13px;
  background: var(--theme-surface-soft);
}

.evaluation-request-success > div span {
  color: var(--theme-muted);
  font-size: 11px;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .full-eval-checklist-head {
    display: grid;
  }

  .full-eval-checklist-list {
    grid-template-columns: 1fr;
  }

  .evaluation-request-type-grid {
    grid-template-columns: 1fr;
  }

  .evaluation-request-test-state {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .evaluation-request-test-state > button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

/* External full-run review stays separate from the administrator's own runs. */
#publicationReviewPanel {
  min-width: 0;
}

.review-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
}

.review-table {
  min-width: 1080px;
}

.review-table td {
  vertical-align: top;
}

.review-job-id {
  display: block;
  margin-top: 5px;
  color: var(--theme-muted);
  font-size: 11px;
}

.review-actions {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

.review-decision-meta {
  display: grid;
  gap: 4px;
  color: var(--theme-muted);
  font-size: 12px;
}

/* Final visual alignment: ranks, home track switch, and access dialog. */
:is(#home, #public, #multimodel, #coding) .rank-badge {
  min-width: 24px !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
}

#home .preview-tabs.board-switch.tabs {
  grid-template-columns: repeat(3, 144px) !important;
  gap: 12px !important;
}

#home .preview-tabs.board-switch.tabs button {
  width: 144px !important;
  min-width: 144px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 20px !important;
  gap: 9px !important;
  font-size: 12px !important;
}

.access-dialog-actions {
  align-items: center;
}

.access-dialog-help-link {
  margin-right: auto;
  color: #1769d2;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
}

.access-dialog-help-link:hover {
  color: #0d4fae;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.access-dialog-help-link:focus-visible {
  border-radius: 3px;
  outline: 2px solid color-mix(in srgb, #1769d2 34%, transparent);
  outline-offset: 3px;
}

html[lang="zh-CN"] .site-footer-heading strong,
html[lang="zh"] .site-footer-heading strong {
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", "Source Han Sans SC", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0;
}

@media (max-width: 720px) {
  #home .preview-tabs.board-switch.tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  #home .preview-tabs.board-switch.tabs button {
    width: auto !important;
    min-width: 0 !important;
    padding: 0 10px !important;
  }

  .access-dialog-actions {
    flex-wrap: wrap;
  }

  .access-dialog-help-link {
    width: 100%;
    margin: 0 0 2px;
  }
}

/* Launch-ready empty leaderboards --------------------------------------- */
.leaderboard-coming-soon-row,
.leaderboard-coming-soon-row:hover {
  background: transparent !important;
}

.results-table .leaderboard-coming-soon-row > td {
  height: auto !important;
  border-bottom: 0 !important;
  padding: 0 !important;
  white-space: normal !important;
}

:is(.leaderboard-main-section, .subdataset-detail-table):has(.leaderboard-coming-soon-row) {
  container-type: inline-size;
}

.leaderboard-coming-soon {
  position: sticky;
  left: 0;
  display: flex;
  width: 100cqw;
  max-width: 100%;
  min-height: 238px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  padding: 38px 24px 42px;
  background:
    radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--theme-accent) 12%, transparent), transparent 190px),
    linear-gradient(135deg, color-mix(in srgb, var(--theme-surface-soft) 66%, transparent), color-mix(in srgb, var(--theme-accent-soft) 40%, var(--theme-surface)));
  color: var(--theme-ink);
  text-align: center;
}

.leaderboard-coming-soon::before,
.leaderboard-coming-soon::after {
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--theme-accent) 13%, transparent);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.leaderboard-coming-soon::before {
  width: 260px;
  height: 260px;
  top: -192px;
  left: calc(50% - 130px);
}

.leaderboard-coming-soon::after {
  width: 170px;
  height: 170px;
  right: -114px;
  bottom: -114px;
}

.leaderboard-coming-soon-mark {
  position: relative;
  display: flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 15px;
  border: 1px solid color-mix(in srgb, var(--theme-accent) 28%, var(--theme-line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--theme-surface) 88%, transparent);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--theme-ink) 7%, transparent);
}

.leaderboard-coming-soon-mark i {
  width: 5px;
  border-radius: 3px;
  background: var(--theme-accent);
  opacity: 0.62;
}

.leaderboard-coming-soon-mark i:nth-child(1) { height: 11px; }
.leaderboard-coming-soon-mark i:nth-child(2) { height: 20px; opacity: 0.9; }
.leaderboard-coming-soon-mark i:nth-child(3) { height: 15px; opacity: 0.74; }

.leaderboard-coming-soon-kicker {
  margin-bottom: 8px;
  color: var(--theme-accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.2;
}

.leaderboard-coming-soon strong {
  color: var(--theme-ink) !important;
  font-family: "Segoe UI Variable Display", "Segoe UI", "Microsoft YaHei UI", sans-serif;
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.22;
}

.leaderboard-coming-soon p {
  max-width: 520px;
  margin: 9px 0 0;
  color: var(--theme-muted);
  font-size: 13px;
  line-height: 1.65;
}

.leaderboard-coming-soon.is-compact {
  min-height: 190px;
  padding-top: 30px;
  padding-bottom: 32px;
}

.leaderboard-coming-soon.is-compact .leaderboard-coming-soon-mark {
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
}

#home .home-preview-main .leaderboard-coming-soon {
  min-height: 222px;
}

#home .home-preview-main {
  border: 1px solid var(--theme-line) !important;
  border-radius: 8px !important;
  background: var(--theme-surface) !important;
}

#home .home-board-card {
  min-height: 492px;
}

@media (max-width: 720px) {
  #home .home-board-card {
    min-height: 448px;
  }

  .leaderboard-coming-soon,
  #home .home-preview-main .leaderboard-coming-soon {
    width: 100cqw;
    min-height: 208px;
    padding: 30px 18px 34px;
  }

  .leaderboard-coming-soon strong {
    font-size: 21px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .leaderboard-coming-soon-mark i {
    animation: leaderboard-empty-pulse 1.8s ease-in-out infinite;
    transform-origin: center bottom;
  }

  .leaderboard-coming-soon-mark i:nth-child(2) { animation-delay: 120ms; }
  .leaderboard-coming-soon-mark i:nth-child(3) { animation-delay: 240ms; }
}

@keyframes leaderboard-empty-pulse {
  0%,
  100% { transform: scaleY(0.78); opacity: 0.52; }
  50% { transform: scaleY(1); opacity: 0.92; }
}

/* A cooldown remains clickable so the precise next available time can be shown. */
html[data-theme] button.cooldown-locked,
html[data-theme] button.cooldown-locked:hover {
  border-color: #8a9095 !important;
  background: #8a9095 !important;
  color: #f7f8f8 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  filter: none !important;
}

/* Evaluation submission states need to remain visible beside the primary action. */
.eval-submit-feedback {
  display: grid;
  min-width: min(100%, 360px);
  gap: 7px;
}

.eval-submit-feedback > [hidden] {
  display: none;
}

.eval-submit-feedback .message,
.cooldown-notice,
.eval-readiness {
  display: block;
  border-left: 3px solid var(--theme-line);
  padding: 8px 10px;
  background: color-mix(in srgb, var(--theme-surface) 84%, var(--theme-page));
  color: var(--theme-muted);
  font-size: 12px;
  line-height: 1.45;
}

.eval-submit-feedback .message:empty {
  display: none;
}

.eval-submit-feedback .message[data-tone="success"] {
  border-color: #2d8b68;
  color: #176249;
}

.eval-submit-feedback .message[data-tone="warning"],
.cooldown-notice,
.eval-readiness {
  border-color: #be7c26;
  color: #79501a;
}

.eval-submit-feedback .message[data-tone="error"] {
  border-color: #b84d49;
  color: #963c38;
}

.evaluation-confirmation-dialog {
  width: min(600px, calc(100vw - 28px));
}

.evaluation-confirmation-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.evaluation-confirmation-summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--theme-line);
  padding: 11px 12px;
  background: color-mix(in srgb, var(--theme-surface) 90%, var(--theme-page));
}

.evaluation-confirmation-summary > div:nth-child(4) {
  grid-column: 1 / -1;
}

.evaluation-confirmation-summary dt {
  color: var(--theme-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.evaluation-confirmation-summary dd {
  overflow-wrap: anywhere;
  margin: 0;
  color: var(--theme-ink);
  font-size: 14px;
  font-weight: 600;
}

.evaluation-confirmation-policy {
  margin: 0;
  border-left: 3px solid var(--theme-accent);
  padding: 9px 11px;
  background: color-mix(in srgb, var(--theme-surface) 80%, var(--theme-page));
  color: var(--theme-muted);
  font-size: 13px;
  line-height: 1.5;
}

html[data-theme="nocturne"] .eval-submit-feedback .message,
html[data-theme="nocturne"] .cooldown-notice,
html[data-theme="nocturne"] .eval-readiness,
html[data-theme="nocturne"] .evaluation-confirmation-policy,
html[data-theme="nocturne"] .evaluation-confirmation-summary > div {
  background: #15212b;
}

html[data-theme="nocturne"] .eval-submit-feedback .message[data-tone="success"] {
  color: #82d9b1;
}

html[data-theme="nocturne"] .eval-submit-feedback .message[data-tone="warning"],
html[data-theme="nocturne"] .cooldown-notice,
html[data-theme="nocturne"] .eval-readiness {
  color: #efc575;
}

html[data-theme="nocturne"] .eval-submit-feedback .message[data-tone="error"] {
  color: #f09c98;
}

@media (max-width: 680px) {
  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .eval-submit-feedback {
    min-width: 0;
  }

  .evaluation-confirmation-summary {
    grid-template-columns: 1fr;
  }

  .evaluation-confirmation-summary > div:nth-child(4) {
    grid-column: auto;
  }
}

/* Nocturne: a deliberate low-glare dark treatment for every interactive surface. */
html[data-theme="nocturne"] body {
  background: var(--theme-page) !important;
  color: var(--theme-ink) !important;
}

html[data-theme="nocturne"] .figma-top-nav {
  border-bottom-color: var(--theme-nav-line) !important;
  background: rgba(12, 20, 28, 0.96) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025), 0 14px 34px rgba(0, 0, 0, 0.2) !important;
}

html[data-theme="nocturne"] .figma-top-nav :is(.figma-brand-copy strong, .figma-brand-copy span, .top-nav .tab) {
  color: #dfe6eb !important;
}

html[data-theme="nocturne"] .figma-top-nav :is(.brand-mark, .theme-toggle, .site-language-switch, .access-identity, .access-exit-button) {
  border-color: #2a3c4b !important;
  background: #111b24 !important;
  color: #e7edf1 !important;
}

html[data-theme="nocturne"] .figma-top-nav .top-nav .tab:hover {
  border-color: #334858 !important;
  background: #16222d !important;
}

html[data-theme="nocturne"] .figma-top-nav .top-nav .tab.active,
html[data-theme="nocturne"] .theme-toggle {
  border-color: #5e4239 !important;
  background: #211916 !important;
  color: #fff1ec !important;
}

html[data-theme="nocturne"] :is(.site-language-switch button, .theme-menu button) {
  color: #b9c4cc !important;
}

html[data-theme="nocturne"] .site-language-switch button[aria-pressed="true"] {
  background: #25323d !important;
  color: #ffffff !important;
}

html[data-theme="nocturne"] .theme-menu {
  border-color: #304351 !important;
  background: #101922 !important;
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.46) !important;
}

html[data-theme="nocturne"] .theme-menu button:hover,
html[data-theme="nocturne"] .theme-menu button.active {
  background: #192631 !important;
}

html[data-theme="nocturne"] #home > .home-hero,
html[data-theme="nocturne"] :is(#public, #multimodel, #coding, #run, #benchmark-details, #rules, #api-guide) > .figma-page-hero {
  background: var(--theme-hero) !important;
  box-shadow: 0 0 0 100vmax var(--theme-hero) !important;
}

html[data-theme="nocturne"] :is(
  .home-board-card,
  .track-card,
  .flow-grid article,
  .guide-page-map article,
  .snapshot-card,
  .figma-panel,
  .dataset-section,
  .dataset-card-grid article,
  .rules-panel,
  .rules-mode-section,
  .rule-card-grid article,
  .eligibility-grid article,
  .guide-card,
  .api-contract-section,
  .leaderboard-detail-panel,
  .leaderboard-main-section,
  .capability-chart-card,
  .arena-rank-card,
  .overview-card,
  .summary-card,
  .attribution-panel,
  .breakdown-block,
  .private-result-card,
  .job-stat,
  .result-summary-card
) {
  border-color: #293b4a !important;
  background: linear-gradient(145deg, #131d27 0%, #101820 100%) !important;
  color: var(--theme-ink) !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2) !important;
}

html[data-theme="nocturne"] :is(
  .dataset-option,
  .active-job-card,
  .job-meta-chip,
  .suite-dataset-list,
  .column-selector-menu,
  .active-jobs,
  .current-job-scroll,
  .job-detail,
  .academic-board-empty,
  .leaderboard-coming-soon,
  .empty-state,
  .recent-job-row,
  .result-filter-bar
) {
  border-color: #263947 !important;
  background: #0d151e !important;
  color: var(--theme-ink) !important;
}

html[data-theme="nocturne"] :is(h1, h2, h3, h4, strong, th, label, legend, .text-strong, .job-stat strong) {
  color: var(--theme-ink) !important;
}

html[data-theme="nocturne"] :is(p, small, .muted, .section-subtitle, .hero-description, .job-stat span, .field-help, .result-note) {
  color: var(--theme-muted) !important;
}

html[data-theme="nocturne"] :is(input, select, textarea) {
  border-color: #344b5d !important;
  background: #0b131c !important;
  color: #f2f5f7 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025) !important;
}

html[data-theme="nocturne"] :is(input, textarea)::placeholder {
  color: #718391 !important;
  opacity: 1;
}

html[data-theme="nocturne"] :is(input, select, textarea):focus {
  border-color: #db8063 !important;
  outline: 3px solid rgba(239, 138, 105, 0.18) !important;
  box-shadow: none !important;
}

html[data-theme="nocturne"] :is(input, select, textarea):disabled {
  border-color: #273744 !important;
  background: #121a22 !important;
  color: #778692 !important;
}

html[data-theme="nocturne"] select option {
  background: #101922;
  color: #f0f4f7;
}

html[data-theme="nocturne"] :is(input[type="checkbox"], input[type="radio"]) {
  accent-color: var(--theme-accent);
}

html[data-theme="nocturne"] button:not(.primary):not(.active):not(.cooldown-locked),
html[data-theme="nocturne"] .small-button:not(.primary) {
  border-color: #354a5a !important;
  background: #14202a !important;
  color: #e4eaee !important;
}

html[data-theme="nocturne"] button:not(.primary):not(.active):not(.cooldown-locked):hover,
html[data-theme="nocturne"] .small-button:not(.primary):hover {
  border-color: #4b6578 !important;
  background: #1a2a36 !important;
}

html[data-theme="nocturne"] :is(button.primary, .primary, .access-cta) {
  border-color: #df7455 !important;
  background: #df7455 !important;
  color: #fff8f5 !important;
  box-shadow: 0 8px 22px rgba(223, 116, 85, 0.18) !important;
}

html[data-theme="nocturne"] :is(button.primary, .primary, .access-cta):hover {
  border-color: #ee8768 !important;
  background: #ee8768 !important;
}

html[data-theme="nocturne"] button.cooldown-locked,
html[data-theme="nocturne"] button.cooldown-locked:hover {
  border-color: #4a5158 !important;
  background: #4a5158 !important;
  color: #d8dde1 !important;
}

html[data-theme="nocturne"] :is(table, .leaderboard-table, .private-results-table) {
  border-color: #293b49 !important;
  background: #101820 !important;
  color: var(--theme-ink) !important;
}

html[data-theme="nocturne"] :is(thead, thead tr, thead th) {
  border-color: #344654 !important;
  background: #18242e !important;
  color: #eef3f6 !important;
}

html[data-theme="nocturne"] :is(tbody tr, tbody td) {
  border-color: #263744 !important;
  background-color: #101820 !important;
  color: #d8e0e5 !important;
}

html[data-theme="nocturne"] tbody tr:hover td {
  background-color: #17242e !important;
}

html[data-theme="nocturne"] :is(dialog, .modal, .access-dialog-panel, .integration-test-panel, .evaluation-request-panel) {
  border-color: #344958 !important;
  background: #111a23 !important;
  color: var(--theme-ink) !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.56) !important;
}

html[data-theme="nocturne"] :is(.modal-backdrop, .dialog-backdrop, .access-dialog-backdrop) {
  background: rgba(2, 6, 10, 0.76) !important;
  backdrop-filter: blur(8px);
}

html[data-theme="nocturne"] :is(pre, code, .code-block) {
  border-color: #293d4b !important;
  background: #081018 !important;
  color: #dce8ee !important;
}

html[data-theme="nocturne"] a {
  color: #83b9ee;
}

html[data-theme="nocturne"] a:hover {
  color: #add2f5;
}

html[data-theme="nocturne"] :is(.status-pill, .suite-chip, .mode-tags b) {
  border-color: #3a5060 !important;
  background: #1a2934 !important;
  color: #d7e2e8 !important;
}

html[data-theme="nocturne"] :is(.progress-track, progress) {
  background: #263540 !important;
}

html[data-theme="nocturne"] :is(.progress-fill, progress::-webkit-progress-value) {
  background: var(--theme-accent) !important;
}

html[data-theme="nocturne"] :is(.job-alert, .error-message, .status-error) {
  border-color: rgba(255, 139, 131, 0.35) !important;
  background: rgba(116, 38, 34, 0.26) !important;
  color: #ffb2ac !important;
}

html[data-theme="nocturne"] :is(.success-message, .status-success) {
  border-color: rgba(105, 208, 165, 0.32) !important;
  background: rgba(32, 101, 74, 0.25) !important;
  color: #9be1c2 !important;
}

html[data-theme="nocturne"] ::selection {
  background: rgba(239, 138, 105, 0.38);
  color: #ffffff;
}

/* Optically center partner marks whose source artwork contains wide wordmarks. */
.institution-logo-nju img {
  inset: 50% auto auto 9px !important;
  transform: translateY(-50%);
  transition: opacity 140ms ease !important;
}

.institution-logo-shlab img {
  inset: 50% auto auto 1px !important;
  transform: translateY(-34.5%);
  transition: opacity 140ms ease !important;
}

.institution-card:hover .institution-logo-nju img {
  transform: translateY(-50%);
}

.institution-card:hover .institution-logo-shlab img {
  transform: translateY(-34.5%);
}

/* Keep long evaluator identities from crowding the desktop navigation. */
.figma-top-nav .access-session .access-identity {
  width: 164px !important;
  min-width: 132px !important;
  max-width: 164px;
  justify-content: flex-start;
}

.figma-top-nav .access-session .access-identity strong {
  min-width: 0;
  max-width: 68px !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 1101px) and (max-width: 1640px) {
  .figma-top-nav .access-session .access-identity {
    width: 112px !important;
    min-width: 112px !important;
    justify-content: center;
  }

  .figma-top-nav .access-session .access-identity strong {
    display: none;
  }
}

@media (max-width: 1100px) {
  .figma-top-nav .access-session .access-identity {
    width: 164px !important;
    min-width: 132px !important;
  }

  .figma-top-nav .access-session .access-identity strong {
    display: block;
    max-width: 72px !important;
  }
}

@media (max-width: 720px) {
  .figma-top-nav .access-session .access-identity {
    width: auto !important;
    min-width: 0 !important;
    max-width: none;
  }

  .figma-top-nav .access-session .access-identity strong {
    max-width: 100% !important;
  }
}
