:root {
  --qb-black: #000000;
  --qb-text: #111111;
  --qb-muted: #555555;
  --qb-border: #d7d7d7;
  --qb-soft: #f7f7f7;
  --qb-link: #0b2742;
  --qb-link-hover: #174a73;
  --qb-ok: #23743b;

  /* Compatibility aliases used by existing page-specific rules. */
  --bg: #ffffff;
  --panel: #f7f7f7;
  --text: #111111;
  --muted: #555555;
  --blue: #0b2742;
  --blue-bright: #174a73;
  --border: #d7d7d7;
  --ok: #23743b;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  background: transparent;
}

body {
  position: relative;
  z-index: 0;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: transparent;
  color: var(--qb-text);
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100vw;
  height: 100vh;
  background-image: url("/IMG/QB-backdrop.png");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

a {
  color: var(--qb-link);
}

a:hover,
a:focus {
  color: var(--qb-link-hover);
}

header {
  background: #ffffff;
  border-bottom: 1px solid var(--qb-border);
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 22px;
}

.topbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding-top: 18px;
  padding-bottom: 14px;
}

.topbar > a:first-child {
  display: block;
  width: min(620px, 100%);
  text-align: center;
}

.logo {
  display: block;
  width: min(620px, 100%);
  max-width: 100%;
  height: auto;
  max-height: none;
  margin: 0 auto;
  object-fit: contain;
}

.topbar nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

nav a,
.topbar nav a {
  color: var(--qb-black);
  text-decoration: none;
  font-size: .95rem;
}

nav a:hover,
nav a:focus,
.topbar nav a:hover,
.topbar nav a:focus {
  color: var(--qb-link);
}

main {
  padding: 42px 0 60px;
  background: transparent;
}

.hero,
.commands-hero {
  background: var(--qb-soft);
  color: var(--qb-text);
  border: 1px solid var(--qb-border);
  border-radius: 14px;
  padding: 32px;
  margin-bottom: 28px;
  box-shadow: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
strong {
  color: var(--qb-black);
  line-height: 1.2;
}

h1 {
  margin-top: 0;
  font-size: 2.2rem;
}

h2 {
  margin-top: 34px;
}

h3 {
  margin-top: 24px;
}

p,
li,
ol,
ul,
label,
summary {
  color: var(--qb-text);
}

.muted {
  color: var(--qb-muted);
}

.gold {
  color: var(--qb-black);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  background: var(--qb-soft);
  color: var(--qb-text);
  border: 1px solid var(--qb-border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: none;
}

.card h3 {
  margin-top: 0;
}

.button,
a.button {
  display: inline-block;
  background: var(--qb-black);
  color: #ffffff;
  border-color: var(--qb-black);
  text-decoration: none;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 8px;
}

.button:hover,
.button:focus,
a.button:hover,
a.button:focus {
  background: var(--qb-link);
  color: #ffffff;
  border-color: var(--qb-link);
}

code {
  color: var(--qb-text);
  background: #eeeeee;
  padding: 2px 6px;
  border-radius: 5px;
}

.command,
.note,
.help-skip,
.command-launch,
.commands-legend,
.commands-legend-item {
  background: var(--qb-soft);
  color: var(--qb-text);
  border-color: var(--qb-border);
  box-shadow: none;
}

.command {
  border: 1px solid var(--qb-border);
  border-left: 3px solid var(--qb-link);
  border-radius: 9px;
  padding: 12px 14px;
  margin: 8px 0;
}

.note,
.help-skip {
  border-left: 4px solid var(--qb-link);
  padding: 12px 16px;
  margin: 18px 0;
}

/* Some setup-page help-skip callouts intentionally use a dark background. */
.help-skip a,
.help-skip a:visited,
.help-skip a:hover,
.help-skip a:focus {
  color: #ffffff !important;
}

.ok {
  color: var(--qb-ok);
}

.help-jumps a,
.help-jumps a:visited {
  background: var(--qb-black) !important;
  color: #ffffff !important;
  border: 1px solid var(--qb-black) !important;
  box-shadow: none !important;
}

.help-jumps a:hover,
.help-jumps a:focus {
  background: var(--qb-link) !important;
  color: #ffffff !important;
  border-color: var(--qb-link) !important;
}

.commands-nav a {
  background: #ffffff;
  color: var(--qb-link);
  border: 1px solid #bfc3c7;
  box-shadow: none;
}

.commands-nav a:hover,
.commands-nav a:focus {
  background: var(--qb-black);
  color: #ffffff;
  border-color: var(--qb-black);
}

.help-actions a {
  color: var(--qb-link);
}

.help-actions a:hover,
.help-actions a:focus {
  color: var(--qb-link-hover);
}

footer {
  background: #ffffff;
  color: var(--qb-muted);
  border-top: 1px solid var(--qb-border);
  padding: 24px 0 40px;
  font-size: .9rem;
}

footer a,
footer a:visited {
  color: var(--qb-link) !important;
}

footer a:hover,
footer a:focus {
  color: var(--qb-link-hover) !important;
}

ul,
ol {
  padding-left: 22px;
}

/* Commands page */
.commands-hero {
  margin-bottom: 22px;
}

.command-launch {
  margin-bottom: 0;
}

.commands-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.commands-legend-item {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--qb-border);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--qb-muted);
}

