.guide-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.875rem;
  margin-block: 0.75rem 1.1rem;
}

.guide-jumps a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.guide-section {
  min-width: 0;
  overflow-wrap: anywhere;
  scroll-margin-top: 1rem;
}

.guide-section h3 {
  margin-top: 1.4rem;
}

.guide-section li + li {
  margin-top: 0.45rem;
}

.guide-section > :last-child {
  margin-bottom: 0;
}

.guide-filters {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 0.55rem 0.9rem;
  margin-block: 0.75rem;
}

.guide-filters[hidden],
.guide-table-scroll[hidden],
.guide-table tr[hidden] {
  display: none;
}

.guide-filters label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.22rem;
}

.guide-filters :is(input, select) {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  padding: 0.45rem 0.7rem;
  color: inherit;
  background: var(--surface, Canvas);
  border: 1px solid var(--line, #838a92);
  border-radius: 0.35rem;
  font: inherit;
}

.guide-count {
  grid-column: 1 / -1;
  margin: 0;
}

.guide-table-scroll {
  overflow: auto;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
}

.guide-table :is(th, td) {
  padding: 0.6rem 0.7rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line, #d1d7dd);
  word-break: normal;
  overflow-wrap: anywhere;
}

.guide-table thead th {
  color: var(--accent);
}

.guide-table tbody th {
  width: 24%;
}

#control-buttons tbody th {
  width: 42%;
}

#control-buttons .control-input-step {
  display: inline-block;
}

.guide-cell-label {
  display: none;
}

@media (min-width: 601px) {
  #moves-table thead th:nth-child(2) {
    width: 20%;
  }

  #moves-table thead th:nth-child(3) {
    width: 22%;
  }
}

@media (max-width: 600px) {
  #training-heading,
  #scramble-heading {
    word-break: keep-all;
  }

  #control-buttons {
    font-size: 0.9rem;
  }

  #control-buttons tbody th {
    width: 38%;
  }

  .guide-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-table:not(.guide-compact) thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .guide-table:not(.guide-compact) tbody {
    display: grid;
    gap: 0.65rem;
  }

  .guide-table:not(.guide-compact) tbody tr:not([hidden]) {
    display: grid;
    gap: 0.45rem;
    padding: 0.7rem;
    border: 1px solid var(--line, #d1d7dd);
    border-radius: 0.4rem;
  }

  .guide-table:not(.guide-compact) tbody :is(th, td) {
    width: auto;
    padding: 0;
    border: 0;
  }

  .guide-table:not(.guide-compact) .guide-cell-label {
    display: block;
    color: var(--accent);
    font-size: 0.8em;
    font-weight: 700;
  }

  #moves-table tbody tr:not([hidden]) {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    column-gap: 0.7rem;
  }

  #moves-table tbody :is(th, td:last-child) {
    grid-column: 1 / -1;
  }

  .guide-table.guide-compact :is(th, td) {
    padding-inline: 0.35rem;
  }
}
