.versions-section {
  --version-title-share: 54%;
  --version-rating-share: 23%;
  --version-action-share: 23%;
  --version-controls-width: 146px;
  container-type: inline-size;
  scroll-margin-top: 30px;
  margin-top: 64px;
}

.mods-section {
  margin-top: 64px;
}

.versions-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.versions-heading-copy {
  flex: 1 1 180px;
  min-width: 0;
}

.versions-heading h2 {
  color: #121d2b;
  font-size: clamp(28px, 3.4cqw, 34px);
  font-weight: 670;
  line-height: 1.14;
  letter-spacing: -.045em;
}

.versions-heading-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-left: auto;
}

.versions-report-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  min-height: 32px;
  color: #6f7f8c;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.versions-report-link:hover {
  color: #344c5f;
}

.versions-report-link .icon {
  width: 12px;
  height: 12px;
}

.versions-table {
  width: 100%;
  margin-top: 24px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  text-align: left;
}

.version-col-title { width: var(--version-title-share); }
.version-col-rating { width: var(--version-rating-share); }
.version-col-action { width: var(--version-action-share); }

.versions-table .version-expanded[hidden] {
  display: none !important;
}

.version-summary {
  cursor: pointer;
  background: #fff;
}

.version-summary > th,
.version-summary > td {
  padding: 13px 12px;
  border-bottom: 1px solid #e0e7eb;
  background: #fff;
  vertical-align: middle;
  transition: background .16s;
}

.version-entry + .version-entry .version-summary > * {
  border-top: 0;
}

.version-entry.is-open .version-summary > * {
  background: #f6f9fa;
  border-bottom: 0;
}

.version-entry:not(.is-open) .version-summary:hover > * {
  background: #f8fafb;
}

.version-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  text-align: left;
}

.version-toggle:focus-visible {
  outline-offset: 4px;
}

.version-art {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius-detail);
  box-shadow: inset 0 0 0 1px #ffffff36;
}

.version-art--icon {
  flex: 0 0 63px;
  width: 63px;
  height: 63px;
}

.version-art--game {
  background-image: url("assets/salt-chrome-icon.svg");
  background-size: cover;
  background-position: center;
}

.version-art--visual {
  background: radial-gradient(circle at 72% 27%, #ffd786 0 11%, transparent 12%), linear-gradient(145deg, #5c3243 2%, #d47450 58%, #344f65 100%);
}

.version-art--radio {
  background: radial-gradient(circle at 65% 78%, #5795b285, transparent 48%), linear-gradient(145deg, #14263e 5%, #544773 65%, #a45b6a 100%);
}

.version-art .icon {
  width: 30px;
  height: 30px;
  color: #fff;
  stroke-width: 1.6;
  filter: drop-shadow(0 2px 6px #14202f88);
}

.version-identity {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 62px;
}

.version-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  line-height: 1.25;
}

.version-title-line strong {
  color: #172432;
  font-size: 15px;
  font-weight: 720;
  letter-spacing: -.022em;
}

.version-current,
.version-archive {
  display: inline-block;
  padding: 4px 6px 3px;
  border-radius: var(--radius-detail);
  font-size: 9px;
  font-weight: 710;
  line-height: 1;
  white-space: nowrap;
}

.version-current {
  background: #e2eed9;
  color: #3b6c23;
}

.version-archive {
  background: #eef1f4;
  color: #718091;
}

.version-detail {
  display: block;
  margin-top: 5px;
  color: #68798a;
  font-size: 12px;
  font-weight: 460;
  line-height: 1.4;
}

.version-meta-line {
  display: flex;
  align-items: center;
  margin-top: 7px;
}

.version-disclosure {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #667788;
  font-size: 11px;
  font-weight: 480;
  line-height: 1.3;
  white-space: nowrap;
}

.version-toggle[aria-expanded="true"] .version-disclosure {
  color: #667788;
}

.version-toggle:hover .version-disclosure,
.version-toggle:focus-visible .version-disclosure {
  color: #3c6154;
}

.version-toggle:hover .version-disclosure > span,
.version-toggle:focus-visible .version-disclosure > span {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.version-disclosure .icon {
  width: 12px;
  height: 12px;
  transition: transform .18s;
}

.version-toggle[aria-expanded="true"] .version-disclosure .icon {
  transform: rotate(180deg);
}

.version-summary > .version-rating {
  padding-right: 8px;
  padding-left: 8px;
}

.version-summary > .version-action {
  padding-left: 8px;
}

.version-action {
  text-align: right;
}

.version-action-content {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  width: var(--version-controls-width);
  height: 62px;
  min-height: 62px;
}

.version-action-buttons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: var(--version-controls-width);
}

.version-action-buttons :is(button, a) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 115px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #c9d5df;
  border-radius: var(--radius-control);
  background: #fff;
  color: #263949;
  font-size: 12px;
  font-weight: 690;
  white-space: nowrap;
  transition: background .16s, border-color .16s, color .16s;
}

.version-action .version-torrent-button {
  min-width: 101px;
  border-color: #233746;
  background: #233746;
  color: #fff;
}

.version-action .version-magnet-button {
  flex: 0 0 39px;
  width: 39px;
  min-width: 39px;
  padding: 0;
}

.version-action-buttons :is(button, a):hover {
  border-color: #466b54;
  background: #466b54;
  color: #fff;
}

.version-action .icon {
  width: 15px;
  height: 15px;
}

.version-download-size {
  display: block;
  width: 100%;
  color: #667788;
  font-size: 11px;
  font-weight: 450;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  text-align: left;
  white-space: nowrap;
}

.version-rating-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: var(--version-controls-width);
  max-width: 100%;
  height: 62px;
  min-height: 62px;
  margin-left: auto;
}