.commands-legend-item strong {
  color: var(--qb-text);
}

.commands-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 38px;
}

.commands-nav a {
  margin: 0;
  text-decoration: none;
  border-radius: 8px;
  padding: 7px 11px;
  font-size: .9rem;
}

.command-section {
  margin: 0 0 40px;
  scroll-margin-top: 20px;
  color: var(--qb-text);
}

.command-section .section-heading h2 {
  margin-bottom: 4px;
}

.command-section .section-heading p {
  margin-top: 0;
  color: var(--qb-muted);
}

.command-list {
  margin-top: 14px;
  color: var(--qb-text);
}

.command-item {
  background: #ffffff;
  color: var(--qb-text);
  border: 1px solid var(--qb-border);
  border-left: 3px solid var(--qb-link);
  border-radius: 9px;
  margin: 8px 0;
  overflow: hidden;
  box-shadow: none;
}

.command-item[open] {
  background: #ffffff;
  border-left-color: var(--qb-link-hover);
}

.command-item summary {
  list-style: none;
  cursor: pointer;
  min-height: 58px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto 18px;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  background: #ffffff;
  color: var(--qb-text);
}

.command-item summary::-webkit-details-marker {
  display: none;
}

.command-item summary::after {
  content: "›";
  color: var(--qb-muted);
  font-size: 1.45rem;
  line-height: 1;
  transform: rotate(90deg);
}

.command-item[open] summary::after {
  transform: rotate(-90deg);
  color: var(--qb-link-hover);
}

.command-item summary:hover,
.command-item summary:focus {
  background: var(--qb-soft);
}

.command-item summary:hover .command-text {
  color: var(--qb-link-hover);
}

.command-text {
  font-weight: 700;
  line-height: 1.35;
  color: var(--qb-text);
}

.slot {
  color: var(--qb-text);
}

.summary-badges {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.badge,
.badge-jriver,
.badge-provider {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  white-space: nowrap;
  background: #f0f0f0;
  color: var(--qb-text);
  border: 1px solid #c8c8c8;
}

.command-body {
  border-top: 1px solid var(--qb-border);
  padding: 15px 18px 17px 54px;
  color: var(--qb-text);
}

.variations-title,
.examples-title {
  color: var(--qb-text);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 5px;
}

.examples-title {
  margin-top: 14px;
}

.variations,
.examples {
  margin: 0;
  padding-left: 20px;
  color: var(--qb-text);
}

.variations li,
.examples li {
  margin: 4px 0;
}

.examples li::marker {
  color: var(--qb-link-hover);
}

.command-body .note {
  margin: 14px 0 0;
}

.shuffle-mark,
.shuffle-spacer {
  width: 28px;
  min-width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.shuffle-svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shuffle-mark:not(.shuffle-default) {
  color: var(--qb-black);
}

.shuffle-default {
  border: 1px solid #000000;
  border-radius: 50%;
  background: #000000;
  color: #ffffff;
}

@media (max-width: 720px) {
  .topbar {
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 10px;
  }

  .topbar > a:first-child,
  .logo {
    width: 100%;
  }

  .topbar nav {
    gap: 18px;
  }

  .commands-legend {
    grid-template-columns: 1fr;
  }

  .commands-nav {
    margin-bottom: 30px;
  }

  .command-item summary {
    grid-template-columns: 28px minmax(0, 1fr) 18px;
    gap: 8px;
    padding: 12px;
  }

  .summary-badges {
    grid-column: 2 / 3;
    justify-content: flex-start;
    margin-top: -3px;
  }

  .command-item summary::after {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .command-body {
    padding: 14px 14px 16px 48px;
  }

  .badge-provider {
    display: none;
  }
}

/* Queue Ball dark help-skip text fix v1 */
body .help-skip,
body .help-skip strong,
body .help-skip span,
body .help-skip em,
body .help-skip a,
body .help-skip a:visited,
body .help-skip a:hover,
body .help-skip a:focus {
  color: #ffffff !important;
}

