/* Software page: app shortcuts in the hero and a sticky "Jump to" dropdown (built by assets/js/software-nav.js) */

/* Room for the sticky header (66px) and the jump bar when a link lands on a section */
main article.product[id], #mods, #wallpapers, #install-help { scroll-margin-top: 136px; }

/* ---------- Shortcuts at the top ---------- */
.sw-shortcuts { margin-top: 22px; }
.sw-shortcuts-label { font: 700 11.5px/1 var(--mono); color: var(--fg-mute); letter-spacing: .16em; text-transform: uppercase; margin: 0 0 10px; }
.sw-shortcuts-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.sw-shortcut {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 58px;
  border: 1px solid var(--line); border-radius: 12px; color: var(--fg); text-decoration: none;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  transition: border-color .15s, transform .15s, background .15s;
}
.sw-shortcut:hover, .sw-shortcut:focus-visible { border-color: rgba(61,214,208,.55); transform: translateY(-1px); color: var(--fg); }
.sw-shortcut img { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.sw-shortcut-icon { width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--accent); font: 700 15px/1 var(--mono); }
.sw-shortcut-text { display: flex; flex-direction: column; min-width: 0; }
.sw-shortcut-name { font-weight: 650; font-size: 14.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-shortcut-ver { font: 600 11px/1.3 var(--mono); color: var(--fg-mute); }

/* ---------- Sticky "Jump to" bar ---------- */
.sw-jump {
  position: sticky; top: 66px; z-index: 40;
  background: rgba(5,11,12,.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.sw-jump .wrap { display: flex; align-items: center; gap: 12px; min-height: 52px; }
.sw-jump-label { font: 700 11.5px/1 var(--mono); color: var(--fg-mute); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.sw-jump-menu-wrap { position: relative; }
.sw-jump-btn {
  display: inline-flex; align-items: center; gap: 9px; min-height: 38px; padding: 6px 12px;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); color: var(--fg);
  font: 600 14px/1.2 var(--sans); cursor: pointer;
}
.sw-jump-btn:hover, .sw-jump-btn[aria-expanded="true"] { border-color: rgba(61,214,208,.55); }
.sw-jump-btn img { width: 22px; height: 22px; border-radius: 6px; }
.sw-jump-btn .sw-caret { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--fg-dim); margin-left: 2px; transition: transform .15s; }
.sw-jump-btn[aria-expanded="true"] .sw-caret { transform: rotate(180deg); }
.sw-jump-menu {
  position: absolute; left: 0; top: calc(100% + 6px); min-width: 260px; max-height: min(70vh, 520px); overflow-y: auto;
  margin: 0; padding: 6px; list-style: none; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: 0 18px 40px -12px rgba(0,0,0,.7);
}
.sw-jump-menu[hidden] { display: none; }
.sw-jump-menu a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  color: var(--fg); text-decoration: none; font-size: 14.5px;
}
.sw-jump-menu a:hover, .sw-jump-menu a:focus-visible { background: var(--panel); color: var(--fg); outline: none; }
.sw-jump-menu a[aria-current="true"] { background: rgba(61,214,208,.10); color: var(--accent); }
.sw-jump-menu img, .sw-jump-menu .sw-shortcut-icon { width: 24px; height: 24px; border-radius: 6px; font-size: 12px; }
.sw-jump-menu .sw-shortcut-ver { margin-left: auto; padding-left: 12px; }
.sw-jump-sep { height: 1px; margin: 6px 4px; background: var(--line); }
.sw-jump-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1; padding: 2px 0; }
.sw-jump-chips::-webkit-scrollbar { display: none; }
.sw-jump-chips a { flex: none; padding: 6px 10px; border-radius: 999px; border: 1px solid transparent; color: var(--fg-dim); text-decoration: none; font-size: 13px; white-space: nowrap; }
.sw-jump-chips a:hover { color: var(--fg); border-color: var(--line-2); }
.sw-jump-chips a[aria-current="true"] { color: var(--accent); border-color: rgba(61,214,208,.35); background: rgba(61,214,208,.07); }

@media (max-width: 760px) {
  .sw-jump-label, .sw-jump-chips { display: none; }
  .sw-jump-menu-wrap, .sw-jump-btn { width: 100%; }
  .sw-jump-btn { justify-content: flex-start; }
  .sw-jump-btn .sw-caret { margin-left: auto; }
  .sw-jump-menu { right: 0; min-width: 0; }
  .sw-shortcuts-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .sw-shortcut, .sw-jump-btn .sw-caret { transition: none; } }
