/* Shared brand accents. Status colors (ratings, peers, errors) stay semantic. */
:root {
  --brand: #db1830;
  --brand-hover: #ba1228;
  --brand-pressed: #9e1023;
  --brand-ink: #b9152c;
  --brand-soft: #fff1f3;
  --brand-soft-hover: #fce4e8;
  --brand-line: #efbac3;
  --brand-focus: #db1830;
}

/* Primary actions share a single red family, including their interaction states. */
.salt-release.game-template {
  --torrent-action-bg: var(--brand);
  --torrent-action-hover: var(--brand-hover);
  --torrent-action-pressed: var(--brand-pressed);
  --torrent-action-border: var(--brand);
}
body .series-torrent-download,
.series-tracker .series-torrent-download,
body .category-primary-link,
body .review-form-footer button,
body .review-reply-form > div button[type=submit],
body .dialog-primary,
body .feedback-fields button,
.account-registration-page .registration-submit,
.site-header.site-header--v2 .search-submit {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
body .series-torrent-download:hover,
.series-tracker .series-torrent-download:hover,
body .category-primary-link:hover,
body .review-form-footer button:not(:disabled):hover,
body .review-reply-form > div button[type=submit]:not(:disabled):hover,
body .dialog-primary:hover,
body .feedback-fields button:not(:disabled):hover,
.account-registration-page .registration-submit:not(:disabled):hover,
.site-header.site-header--v2 button.search-submit:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  color: #fff;
}
body .series-torrent-download:active,
body .category-primary-link:active,
.site-header.site-header--v2 .search-submit:active {
  background: var(--brand-pressed);
  border-color: var(--brand-pressed);
}
.salt-release.game-template .torrent-button,
.salt-release.game-template .version-action-buttons .version-torrent-button {
  box-shadow: inset 0 1px 0 #ffffff14, 0 2px 5px #9e102318;
}
.salt-release.game-template .torrent-button:not(:disabled):hover,
.salt-release.game-template .version-action-buttons .version-torrent-button:not(:disabled):hover {
  box-shadow: inset 0 1px 0 #ffffff1f, 0 3px 8px #9e102324;
}
.salt-release.game-template .torrent-button .icon,
body .category-primary-link .icon,
.account-registration-page .registration-submit .icon { color: #fff; }
.salt-release .review-form--sidebar .review-form-footer button::after { background: #fff; }
.salt-release.game-template .release-card .magnet-button:not(:disabled):hover,
.salt-release.game-template .version-action-buttons .version-magnet-button:not(:disabled):hover {
  color: var(--brand-ink);
  background: var(--brand-soft);
  border-color: var(--brand-line);
}
.salt-release.game-template .release-card .magnet-button:not(:disabled):active,
.salt-release.game-template .version-action-buttons .version-magnet-button:not(:disabled):active {
  color: var(--brand-pressed);
  background: var(--brand-soft-hover);
  border-color: var(--brand);
}

/* Active and hovered tabs share the brand color for labels and icons. */
body :is(.tabs, .series-tabs, .community-tabs, .home-tabs) button::after,
body :is(.tabs, .series-tabs, .community-tabs, .home-tabs) button[aria-selected=true]::after,
body .tabs .comments-scroll-link::after,
.salt-release .discussion-panel :is(.review-filters, .review-type-switch) button::after {
  background: var(--brand);
}
body :is(.tabs, .series-tabs, .community-tabs, .home-tabs) button[aria-selected=true],
body :is(.tabs, .series-tabs, .community-tabs, .home-tabs) button[aria-selected]:is(:hover, :focus-visible),
body .tabs .comments-scroll-link:is(:hover, :focus-visible),
.salt-release .discussion-panel :is(.review-filters, .review-type-switch) button:hover {
  color: var(--brand-ink);
}
body :is(.tabs, .series-tabs, .community-tabs, .home-tabs) button[aria-selected=true] :is(.tab-icon, .community-tab-icon, svg),
body :is(.tabs, .series-tabs, .community-tabs, .home-tabs) button[aria-selected]:is(:hover, :focus-visible) :is(.tab-icon, .community-tab-icon, svg),
body .tabs .comments-scroll-link:is(:hover, :focus-visible) .tab-icon { color: var(--brand-ink); }
/* One compact counter style, including the matching comments heading. */
body :is(.media-tab-count, .community-tab-count, .tab-count):not([hidden]),
body .series-tabs button small:not([hidden]),
.salt-release .reviews-heading > .community-tab-count:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex: none;
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  border: 0;
  border-radius: var(--radius-detail);
  color: #5e7180;
  background: #f0f3f5;
  box-shadow: none;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  white-space: nowrap;
  transition: var(--control-transition, background-color .16s ease);
}
body :is(.tabs, .community-tabs) button:is([aria-selected=true], :hover, :focus-visible) :is(.media-tab-count, .community-tab-count, .tab-count),
body .series-tabs button:is([aria-selected=true], :hover, :focus-visible) small,
body .tabs .comments-scroll-link:is(:hover, :focus-visible) :is(.media-tab-count, .community-tab-count) {
  background: var(--brand-soft);
  color: var(--brand-ink);
}
/* A solid counter distinguishes the selected tab from a hovered inactive tab. */
body :is(.tabs, .community-tabs, .home-tabs) button[aria-selected=true] :is(.media-tab-count, .community-tab-count, .tab-count),
body .series-tabs button[aria-selected=true] small {
  background: var(--brand);
  color: #fff;
}
body .review-filters button[aria-pressed=true] { background: var(--brand-soft); color: var(--brand-ink); }
.salt-release .discussion-panel :is(.review-filters, .review-type-switch) button[aria-pressed=true] {
  color: var(--brand-ink);
  background: transparent;
}

/* Selected categories, pagination and the active game in a series. */
.category-page {
  --category-accent: var(--brand-ink);
  --category-hover: var(--brand-soft);
  --category-selected: var(--brand-soft-hover);
}
body .genre-tab[aria-current=page],
body .genre-tab[aria-current=page]:hover { background: var(--brand-soft); color: var(--brand-ink); }
body .catalog-pagination > [aria-current=page] { color: #fff; background: var(--brand); }
body .filter-chip { color: var(--brand-ink); background: var(--brand-soft); }
body .filter-chip:hover { color: var(--brand-pressed); background: var(--brand-soft-hover); }
body .filter-check input { accent-color: var(--brand); }
body .category-view-switch button[aria-pressed=true] { color: var(--brand-ink); }
.game-series .game-series-entry {
  position: relative;
  isolation: isolate;
}
.game-series .game-series-entry::before {
  content: "";
  position: absolute;
  inset: -6px;
  z-index: -1;
  border-radius: var(--radius-surface);
  background: transparent;
  border: 1px solid transparent;
  box-sizing: border-box;
  pointer-events: none;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.game-series .game-series-entry.is-current,
.game-series .game-series-entry[href]:is(:hover, :focus-visible) { background: transparent; box-shadow: none; }
.game-series .game-series-entry.is-current::before {
  background: var(--brand-soft);
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.game-series .game-series-entry[href]:is(:hover, :focus-visible)::before {
  background: var(--brand-soft-hover);
  border-color: var(--brand-line);
  box-shadow: 0 4px 14px #db18301a;
}
.game-series .game-series-entry[href]:focus-visible {
  outline: 2px solid var(--brand-focus);
  outline-offset: 3px;
}
.game-series .game-series-entry[href]:active::before {
  background: #f9d5dc;
  border-color: var(--brand);
  box-shadow: none;
}
.game-series .game-series-entry.is-current .game-series-name { color: #304e62; font-weight: 550; }
.game-series .game-series-entry.is-current .game-series-meta { color: #78828b; }
.game-series .game-series-current {
  padding: 0;
  color: #78828b;
  background: transparent;
  border-radius: 0;
  font-size: inherit;
  font-weight: 400;
}
.game-series .game-series-current::before { width: 4px; height: 4px; background: #ce5260; box-shadow: none; }

/* Neutral navigation on the dark header; red is reserved for active items. */
.site-header.site-header--v2 .header-ranking {
  border-color: #ffffff25;
  background: #ffffff07;
}
.site-header.site-header--v2 .header-ranking strong { color: #e8eef2; }
.site-header.site-header--v2 .header-ranking .header-ranking-icon > .icon { color: #bdcbd4; }
.site-header.site-header--v2 .header-ranking:hover,
.site-header.site-header--v2 .header-ranking[aria-current=page] { background: #ffffff13; border-color: #ffffff45; }
.site-header.site-header--v2 .header-ranking[aria-current=page] .header-ranking-icon > .icon { color: #ff8792; }
.site-header .header-genre-grid a[aria-current=page] { background: var(--brand-soft); color: var(--brand-ink); }
.site-header .header-genre-grid a[aria-current=page] .header-genre-icon { background: var(--brand-soft-hover); }
.site-header .header-genre-grid a[aria-current=page] :is(.icon, small) { color: var(--brand-ink); }
.site-header .search-suggestion:is(:hover, .is-active, :focus-visible) { background: var(--brand-soft); }
.site-header .search-suggestion-title mark { text-decoration-color: var(--brand-line); }

/* Text actions use a restrained accent, while body copy stays graphite. */
body :is(.home-all-releases, .home-panel-more, .home-feed-more, .text-link) { color: var(--brand-ink); }
body .home-feed-more > span { text-decoration-color: var(--brand-line); }
body :is(.home-shortcuts, .home-feed-open, .footer-links, .footer-legal, .breadcrumbs, .feedback-help, .rules-help, .help-aside) a:hover,
body :is(.home-bookmark, .home-genre-link):hover,
body :is(.home-all-releases, .home-panel-more, .home-feed-more, .text-link):hover,
body :is(.game-series, .popular-games) .game-series-entry[href]:is(:hover, :focus-visible) .game-series-name,
body .series-quick-navigation a:hover strong,
body .series-download-heading h2 a:hover { color: var(--brand-ink); text-decoration-color: var(--brand-line); }
body :is(.series-section-links, .series-related-links) a:hover { color: var(--brand-ink); border-color: var(--brand-line); }
.salt-release .release-faq-resources a:hover,
.salt-release .release-faq-resources a:hover .release-faq-resource-index { color: var(--brand-ink); }
.salt-release.game-template #versions .version-expanded-content > .package-files-toggle { color: var(--brand-ink); }
.salt-release.game-template #versions .version-expanded-content > .package-files-toggle:hover { color: var(--brand-pressed); }
.salt-release .version-expanded-description :is(.package-installation, .package-build-features-list) .installation-file-link {
  color: var(--brand-ink);
  text-decoration-color: var(--brand-line);
  transition: color .16s ease, text-decoration-color .16s ease;
}
.salt-release .version-expanded-description :is(.package-installation, .package-build-features-list) .installation-file-link:is(:hover, :focus-visible) {
  color: var(--brand-pressed);
  text-decoration-color: currentColor;
}
.salt-release.game-template :is(#versions, #mods) :is(.package-installation-guide, .package-localization-guide, .package-build-details) {
  --installation-accent: #596b77;
  --installation-tint: #f0f3f5;
  --installation-line: #dfe5e9;
}

/* Override legacy component-specific focus colors without changing focus geometry. */
body :is(a, button, input, textarea, select, summary, [tabindex]):focus-visible { outline-color: var(--brand-focus) !important; }
.site-header.site-header--v2 :is(a, button):focus-visible { outline-color: #ff8792 !important; }
.site-header.site-header--v2 .search:focus-within { border-color: var(--brand-line); box-shadow: 0 0 0 3px #db183014; }
.salt-release .review-form--sidebar .review-composer-body :is(input, textarea):focus,
.account-registration-page .registration-field :is(input, textarea, select):focus-visible {
  border-color: var(--brand-line);
  box-shadow: 0 0 0 3px #db183014;
}

/* A quiet video shortcut follows the metadata; tabs carry the persistent accent. */
.salt-release.game-template .hero-utility { column-gap: 22px; row-gap: 4px; }
.salt-release.game-template .hero-actions .trailer-button {
  min-height: 36px;
  padding: 6px 0;
  gap: 6px;
  border: 0;
  border-radius: var(--radius-control);
  color: #657581;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}
.salt-release.game-template .hero-actions .trailer-button .play-circle {
  width: 16px;
  height: 16px;
  flex: none;
  border: 0;
  color: inherit;
  background: transparent;
}
.salt-release.game-template .hero-actions .trailer-button .play-circle .icon { width: 14px; height: 14px; }
.salt-release.game-template .hero-actions .trailer-button:is(:hover, :focus-visible) {
  color: var(--brand-ink);
  background: transparent;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.salt-release.game-template .hero-actions .trailer-button:active { color: var(--brand-pressed); }

/* Launch hints are light annotations; only the file row receives a pale tint. */
.salt-release.game-template .package-files .file-launch-badge,
.salt-release.game-template .package-files [data-file-launch="folder"] .file-launch-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  color: var(--brand-ink);
  background: transparent;
  border-radius: 0;
  font-weight: 600;
}
.salt-release.game-template .package-files .file-launch-badge::before {
  content: "";
  width: 4px;
  height: 4px;
  flex: none;
  border-radius: var(--radius-round);
  background: currentColor;
}
.salt-release.game-template .package-files .manifest-entry[data-file-launch]:not([data-file-launch="folder"]) { background: var(--brand-soft); }
.salt-release.game-template .package-files [data-file-launch]:not([data-file-launch="folder"]) .file-launch-name > code { color: #293c48; }
.salt-release.game-template .package-files .manifest-tree .manifest-entry.is-file-target {
  background: var(--brand-soft);
  outline-color: var(--brand-line);
}

/* Hovering anywhere on a build summary signals that its title opens details. */
.salt-release.game-template :is(#versions, #mods) .version-title-line :is(strong, .version-title-package) { transition: color .16s ease; }
.salt-release.game-template :is(#versions, #mods) .version-entry .version-summary:is(:hover, :has(.version-toggle:focus-visible)) .version-title-line :is(strong, .version-title-package) {
  color: var(--brand-ink);
}

/* Small interactions use the brand accent rather than the legacy green fallback. */
button:hover { color: var(--brand-ink); }
body :is(.feedback-breadcrumbs, .help-breadcrumbs, .rules-breadcrumbs, .rules-copy, .rules-nav, .release-provenance, .series-card-comments, .account-dialog, .registration-actions) a:is(:hover, :focus-visible),
body :is(.game-information-link, .installation-files-link, .version-guide-link, .version-report-button, .versions-report-link, .review-ask, .review-write, .review-more, .steam-review-toggle, .screenshot-more-toggle, .series-back, .registration-back):is(:hover, :focus-visible),
.account-registration-page .registration-login button:is(:hover, :focus-visible),
.salt-release #review-list .review-entry-actions .review-reply-link:is(:hover, :focus-visible) {
  color: var(--brand-ink);
  text-decoration-color: var(--brand-line);
}
body :is(.review-write, .game-video-main-caption a) { color: var(--brand-ink); }
body :is(.steam-review-toggle, .version-guide-link, .installation-files-link) { color: #596b77; }
.salt-release.game-template .release-card .release-contents-summary { color: #596b77; text-decoration-color: #cfd8dd; }
.salt-release.game-template .release-card .release-contents-summary:is(:hover, :focus-visible) { color: var(--brand-ink); text-decoration-color: var(--brand-line); }
.salt-release.game-template .release-faq summary:is(:hover, :focus-visible),
.salt-release.game-template .release-faq details[open] summary,
.salt-release.game-template .release-faq-resources a:is(:hover, :focus-visible),
.salt-release.game-template .release-faq-resources a:is(:hover, :focus-visible) .icon { color: var(--brand-ink); }

/* Media navigation: brand selection, neutral imagery and readable white overlays. */
body .game-video-play:is(:hover, :focus-visible) { color: #fff; }
body .game-video-play:is(:hover, :focus-visible) .game-video-play-icon { color: var(--brand-ink); background: var(--brand-soft); }
body .game-video-option { color: #293c48; }
body .game-video-option:is(:hover, :focus-visible, .is-active) .game-video-option-copy strong { color: var(--brand-ink); }
body .game-video-option.is-active .game-video-option-thumb { outline: 2px solid var(--brand-line); outline-offset: 2px; }
body .game-video-option-thumb::after { color: #fff; }
body :is(.game-video > a, .game-video-main-caption a):is(:hover, :focus-visible) { color: var(--brand-pressed); }
body .related-game:not(.related-game--featured):is(:hover, :focus-visible) :is(.related-game-details strong, .related-game-arrow) { color: var(--brand-ink); }
body .game-series-title-link:is(:hover, :focus-visible),
body .game-series-title-link:is(:hover, :focus-visible) > .icon { color: var(--brand-ink); }
body .game-series-title-link:is(:hover, :focus-visible) > span { text-decoration-color: var(--brand-line); }

/* The same navigation accent in the header, home feed and series directory. */
.site-header.site-header--v2 :is(.header-genre-grid a, .header-game-pick):is(:hover, :focus-visible) { background: var(--brand-soft); color: var(--brand-ink); }
.site-header.site-header--v2 .header-genre-grid a:is(:hover, :focus-visible) .header-genre-icon { background: var(--brand-soft-hover); }
.site-header.site-header--v2 .header-genre-grid a:is(:hover, :focus-visible) :is(.icon, small) { color: var(--brand-ink); }
body :is(.home-feed-game, .home-feed-packages) a:is(:hover, :focus-visible) strong { color: var(--brand-ink); }
body .home-feed-open > a { color: #71818f; }
body .home-feed-open > a:is(:hover, :focus-visible) { color: var(--brand-ink); }
body .home-bookmark:is(:hover, :focus-visible) { color: var(--brand-ink); background: var(--brand-soft); border-color: var(--brand-line); }
body .home-genre-link:is(:hover, :focus-visible) { color: var(--brand-ink); background: var(--brand-soft); }
body .series-hub-link:is(:hover, :focus-visible) :is(h3, .series-card-arrow),
body .series-edition h3 a:is(:hover, :focus-visible),
body .series-edition-builds > summary:is(:hover, :focus-visible),
body .series-similar-list a:is(:hover, :focus-visible) strong,
body .series-reference-row dd > a:is(:hover, :focus-visible),
body .tracker-copy h3 a:is(:hover, :focus-visible),
body .tracker-builds > summary:is(:hover, :focus-visible) > span:first-child,
body :is(.tracker-single, .tracker-help) > a:is(:hover, :focus-visible),
body .series-search-empty button:is(:hover, :focus-visible),
body .series-report-files a:is(:hover, :focus-visible) strong { color: var(--brand-ink); }
body .series-hub-card:hover { border-color: var(--brand-line); }
body .series-directory .series-load-more:is(:hover, :focus-visible),
body .series-load-more:is(:hover, :focus-visible),
body .series-tracker .series-magnet:is(:hover, :focus-visible) { background: var(--brand-soft); color: var(--brand-ink); border-color: var(--brand-line); }
body .series-card-verification:is(:hover, :focus-visible),
body .series-card-verification:is(:hover, :focus-visible) .series-verification-caption { color: var(--brand-ink); }

/* Selecting a video or a filter is navigation, not a success status. */
body .card-video-toggle[aria-pressed=true],
body .is-list .card-media-tools > [aria-pressed=true] { color: var(--brand-ink); background: var(--brand-soft); border-color: var(--brand-line); }
body .filter-check input:checked + span { color: var(--brand-ink); }
.salt-release.game-template #versions .version-current { color: #78828b; }
.salt-release.game-template #versions .version-current::before { width: 4px; height: 4px; border-radius: var(--radius-round); background: #ce5260; }

/* Copy/share tools and form focus use a light tint instead of green or blue. */
body .share-target-icon { color: #596b77; background: #f0f3f5; }
body .share-target:is(:hover, :focus-visible),
body .share-target:is(:hover, :focus-visible) .share-target-icon { color: var(--brand-ink); }
body .share-target:is(:hover, :focus-visible) .share-target-icon { background: var(--brand-soft); }
.salt-release.game-template .version-expanded-facts .version-hash-copy:is(:hover, :focus-visible, .is-copied) { color: var(--brand-ink); background: var(--brand-soft); }
.salt-release.game-template .release-package-picker:hover { border-color: var(--brand-line); background: var(--brand-soft); }
.salt-release #versions .versions-sort select:hover { border-color: var(--brand-line); }
body :is(.review-sort-control, .tracker-search, .series-search):focus-within { border-color: var(--brand-line); box-shadow: 0 0 0 3px #db183014; }
.salt-release .review-fields input:focus,
.salt-release .review-text-field textarea:focus,
.salt-release .review-reply-form :is(input, textarea):focus,
body .feedback-fields :is(input, textarea, select):focus-visible {
  border-color: var(--brand-line);
  box-shadow: 0 0 0 3px #db183014;
}
.account-registration-page .registration-reveal:is(:hover, :focus-visible) { color: var(--brand-ink); background: var(--brand-soft); }
body .site-not-found-action { color: #fff; background: var(--brand); border-color: var(--brand); }
body .site-not-found-action:is(:hover, :focus-visible) { color: #fff; background: var(--brand-hover); border-color: var(--brand-hover); }
body .site-not-found-action:active { background: var(--brand-pressed); border-color: var(--brand-pressed); }
@media (prefers-reduced-motion: reduce) {
  .game-series .game-series-entry::before,
  .salt-release.game-template .hero-actions .trailer-button .play-circle,
  .salt-release.game-template .installation-file-link,
  .salt-release.game-template :is(#versions, #mods) .version-title-line :is(strong, .version-title-package) { transition: none; }
}
