* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fff;
  color: #212529;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

a {
  color: #17a2b8;
  text-decoration: none;
}

a:hover {
  color: #117a8b;
  text-decoration: underline;
}

code,
pre {
  background: #eee;
  padding: 1px 3px;
  border-radius: 2px;
  font-family: Consolas, "Liberation Mono", Menlo, monospace;
}

pre {
  overflow: auto;
  padding: 8px;
  white-space: pre;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
}

.masthead {
  margin-bottom: 22px;
  color: #fff;
}

#header-color {
  background-color: #31515d;
}

.top-logo-bar {
  min-height: 70px;
  padding: 16px 18px;
  background-color: #253f49;
  color: #dbe9ea;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}

.institution-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.institution-logo:hover {
  text-decoration: none;
  filter: brightness(1.08);
}

.institution-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.institution-logo-hku img {
  object-fit: contain;
  object-position: center;
}

.institution-logo-buaa img {
  object-fit: contain;
}

.site-heading {
  padding: 50px 0 75px;
}

.flex-box {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  min-height: 100%;
  padding: 15px;
}

.flex-box > div {
  padding: 8px;
  border-radius: 5px;
}

.logo-column {
  flex: 0 0 28%;
  text-align: center;
}

.title-column {
  flex: 1 1 auto;
}

#logo-img {
  display: inline;
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  transition: all 0.6s;
}

#logo-img:hover {
  transform: scale(1.12);
}

#bird-title {
  margin: 0 0 8px;
  color: #a8eee7;
  font-size: 58px;
  line-height: 1.08;
  font-weight: 800;
}

#caption {
  display: block;
  max-width: 760px;
  font-family: Helvetica, sans-serif;
  font-size: 20px;
}

#main {
  font-size: 14px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.col-left,
.col-right {
  padding: 0 15px;
  min-width: 0;
}

.col-left {
  flex: 0 0 41.6667%;
  max-width: 41.6667%;
}

.col-right {
  flex: 0 0 58.3333%;
  max-width: 58.3333%;
}

.list-group {
  margin-bottom: 10px;
}

.list-group-item,
.card {
  position: relative;
  display: block;
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.125);
  background-color: #fff;
  min-width: 0;
}

.list-group-item:first-child {
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

.list-group-item:last-child {
  border-bottom-right-radius: 4px;
  border-bottom-left-radius: 4px;
}

#main h1,
#main h2,
#main h3,
#main h4,
#main h5,
#main h6 {
  margin: 5px 0;
  font-weight: 700;
}

#main h4 {
  font-size: 18px;
  line-height: 1.25;
}

#main h5 {
  font-size: 15px;
  line-height: 1.25;
}

.list-group-item p {
  margin: 5px 0;
}

.example-panel {
  margin: 12px 0 4px;
  padding: 8px;
  border: 1px solid #dce6e8;
  border-radius: 4px;
  background: #f8fbfb;
}

.example-panel img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
}

.citation-note {
  padding: 9px 10px;
  border-left: 4px solid #548865;
  background: #f2f8f4;
  color: #284936;
  font-weight: 600;
}

#introduction {
  font-family: sans-serif;
  font-size: 15px;
}

#button-group {
  width: 100%;
  margin-top: 8px;
}

.button-row {
  width: 80%;
  margin: 0 auto;
  padding: 5px;
}

#button-row-b {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-round {
  width: calc(50% - 5px);
}

.btn-group {
  display: flex;
  width: 100%;
  margin-bottom: 16px;
}

.btn {
  display: inline-block;
  width: 100%;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 3px;
  color: #fff;
  font: inherit;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
  text-transform: none;
  cursor: pointer;
}

.btn-a {
  background-color: #25445c;
}

.btn.btn-pill {
  border-radius: 50px !important;
}

.btn-b {
  background-color: #22736f;
  border-radius: 50px;
}

.btn-d {
  background-color: #5d6cc7;
  border-radius: 50px;
}

.btn-e {
  background-color: #b56f3d;
  border-radius: 50px;
}

.btn-g {
  background-color: #548865;
  border-radius: 50px;
}

.btn-f {
  background-color: #2c7f9a;
  border-color: #2c7f9a;
  border-radius: 3px;
}

.btn-f:not(.active) {
  background-color: #fff;
  color: #333;
  border: 1px solid #2c7f9a;
}

.btn:hover {
  filter: brightness(0.95);
}

.btn-f.active {
  color: #fff;
  font-weight: 500;
}

.scroll-container {
  position: relative;
  width: 100%;
  max-height: 300px;
  overflow-y: auto;
}

.scroll-container::-webkit-scrollbar {
  width: 10px;
  background: transparent;
}