.version-rating-score {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 38px;
  padding: 3px 0 5px;
}

.version-rating-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}

.version-rating-summary strong {
  color: #2f5f30;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: -.025em;
  line-height: 1.2;
}

.version-rating-summary span {
  color: #788897;
  font-size: 9.5px;
  line-height: 1.2;
  white-space: nowrap;
}

.version-votes {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  min-height: 18px;
}

.version-vote {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 18px;
  color: #667788;
  font-size: 11px;
  font-weight: 450;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.version-vote-count {
  color: #667788;
  font-weight: 450;
}

.version-vote--like .version-vote-count {
  color: #4b7931;
}

.version-vote--dislike .version-vote-count {
  color: #b45452;
}

.version-vote .icon {
  width: 16px;
  height: 16px;
  fill: transparent;
  stroke-width: 2;
  transition: fill .16s ease, color .16s ease, stroke-width .16s ease;
}

.version-vote--like:hover,
.version-vote--like:focus-visible,
.version-vote--like[aria-pressed="true"] {
  color: #4b7931;
}

.version-vote--dislike:hover,
.version-vote--dislike:focus-visible,
.version-vote--dislike[aria-pressed="true"] {
  color: #b45452;
}

.version-vote:hover .icon,
.version-vote:focus-visible .icon,
.version-vote[aria-pressed="true"] .icon {
  fill: currentColor;
  stroke-width: 1.6;
}

:is(.version-rating-track, .series-card-rating-track) {
  display: block;
  flex-shrink: 0;
  height: 7px;
  overflow: hidden;
  border-radius:var(--radius-line);
  background: #dc9690;
  box-shadow: none;
}

:is(.version-rating-fill, .series-card-rating-track > span) {
  display: block;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: linear-gradient(90deg, #448b6c, #79ab68);
  box-shadow: inset -3px 0 0 #fff;
  transition: width .2s;
}

:is(.version-rating-track, .series-card-rating-track)[data-empty="true"] {
  background: #e5edf2;
}

.versions-table .version-expanded > td {
  padding: 0 12px 20px;
  border-bottom: 16px solid transparent;
  background: #f6f9fa;
  background-clip: padding-box;
}

.version-expanded-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) calc(var(--version-action-share) + var(--version-controls-width));
  align-items: start;
  gap: 14px 0;
  padding-top: 16px;
  animation: version-details-in .2s ease-out;
}

.version-expanded-content > p {
  grid-column: 1;
  padding-right: 28px;
  color: #344656;
  font-size: 13px;
  line-height: 1.6;
}

.version-expanded-content dl {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  gap: 10px;
  margin: 0;
}

.version-expanded-content dl > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.version-expanded-content dt {
  margin: 0;
  color: #607281;
  font-size: 11px;
  font-weight: 460;
  line-height: 1.45;
}

