* {
  box-sizing: border-box;
  user-select: none;
  margin: 0;
  padding: 0;
}

html,
body {
  background: #202428;
  color: #f0f4f8;

  font-family: sans-serif;

  color-scheme: dark;
}

body {
  display: grid;
  grid-template-columns: [sidebar] 320px [content] 1fr;
}

#content {
  grid-column: content;

  padding: 2vh 2vw;

  height: fit-content;
  width: 100%;
}

#content h1 {
  font-size: 2vw;
  font-weight: 700;
}

td,
th {
  border-bottom: 1px solid #808488;
}

td {
  border-left: 1px solid #808488;
}

tr:last-child > * {
  border-bottom: none;
}

th {
  vertical-align: bottom;
  text-align: center;
}

th a {
  color: inherit;
  text-decoration: none;
  width: 100%;
  display: inline-block;
}

table {
  border: 1px solid #808488;
  border-collapse: separate;
  border-spacing: 0;

  width: 100%;
}

table th {
  font-family: monospace;
  font-size: 14px;
  font-weight: 500;
  padding: 8px;

  vertical-align: middle;
  text-align: left;
  width: 25%;

  word-break: break-all;
}

thead > :last-child > th {
  padding: 0;
  font-family: inherit;
}

thead > :first-child > th {
  font-weight: 600;
  text-align: center;
  font-size: 18px;
  padding: 6px;
}

th.sub {
  border-left-width: 8px;
}

#content > .stats {
  width: 100%;
}

.stats {
  display: flex;
  position: relative;
  align-items: center;
  width: 100%;
  height: 22px;

  background: #303438;
}

table .stats {
  width: calc((100vw - 320px - 4vw) * 0.75 - 12px - 2px);
  margin: 0 6px;
}

thead .stats {
  margin: 0;
  width: calc(100vw - 320px - 4vw - 19px);
}

.stats > div {
  height: 100%;
  font-size: 14px;
  line-height: 22px;

  overflow: hidden;
  white-space: nowrap;

  cursor: default;
  transition: all 0.2s;
}

.stats > div > b {
  margin-left: 4px;
}

.stat-node {
  background: #68bc4a;
}

.stat-deno {
  background: #000408;  
}

.stat-bun {
  background: #fbf0df;
  color: #000408;
}

.stat-native {
  background: salmon;
  color: #000408;
}

.no-stat-node #content .stat-node,
.no-stat-deno #content .stat-deno,
.no-stat-bun #content .stat-bun,
.no-stat-native #content .stat-native {
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

.stats > div[style="width: 0%;"] {
  color: #f0f4f8 !important;
}

.stats + table {
  margin-top: 20px;
}

.hidden {
  display: none;
}

.stats.vertical {
  flex-direction: column;
  height: unset;
  align-items: unset;
}

.stats.vertical > div {
  height: 22px;
  overflow: visible;
}

/* .stat:has(+ .stat:hover), .stat:hover + .stat
.stats:not(.vertical):has(div:hover) > div {
  width: 0;
} */

/* .stats:not(.vertical):has(> :hover) > div {
  width: 0 !important;
  padding: 0;
}

.stats:not(.vertical) > div:hover {
  padding-left: 4px;
  position: absolute;
  left: 0;
} */

#sidebar {
  grid-column: sidebar;

  position: sticky;
  top: 0;
  overflow-y: auto;
  height: 100vh;

  background: #101418;
}

#sidebar h1 {
  font-weight: 800;
  font-size: 1.8em;
  margin: 0;
  cursor: pointer;
}

#sidebar h2 {
  font-weight: 500;
  font-size: 0.9em;
  margin: 0;
  margin-top: 6px;
}

#sidebar-contents {
  position: relative;

  min-height: 100vh;

  padding: 24px 12px;
  padding-bottom: calc(24px + 5rem);
}

#sidebar footer {
  position: absolute;
  bottom: 24px;
  left: 12px;
  width: calc(100% - 24px);

  color: #a0a4a8;
  font-size: 0.7em;

  line-height: 1.4em;
}

#sidebar hr {
  border-color: #808488;
  margin: 1em 0;
}

#engines > div {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

#engines > div:not(:last-child) {
  margin-bottom: 4px;
}

#engines input {
  margin-right: 4px;
  vertical-align: baseline;
}

#engines label {
  font-weight: 600;
  font-size: 1em;
  vertical-align: text-top;
}

#engines span {
  font-family: monospace;
  font-weight: 300;
  font-size: 0.9em;
  white-space: pre-wrap;

  margin-left: 6px;
  user-select: all;
}

a {
  color: #b0b4b8;
  /* text-decoration: underline dashed #b0b4b8; */
}

#content details {
  margin-top: 16px;
}

#content table + details {
  margin-top: 36px;
}

#content details summary {
  margin-bottom: 12px;
}

#test262_rev {
  font-family: monospace;
  font-size: 1.2em;
}

#proposals, #editions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
}

#editions {
  margin-top: 12px;
}

#proposals > div, #editions > div {
  width: calc((100vw - 320px - 4vw) / 2 - 24px);
}

#proposals > div > :first-child {

}

#proposals > div > :first-child > a, #editions > div > :first-child > span {
  color: #f0f4f8;
  font-size: 1.2em;
  font-weight: 600;
  text-decoration: none;

  margin-bottom: 2px;
  display: inline-block;
}

#editions > div > :first-child > span {
  margin-bottom: 4px;
}

#proposals > div > :first-child > a > span, #editions > div > :first-child > span > span {
  font-size: 0.7em;
  font-weight: 500;
  margin-left: 6px;
}

#editions > div > :first-child > span > span {
  color: #a0a4a8;
}

#proposals > div > :first-child > :nth-child(2) {
  color: #a0a4a8;
  font-size: 0.8em;
  margin-bottom: 8px;

  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  white-space: pre-wrap;
}

.stage-1 {
  color: #f02c00;
}

.stage-2 {
  color: #f08800;
}

.stage-3 {
  color: #f0c400;
}

.stage-4 {
  color: #bcf000;
}

@media (max-width: 1000px) {
  #proposals {
    grid-template-columns: 1fr;
  }

  #proposals > div, #editions > div {
    width: calc((100vw - 320px - 4vw) / 1 - 24px);
  }
}

#table-options {
  margin-bottom: 12px;
  display: flex;
  gap: 16px;
}

#sidebar h3 {
  vertical-align: baseline;
}

summary > * {
  display: inline;
}

summary h2 {
  vertical-align: middle;
}

#sidebar details {
  margin-bottom: 16px;
}

#sidebar summary {
  margin-bottom: 6px;
  cursor: pointer;
}

summary input {
  vertical-align: middle;
}

#sidebar details > div {
  margin-left: 8px;
}

#sidebar summary {
  list-style: none;
}

#sidebar summary::pointer, #sidebar summary::-webkit-details-marker {
  display: none;
  content: "";
}

#sidebar summary::after {
  content: '◄';
  float: right;
}

#sidebar details[open] summary:after {
  content: " ▼";
}