.scroll-container::-webkit-scrollbar-thumb {
  background-color: #fff;
  border-radius: 5px;
}

.scroll-container:hover::-webkit-scrollbar-thumb {
  background-color: #bbb;
}

.date-chip {
  display: inline-block;
  margin-right: 4px;
  padding: 2px 6px;
  border-radius: 5px;
  background-color: #548865;
}

.date-chip strong {
  color: #ffe7ce;
}

ul,
ol {
  padding-left: 22px;
}

li {
  margin: 4px 0;
}

.validator {
  margin-top: 8px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 3px;
  background: #f9f9f9;
}

.validator p {
  font-size: 13px;
}

.validator input {
  display: block;
  margin: 8px 0;
}

output {
  display: block;
  padding: 8px;
  border: 1px solid #c9dff1;
  border-radius: 3px;
  background: #eef7ff;
  color: #155e95;
}

.track-note {
  margin-bottom: 10px;
}

.card-header {
  margin: -12px -14px 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
  background: #eee;
  font-family: "Open Sans", Helvetica, Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: 300;
}

.leaderboard-note {
  margin: 4px 0 8px;
  color: #555;
}

[hidden] {
  display: none !important;
}

.leaderboard-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 4px 0 14px;
}

.view-switch {
  display: inline-flex;
  border: 1px solid #b9cdd2;
  border-radius: 5px;
  overflow: hidden;
}

.view-button {
  padding: 8px 12px;
  border: 0;
  background: #fff;
  color: #31515d;
  font: inherit;
  cursor: pointer;
}

.view-button.active {
  background: #31515d;
  color: #fff;
}

.view-button:focus-visible,
.dialect-picker select:focus-visible {
  outline: 3px solid #17a2b8;
  outline-offset: 2px;
}

.dialect-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #52666e;
}

.dialect-picker select {
  min-width: 138px;
  padding: 8px;
  border: 1px solid #b9cdd2;
  border-radius: 5px;
  background: #fff;
  color: #212529;
  font: inherit;
}

.dialect-table-wrapper {
  padding: 0;
}

.table.dialect-table {
  width: 100%;
  min-width: 0;
  table-layout: auto;
  margin-top: 8px;
}

.table.dialect-table td,
.table.dialect-table th {
  min-width: 0;
  padding: 10px 8px;
  white-space: normal;
}

.dialect-table .model-cell {
  text-align: left;
  width: 58%;
  overflow-wrap: anywhere;
}

.dialect-table .rank-cell {
  width: 42px;
}

.dialect-table .score-cell {
  color: #155e95;
  font-weight: 700;
  white-space: nowrap;
}

.dialect-table .cell-detail {
  line-height: 1.35;
}

.empty-results {
  padding: 20px 8px !important;
  color: #66757c;
  text-align: left !important;
}

.table-wrapper {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
}

.table {
  display: table;
  position: relative;
  width: max-content;
  min-width: 1480px;
  margin: 8px auto 0;
  border-collapse: collapse;
  border-radius: 4px;
}

.table td,
.table th {
  min-width: 82px;
  padding: 0.68em 0.7em;
  border-top: 1px solid #dee2e6;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.table thead th {
  border-bottom: 2px solid #dee2e6;
  background: #e9ecef;
  font-weight: 600;
}

.table tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.035);
}

.rank-1 {
  background: #fff7df;
}

.rank-2 {
  background: #f4f7fb;
}

.rank-3 {
  background: #fff1e8;
}

.rank-cell {
  min-width: 42px;
  font-weight: 700;
}

.model-cell,
.model-head {
  min-width: 170px;
  text-align: left;
}

.avg-cell,
.avg-head {
  color: #155e95;
  font-weight: 700;
}

.cell-main,
.cell-detail {
  display: block;
}

.cell-main {
  line-height: 1.18;
}

.cell-detail {
  margin-top: 4px;
  color: #6c757d;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.1;
}

.avg-cell .cell-detail {
  color: #4f728b;
}

.model-cell .cell-detail {
  color: #627078;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.footer {
  max-width: 1140px;
  margin: 10px auto 0;
  padding: 18px 15px 26px;
  color: #666;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 991px) {
  .col-left,
  .col-right {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .site-heading {
    padding: 30px 0 46px;
  }

  .flex-box {
    flex-direction: column;
    text-align: center;
  }

  .logo-column,
  .title-column {
    flex: 0 0 auto;
    width: 100%;
  }

  #bird-title {
    font-size: 42px;
  }

  #caption {
    margin: 0 auto;
    font-size: 18px;
  }

  .button-row {
    width: 100%;
  }

  .top-logo-bar {
    flex-wrap: wrap;
    justify-content: center;
  }

}