.version-expanded-content dd {
  margin: 0;
  color: #394b59;
  font-size: 12px;
  font-weight: 510;
  line-height: 1.45;
}

.version-guide-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  justify-self: start;
  grid-column: 1;
  padding: 0;
  color: #3d6f26;
  font-size: 12px;
  font-weight: 690;
}

.version-guide-link:hover {
  color: #234d13;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@keyframes version-details-in {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.version-guide-link .icon {
  width: 14px;
  height: 14px;
}

.version-report-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.version-report-form label {
  display: grid;
  gap: 6px;
  color: #344656;
  font-size: 13px;
  font-weight: 650;
}

.version-report-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd6de;
  border-radius: var(--radius-control);
  background: #fff;
  color: #22313d;
  font: inherit;
  font-weight: 460;
}

.content-dialog .version-report-note,
.content-dialog .version-report-status {
  color: #758493;
  font-size: 12px;
  line-height: 1.45;
}

.version-report-status:empty {
  display: none;
}

.version-report-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.version-report-actions > button:first-child {
  color: #60717e;
  font-size: 13px;
}

@container (max-width: 780px) {
  .versions-table,
  .versions-table tbody {
    display: block;
  }

  .versions-table colgroup {
    display: none;
  }

  .version-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    border: 1px solid #dce4e9;
    border-radius: var(--radius-surface);
    background: #fff;
  }

  .version-summary > th,
  .version-summary > td {
    padding: 0;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .version-entry + .version-entry .version-summary {
    margin-top: 6px;
  }

  .version-entry.is-open + .version-entry .version-summary {
    margin-top: 18px;
  }

  .version-entry.is-open .version-summary {
    border-bottom: 0;
    border-radius: var(--radius-surface) var(--radius-surface) 0 0;
    background: #f6f9fa;
  }

  .version-entry:not(.is-open) .version-summary:hover {
    background: #f8fafb;
  }

  .version-summary > th {
    grid-column: 1 / -1;
    width: auto;
  }

  .version-toggle {
    min-height: 59px;
  }

  .version-art--icon {
    flex-basis: 59px;
    width: 59px;
    height: 59px;
  }

  .version-identity {
    min-height: 59px;
  }

  .version-rating {
    grid-column: 1;
    grid-row: 2;
  }

  .version-rating-content {
    margin-left: 0;
  }

  .version-action {
    grid-column: 2;
    grid-row: 2;
    text-align: right;
  }

  .versions-table .version-expanded {
    display: block;
  }

  .versions-table .version-expanded > td {
    display: block;
    padding: 4px 14px 20px;
    border: 1px solid #dce4e9;
    border-top: 0;
    border-radius: 0 0 var(--radius-surface) var(--radius-surface);
  }

  .version-expanded-content {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-left: 0;
    padding-top: 16px;
  }

  .version-expanded-content dl {
    grid-column: 1;
    grid-row: auto;
  }

  .version-expanded-content > p,
  .version-guide-link {
    grid-column: 1;
  }

  .version-expanded-content > p {
    padding-right: 0;
  }
}

@container (max-width: 340px) {
  .version-summary {
    grid-template-columns: 1fr;
  }

  .version-art--icon {
    flex-basis: 50px;
    width: 50px;
    height: 50px;
  }

  .version-rating,
  .version-action {
    grid-column: 1;
    grid-row: auto;
  }

  .version-action {
    text-align: left;
  }

  .version-action-content {
    align-items: flex-start;
  }
}

@media (max-width: 900px) {
  .versions-section {
    grid-row: 5;
    margin-top: 56px;
  }

  .mods-section {
    grid-row: 6;
    margin-top: 56px;
  }
}

@media (max-width: 540px) {
  .versions-section {
    margin-top: 48px;
  }

  .mods-section {
    margin-top: 48px;
  }

  .versions-table {
    margin-top: 20px;
  }

  .versions-heading h2 {
    font-size: 27px;
  }

  .version-summary {
    padding: 12px 10px;
  }

  .version-title-line strong {
    font-size: 14px;
  }

  .version-detail {
    font-size: 11px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .version-summary > *,
  .version-disclosure .icon,
  .version-action-buttons :is(button, a) {
    transition: none;
  }

  .version-rating-fill {
    transition: none;
  }

  .version-expanded-content {
    animation: none;
  }
}
