/* QB Ranking page (/qb-ranking/). Served on the privacy page's shell, which loads only the site's
   Section and BaseLayout styles: the eyebrow and card looks of the home page (AccordionItem.css)
   are not there, so they are repeated here under qb- names with the site's own values. Colours
   come from the site's variables; red is --signal-negative, as in the Live Trends graphs. Only
   transform and opacity are animated. */

.qb {
  --qb-good: var(--brand-500, #8bf08f);
  --qb-bad: var(--signal-negative, #fa666c);
  --qb-card: color-mix(in srgb, var(--text) 4%, transparent);
  --qb-card-solid: color-mix(in srgb, var(--text) 4%, var(--background));
  --qb-faint: color-mix(in srgb, var(--text) 50%, transparent);
  --qb-grid: color-mix(in srgb, var(--text) 7%, transparent);
  --qb-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --qb-focus: 2px solid var(--brand-500, #8bf08f);
  /* The strip's icons (people, caret, week arrows, funnel, ×): one box, one stroke. Glyphs are
     drawn on a 16-unit grid; the stroke does not scale with the box. */
  --qb-icon: 1rem;
  --qb-icon-stroke: 1.5px;
  color: var(--text);
}
/* Click targets never select their own text: a double-click on a toggle would leave the site's
   white selection block behind it. The tap flash stays the site's green (lab.css, inherited). */
.qb :is(summary, button, .qb-chip, .qb-tab, .qb-sort, [role='option'], .qb-dot, .qb-name) {
  -webkit-user-select: none;
  user-select: none;
}
/* Text that can be selected: the accent green with dark text (AA), not the site's white block. */
.qb ::selection {
  background: var(--brand-500, #8bf08f);
  color: var(--background, #000);
}
/* Until the script has drawn the week: the texts it fills hold their place (no shift), and the
   strip and panel are grey blocks of their final height. No fade of the page itself. */
.qb-pending {
  visibility: hidden;
}
.qb-skel {
  display: grid;
  gap: var(--space-3);
}
.qb-skel > * {
  border-radius: var(--radius-small);
  background: var(--qb-card);
}
.qb-skel_strip {
  height: var(--qb-skel-strip, 6.75rem);
}
.qb-skel_table {
  height: 100vh;
  border: var(--border-width) solid var(--border);
}
/* The site clips <main> (clip-path: inset(0)), which would also cut the QB panel's bottom sheet and
   overlay (fixed) wherever the page is shorter than the screen. The body already clips sideways. */
main:has(> #qb-ranking) {
  clip-path: none;
}
/* The site's .section is display:flex, which beats the hidden attribute. */
.qb [hidden] {
  display: none !important;
}
.qb .qb-section {
  padding-top: var(--space-7);
  padding-bottom: var(--space-7);
}
.qb .qb-intro {
  padding-top: var(--space-5);
  padding-bottom: var(--space-4);
  overflow: clip;
}
.qb .qb-board {
  padding-top: 0;
}
.qb-measure {
  max-width: 62rem;
}
/* The site's container is a column that sizes children to their content with a large gap; here
   children take the full width (wide tables then scroll inside their card) and set their own
   spacing. */
.qb .container {
  align-items: stretch;
  gap: 0;
}
.qb .container > *,
#qb-panel,
.qb-tablecard,
.qb-chart {
  min-width: 0;
}
.qb b {
  color: var(--text);
  font-weight: 600;
}

/* ---- type -------------------------------------------------------------------------------- */
.qb-eyebrow {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  color: var(--text-2);
}
.qb-eyebrow_marker {
  flex: none;
  width: 0.125rem;
  height: 0.625rem;
  background: var(--brand-500);
}
.qb-eyebrow_text,
.qb-kicker,
.qb-weeks_label {
  margin: 0;
  font-family: var(--display-family);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.692;
  letter-spacing: 0.05385em;
  text-transform: uppercase;
}
.qb-eyebrow_seg {
  white-space: nowrap;
}
.qb .qb-byline {
  margin: 0;
  color: var(--text-2);
  font-size: 0.875rem;
}
.qb .qb-h1 {
  margin: 0;
  max-width: none;
}
.qb .qb-h2 {
  margin-top: 0;
  margin-bottom: var(--space-4);
}
.qb .qb-lead {
  margin-top: var(--space-2);
  max-width: 72rem;
  color: var(--text-2);
  font-size: var(--text-large);
  line-height: var(--line-height-large);
  text-wrap: pretty;
}
.qb-kicker {
  color: var(--qb-good);
}
.qb-plain,
.qb-sub {
  color: var(--text-2);
  line-height: var(--line-height-huge);
  text-wrap: pretty;
}
.qb .qb-plain {
  margin-top: var(--space-4);
}
.qb .qb-sub {
  margin-bottom: var(--space-4);
  max-width: 62rem;
}
.qb-note {
  color: var(--text-2);
  font-size: 0.8125rem;
  line-height: 1.6;
  text-wrap: pretty;
}
.qb .qb-note {
  margin-top: var(--space-3);
  max-width: 72rem;
}
.qb-alert {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-small);
  background: var(--qb-card);
}

/* ---- cards ------------------------------------------------------------------------------- */
.qb-card {
  padding: var(--space-3);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-main);
  background: var(--qb-card);
}
.qb .qb-card + .qb-card {
  margin-top: var(--space-3);
}
.qb-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}
.qb .qb-three > .qb-card {
  margin-top: 0;
}
.qb-part {
  border-radius: var(--radius-small);
}
.qb-part p {
  margin: var(--space-2) 0 0;
  color: var(--text-2);
  line-height: var(--line-height-large);
}
@media (width < 56rem) {
  .qb-three {
    grid-template-columns: 1fr;
  }
}
/* Waiting to rise into view (lab-style reveal); only set when the page can watch for it. */
.qb-wait {
  opacity: 0;
}

/* ---- How it works: numbered steps that light up in turn -------------------------------- */
.qb-steps {
  counter-reset: qb-step;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 62rem;
}
.qb-steps li {
  counter-increment: qb-step;
  position: relative;
  margin: 0 0 var(--space-3);
  padding-left: 3rem;
  color: var(--text-2);
  line-height: var(--line-height-huge);
}
.qb-steps li::before,
.qb-steps li::after {
  content: counter(qb-step, decimal-leading-zero);
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--display-family);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.qb-steps li::before {
  color: var(--qb-faint);
}
.qb-steps li::after {
  color: var(--qb-good);
  transform-origin: left center;
  transition:
    opacity 0.35s ease-out,
    transform 0.5s var(--qb-ease);
  transition-delay: calc(var(--qb-i, 0) * 220ms);
}
.qb-steps li:nth-child(2) {
  --qb-i: 1;
}
.qb-steps li:nth-child(3) {
  --qb-i: 2;
}
.qb-steps li:nth-child(4) {
  --qb-i: 3;
}
.qb-steps li:nth-child(5) {
  --qb-i: 4;
}
.qb-steps li:nth-child(6) {
  --qb-i: 5;
}
.qb-steps[data-wait] li::after {
  opacity: 0;
  transform: scale(0.6);
}

/* ---- week chips --------------------------------------------------------------------------- */
.qb-weeks {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.qb-weeks_label {
  color: var(--text-2);
}
.qb-weeks_scroll {
  flex: 1;
  min-width: 0;
  overflow: auto hidden;
  padding: 0.25rem 0.125rem;
  scroll-padding-inline: 0.5rem;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}
.qb-weeks_row {
  position: relative;
  display: flex;
  gap: 0.375rem;
  width: max-content;
}
.qb-chip,
.qb-weeks_mark {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
}
.qb-weeks_mark {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--qb-good);
  transition: transform 0.45s var(--qb-ease);
}
.qb-weeks_mark {
  transition-property: transform, opacity;
}
.qb-weeks_mark[data-off] {
  opacity: 0;
}
.qb-weeks_row[data-still] .qb-weeks_mark {
  transition: none;
}
.qb-chip {
  position: relative;
  z-index: 1;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  border: var(--border-width) solid var(--border);
  background: color-mix(in srgb, var(--brand-500) 5%, transparent);
  color: var(--text-2);
  font: 600 0.875rem / 1 var(--display-family);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: transform 0.16s ease;
}
.qb-chip:hover {
  border-color: var(--qb-good);
  color: var(--text);
}
.qb-chip:active {
  transform: scale(0.94);
}
.qb-chip:focus-visible {
  outline: var(--qb-focus);
  outline-offset: 2px;
}
.qb-chip[aria-selected='true'] {
  border-color: transparent;
  background: transparent;
  color: var(--brand-text, #000);
}
/* The week on a preview page: wider, dashed, "Preview" in it. Chosen, it paints its own green
   (the sliding mark is the width of a plain chip). */
.qb-chip[data-preview] {
  width: auto;
  padding-inline: 0.75rem;
  grid-auto-flow: column;
  gap: 0.375rem;
  border-style: dashed;
}
.qb-chip[data-preview][aria-selected='true'] {
  background: var(--qb-good);
}
.qb-chip_tag {
  font: 600 0.6875rem / 1 var(--display-family);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.qb-weeks_busy {
  position: absolute;
  pointer-events: none;
  inset: auto 0 -0.375rem;
  height: 2px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s;
}
.qb-weeks_busy::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 30%;
  background: var(--qb-good);
  animation: qb-busy 0.9s linear infinite;
}
.qb-weeks[data-busy] .qb-weeks_busy {
  opacity: 1;
}
@keyframes qb-busy {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(340%);
  }
}
.qb-status {
  margin: 0 0 var(--space-3);
  color: var(--text-2);
}
.qb-status:empty {
  display: none;
}
/* Loading and loaded are said to screen readers only (the strip's busy mark shows loading), so the
   line never opens and closes above the panel; an error is shown. */
.qb-status:not([data-tone='error']) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.qb-status[data-tone='error'] {
  color: var(--text);
}
.qb-status[data-tone='error']::before {
  content: '! ';
  color: var(--qb-bad);
  font-weight: 700;
}
#qb-panel {
  transition: opacity 0.25s;
}
#qb-panel[aria-busy='true'] {
  opacity: 0.55;
}

/* ---- numbers that count, and bars around a zero line ------------------------------------- */
.qb-n {
  position: relative;
  display: inline-block;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.qb-n_live {
  position: absolute;
  top: 0;
  right: 0;
  opacity: 0;
}
.qb-n[data-counting] .qb-n_final {
  opacity: 0;
}
.qb-n[data-counting] .qb-n_live {
  opacity: 1;
}
.qb-n[data-tone='pos'] {
  color: var(--qb-good);
}
.qb-n[data-tone='neg'] {
  color: var(--qb-bad);
}
.qb-bar {
  position: relative;
  display: inline-block;
  width: 5.5rem;
  height: 0.5rem;
  vertical-align: middle;
}
.qb-bar::before {
  content: '';
  position: absolute;
  inset: -0.25rem auto -0.25rem 50%;
  width: 1px;
  background: color-mix(in srgb, var(--text) 30%, transparent);
}
.qb-bar_fill {
  position: absolute;
  inset: 0 0 0 50%;
  border-radius: 0 0.25rem 0.25rem 0;
  background: var(--qb-good);
  transform-origin: left center;
}
.qb-bar_fill[data-sign='neg'] {
  background: var(--qb-bad);
}

/* ---- tables -------------------------------------------------------------------------------- */
.qb-tablecard {
  padding: var(--space-2) 0 var(--space-3);
}
.qb-tablecard > .qb-note {
  padding-inline: var(--space-3);
}
.qb .qb-tablenote {
  margin: var(--space-2) 0 0;
}
.qb-tablehead {
  display: flex;
  padding: var(--space-2) var(--space-3) 0;
}
/* The table scrolls sideways inside its card. A fade on the right edge says there is more; it goes
   once the end is reached (qb-ranking.js sets data-end). The end of the table keeps clear of the
   site's back-to-top button (lab.css .lab-top: 3.25rem, 1.25rem from the corner), so the last
   column can always be read. */
.qb-scrollwrap {
  position: relative;
}
.qb-scroll {
  /* Sideways only: nothing (a moving row, a sort) can give it a vertical scrollbar. */
  overflow: auto hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}
.qb-fade {
  position: absolute;
  inset: 0 0 0 auto;
  width: 3.5rem;
  background: linear-gradient(to right, transparent, var(--qb-card-solid) 85%);
  pointer-events: none;
  transition: opacity 0.25s;
}
.qb-scrollwrap[data-end] .qb-fade {
  opacity: 0;
}
.qb-scroll:focus-visible {
  outline: var(--qb-focus);
  outline-offset: -2px;
}
.qb-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}
.qb-table th,
.qb-table td {
  height: 2.375rem;
  padding: 0.25rem 0.625rem;
  border-bottom: var(--border-width) solid var(--border);
  text-align: right;
  white-space: nowrap;
}
.qb-table thead th,
.qb-table thead td {
  height: auto;
  color: var(--text-2);
  font: 600 0.6875rem / 1.3 var(--display-family);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: bottom;
  white-space: normal;
}
.qb-table thead tr:first-child > * {
  padding-top: var(--space-2);
  border-bottom-color: color-mix(in srgb, var(--text) 20%, transparent);
  text-align: center;
}
.qb-table thead tr:first-child > td {
  border-bottom: 0;
}
.qb-table thead tr:first-child:not(:last-child) > * {
  white-space: nowrap;
}
/* On a phone the group names would sit over columns that are scrolled out of sight, leaving an
   empty band; the note under the table gives the units. Headers keep to two lines. */
@media (width < 48rem) {
  .qb-table thead tr:first-child:not(:last-child) {
    display: none;
  }
  .qb-sort span {
    max-width: 9.5rem;
  }
  /* Score sits next to the name here (qb-ranking.js): a shorter bar and tighter cells keep rank,
     name and score inside a phone's width. */
  .qb-table th,
  .qb-table td {
    padding-inline: 0.375rem;
  }
}
/* Big moments has ten columns: on a desktop their headers wrap to three short lines and the cells
   are tighter, so the table fits its card from 1024px on, without sideways scrolling. */
@media (width >= 64rem) {
  .qb-key .qb-sort span {
    max-width: 4.5rem;
  }
  .qb-key th,
  .qb-key td {
    padding-inline: 0.375rem;
  }
}
.qb-table .l {
  text-align: left;
}
.qb-table tbody th {
  font-weight: inherit;
}
.qb-sort {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.25rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  margin: -0.25rem -0.375rem;
  padding: 0.25rem 0.375rem;
  border: 0;
  border-radius: 0.375rem;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-transform: inherit;
  cursor: pointer;
}
th:not(.l) > .qb-sort {
  flex-direction: row-reverse;
}
.qb-sort span {
  max-width: 7.5rem;
}
.qb-sort svg {
  flex: none;
  width: 0.625rem;
  height: 0.625rem;
  margin-bottom: 0.1875rem;
  opacity: 0.3;
  transition:
    transform 0.25s var(--qb-ease),
    opacity 0.16s;
}
.qb-sort:hover {
  color: var(--text);
}
.qb-sort:hover svg {
  opacity: 0.7;
}
.qb-sort:active {
  transform: translateY(1px);
}
.qb-sort:focus-visible {
  outline: var(--qb-focus);
  outline-offset: 0;
}
th[aria-sort] > .qb-sort {
  color: var(--text);
}
th[aria-sort] > .qb-sort svg {
  opacity: 1;
  color: var(--qb-good);
}
th[aria-sort='ascending'] > .qb-sort svg {
  transform: rotate(180deg);
}
.qb-table tbody tr > * {
  background: var(--qb-card-solid);
}
.qb-table tbody tr:is(:hover, :focus-within, .is-lit) > * {
  background: color-mix(in srgb, var(--text) 10%, var(--background));
}
.qb-table tbody tr:is(:hover, :focus-within, .is-lit) > :first-child {
  box-shadow: inset 2px 0 0 var(--qb-good);
}
.qb-name {
  display: flex;
  align-items: center;
  min-height: 2.375rem;
  margin-block: -0.25rem;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.qb-name:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.qb-name:focus-visible {
  outline: var(--qb-focus);
  outline-offset: -2px;
  border-radius: 0.25rem;
}
.qb-team,
.qb-muted {
  color: var(--text-2);
}
.qb-rankcell {
  position: relative;
  color: var(--text-2);
}
.qb-move {
  position: absolute;
  top: 50%;
  left: 0.125rem;
  margin-top: -0.5em;
  font-size: 0.625rem;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
}
.qb-move[data-dir='up'] {
  color: var(--qb-good);
}
.qb-move[data-dir='down'] {
  color: var(--qb-bad);
}
.qb-move.is-flash {
  animation: qb-move 1.4s var(--qb-ease);
}
@keyframes qb-move {
  0% {
    opacity: 0;
    transform: translateY(0.375rem);
  }
  20%,
  70% {
    opacity: 1;
    transform: none;
  }
  100% {
    opacity: 0;
    transform: none;
  }
}
.qb-scorecell {
  font-weight: 700;
}
.qb-scorecell .qb-n {
  min-width: 3.25rem;
  text-align: right;
}
.qb-scorecell .qb-bar {
  width: 8rem;
  margin-right: 0.5rem;
}
@media (width < 48rem) {
  .qb-scorecell .qb-bar {
    width: 3.5rem;
    margin-right: 0.375rem;
  }
  /* Room under the back-to-top button at the end of a sideways scroll. */
  .qb-scroll {
    padding-inline-end: 4.5rem;
  }
  /* A name is a whole-row tap target. */
  .qb-name {
    min-height: 2.75rem;
  }
}
/* The narrowest phones: the score itself must clear the right-edge fade, so its bar goes. */
@media (width < 22.5rem) {
  .qb-scorecell .qb-bar {
    display: none;
  }
}
/* The rank and the name stay put while the rest scrolls sideways. */
.qb-table tbody tr > :nth-child(-n + 2),
.qb-table thead tr:last-child > :nth-child(-n + 2) {
  position: sticky;
  z-index: 1;
}
.qb-table thead tr:last-child > :nth-child(-n + 2) {
  background: var(--qb-card-solid);
}
.qb-table tr > :nth-child(1) {
  left: 0;
  min-width: 2.75rem;
}
.qb-table tbody tr > :nth-child(2),
.qb-table thead tr:last-child > :nth-child(2) {
  left: 2.75rem;
}
.qb-table tbody tr > :nth-child(1),
.qb-table thead tr:last-child > :nth-child(1) {
  width: 2.75rem;
  padding-inline: 0.25rem 0.5rem;
}

/* ---- profiles ------------------------------------------------------------------------------ */
.qb-filter_label {
  color: var(--text-2);
  font: 600 0.8125rem / 1 var(--display-family);
  letter-spacing: 0.05385em;
  text-transform: uppercase;
}
.qb-filter_field {
  position: relative;
  min-width: 0;
}
.qb-filter_input {
  width: 100%;
  height: 2.75rem;
  padding: 0 2.75rem 0 0.875rem;
  border: var(--border-width) solid var(--border);
  border-radius: 0.5rem;
  background: var(--qb-card);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}
.qb-filter_input::placeholder {
  color: var(--qb-faint);
}
.qb-filter_input:hover {
  border-color: color-mix(in srgb, var(--text) 30%, transparent);
}
.qb-filter_input:focus-visible {
  outline: var(--qb-focus);
  outline-offset: 1px;
}
.qb-filter_clear {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  background: none;
  color: var(--text-2);
  cursor: pointer;
}
.qb-filter_clear svg {
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
}
.qb-filter_clear:hover {
  color: var(--text);
}
.qb-filter_clear:active {
  transform: scale(0.9);
}
.qb-filter_clear:focus-visible {
  outline: var(--qb-focus);
  outline-offset: -4px;
}
/* The QB picker's list (qb-ranking.js: combobox and multi-select listbox). */
.qb-pick_pop {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0 calc(-1 * var(--space-2));
  padding: 0.25rem var(--space-2) 0;
  border-top: var(--border-width) solid var(--border);
}
.qb-pick_list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.qb-pick_opt {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border-radius: 0.375rem;
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
}
.qb-pick_opt.is-active {
  background: color-mix(in srgb, var(--text) 8%, transparent);
  box-shadow: inset 2px 0 0 var(--qb-good);
  color: var(--text);
}
.qb-pick_opt[aria-selected='true'] {
  color: var(--text);
  font-weight: 600;
}
.qb-pick_rank {
  min-width: 1.25rem;
  text-align: right;
  color: var(--qb-good);
  font-family: var(--display-family);
  font-variant-numeric: tabular-nums;
}
.qb .qb-pick_none {
  margin: 0;
  padding: 0.75rem;
  color: var(--text-2);
}
.qb-profiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: var(--space-2);
}
@media (width < 56rem) {
  .qb-profiles {
    grid-template-columns: 1fr;
  }
}
.qb-prof {
  position: relative;
  padding: var(--space-3);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-small);
  background: var(--qb-card);
  transition: transform 0.3s var(--qb-ease);
}
/* A chosen QB's card: the same green edge as his table row. */
.qb-prof.is-picked {
  border-color: color-mix(in srgb, var(--brand-500) 55%, transparent);
  box-shadow: inset 3px 0 0 var(--brand-500);
}
.qb-prof::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--brand-500) 70%, transparent),
    0 0 1.5rem color-mix(in srgb, var(--brand-500) 22%, transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.qb-prof:is(:hover, :focus-within) {
  transform: translateY(-3px);
}
.qb-prof:is(:hover, :focus-within)::after {
  opacity: 1;
}
.qb-prof:focus-visible {
  outline: var(--qb-focus);
  outline-offset: 3px;
}
.qb-prof.is-flash::after {
  animation: qb-flash 1.8s ease-out;
}
@keyframes qb-flash {
  0%,
  45% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
.qb-prof h3 {
  margin: 0;
  font: 600 1.0625rem / 1.25 var(--display-family);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.qb-prof h3 .qb-team {
  margin-left: 0.375rem;
  font-weight: 500;
}
.qb .qb-prof_type {
  margin: var(--space-2) 0 var(--space-2);
  line-height: 1.4;
}
.qb-prof_text {
  margin: 0;
  color: var(--text-2);
  font-size: 0.875rem;
  line-height: 1.55;
}
.qb-parts {
  display: grid;
  gap: 0.375rem;
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
}
.qb-parts li {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) 3.25rem;
  align-items: center;
  gap: var(--space-2);
}
.qb-parts .qb-bar {
  width: 100%;
}
.qb-parts_label {
  color: var(--text-2);
}
.qb-parts .qb-n {
  justify-self: end;
  font-weight: 600;
}
.qb-week {
  margin-top: var(--space-3);
  border-top: var(--border-width) solid var(--border);
}
.qb-week summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem var(--space-2);
  min-height: 2.75rem;
  padding-block: 0.5rem;
  list-style: none;
  cursor: pointer;
  font: 600 0.8125rem / 1.3 var(--display-family);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.qb-week summary::-webkit-details-marker {
  display: none;
}
.qb-week summary:hover .qb-week_head {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.qb-week summary:active .qb-week_icon {
  transform: translateY(1px) rotate(90deg);
}
.qb-week summary:focus-visible {
  outline: var(--qb-focus);
  outline-offset: 2px;
  border-radius: 0.25rem;
}
.qb-week_move {
  margin-left: auto;
  font-size: 0.75rem;
}
.qb-week_move[data-dir='up'] {
  color: var(--qb-good);
}
.qb-week_move[data-dir='down'] {
  color: var(--qb-bad);
}
.qb-week_move[data-dir='same'] {
  color: var(--text-2);
}
.qb-week_icon {
  flex: none;
  width: 0.75rem;
  height: 0.75rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  transform: rotate(90deg);
  transition: transform 0.32s var(--qb-ease);
}
.qb-week[open] .qb-week_icon {
  transform: rotate(-90deg);
}
.qb-week_body {
  padding-bottom: var(--space-2);
  font-size: 0.875rem;
}
.qb-week_line {
  margin: 0 0 0.375rem;
  color: var(--text-2);
}
.qb-week_list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.qb-week_list li {
  position: relative;
  padding: 0.1875rem 0 0.1875rem 1.125rem;
}
.qb-week_sign {
  position: absolute;
  top: 0.375rem;
  left: 0;
  font-size: 0.625rem;
  color: var(--qb-faint);
}
.qb-week_sign[data-good='true'] {
  color: var(--qb-good);
}
.qb-week_sign[data-good='false'] {
  color: var(--qb-bad);
}
.qb-tag {
  display: inline-block;
  margin-left: 0.375rem;
  padding: 0 0.4375rem;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-round);
  color: var(--text-2);
  font: 600 0.6875rem / 1.5 var(--display-family);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.qb .qb-week_carry {
  margin: 0.25rem 0 0;
  color: var(--text-2);
  font-size: 0.8125rem;
}
.qb .qb-week_none {
  margin: var(--space-3) 0 0;
  padding-top: var(--space-2);
  border-top: var(--border-width) solid var(--border);
  color: var(--text-2);
  font-size: 0.8125rem;
}

/* ---- charts -------------------------------------------------------------------------------- */
.qb .qb-chart {
  margin: var(--space-4) 0 0;
}
.qb-chart_plot {
  position: relative;
}
.qb-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  font-family: var(--display-family);
}
.qb-grid line {
  stroke: var(--qb-grid);
  stroke-width: 1;
}
.qb-axis {
  fill: var(--text-2);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.qb-axis-title {
  fill: var(--text-2);
  font-family: var(--primary-family);
  font-size: 12px;
}
.qb-quad {
  fill: var(--qb-faint);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.qb-avg {
  stroke: color-mix(in srgb, var(--text) 45%, transparent);
  stroke-width: 1;
  stroke-dasharray: 5 4;
  transform-box: fill-box;
  transition: transform 0.7s var(--qb-ease);
}
.qb-avg-x {
  transform-origin: center bottom;
}
.qb-avg-y {
  transform-origin: left center;
}
.qb-chart svg[data-wait] .qb-avg-x {
  transform: scaleY(0);
}
.qb-chart svg[data-wait] .qb-avg-y {
  transform: scaleX(0);
}
.qb-dot {
  outline: none;
  cursor: pointer;
  transition:
    transform 0.7s var(--qb-ease),
    opacity 0.2s;
}
.qb-chart svg[data-still] .qb-dot {
  transition: opacity 0.2s;
}
.qb-dot_core {
  transform-box: fill-box;
  transform-origin: center;
  transition:
    transform 0.45s var(--qb-ease) var(--qb-d, 0ms),
    opacity 0.3s ease-out var(--qb-d, 0ms);
}
.qb-chart svg[data-wait] .qb-dot_core {
  opacity: 0;
  transform: scale(0);
}
.qb-dot_mark {
  stroke: var(--background);
  stroke-width: 1.25;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.2s var(--qb-ease);
}
.qb-dot[data-tone='pos'] .qb-dot_mark {
  fill: var(--qb-good);
}
.qb-dot[data-tone='neg'] .qb-dot_mark {
  fill: var(--background);
  stroke: var(--qb-bad);
  stroke-width: 2;
}
.qb-dot_ring {
  fill: none;
  stroke: var(--text);
  stroke-width: 1.5;
  opacity: 0;
  transition: opacity 0.2s;
}
.qb-dot_label {
  fill: var(--text);
  font-family: var(--primary-family);
  font-size: 11px;
  paint-order: stroke;
  stroke: var(--background);
  stroke-width: 3px;
  stroke-linejoin: round;
  pointer-events: none;
}
/* An enlarged dot (active, lit, chosen or focused) moves its name out with it: the ring's outer
   edge is at 12px, the name then starts at 18px (6px clear), in step with the dot's scale. */
.qb-dot_label {
  transition: transform 0.2s var(--qb-ease);
}
.qb-dot:is(.is-active, .is-lit, .is-picked, :focus-visible) .qb-dot_label {
  transform: translateX(var(--qb-label-out, 8px));
}
/* Names moved off by the overlap pass (qb-ranking.js placeLabels). */
.qb-dot_label[data-off] {
  display: none;
}
.qb-chart svg[data-narrow] .qb-dot_label {
  display: none;
}
.qb-chart svg[data-active] .qb-dot:not(.is-active, .is-lit) {
  opacity: 0.25;
}
.qb-dot:is(.is-active, .is-lit) .qb-dot_mark {
  transform: scale(1.6);
}
.qb-dot:is(.is-active, .is-lit, :focus-visible) .qb-dot_ring {
  opacity: 1;
}
.qb-dot:focus-visible .qb-dot_ring {
  stroke: var(--qb-good);
  stroke-width: 2;
}
.qb-dot:active .qb-dot_mark {
  transform: scale(1.3);
}
.qb-tip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  min-width: 11rem;
  padding: 0.5rem 0.75rem;
  border: var(--border-width) solid color-mix(in srgb, var(--text) 20%, transparent);
  border-radius: 0.5rem;
  background: var(--dark-800, #19191e);
  font-size: 0.8125rem;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.qb-tip.is-on {
  opacity: 1;
}
.qb-tip_name {
  display: block;
  font-weight: 600;
}
.qb-tip_rank {
  display: block;
  color: var(--text-2);
}
.qb-tip_row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
}
.qb-tip_row > span:first-child {
  color: var(--text-2);
}

/* ---- compact top, glow -------------------------------------------------------------------- */
/* The site's own green glow (the Live Trends card's corner gradient), behind the title. */
.qb-glow {
  background: radial-gradient(
    ellipse 55% 140% at 0% 0%,
    color-mix(in srgb, var(--brand-500) 12%, transparent),
    transparent 100%
  );
  animation: qb-glow 1.4s ease-out both;
}
@keyframes qb-glow {
  from {
    opacity: 0;
  }
}
.qb-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem var(--space-3);
  margin-bottom: var(--space-2);
}
@media (width < 48rem) {
  /* On a phone the byline has its own line, a clear step under the eyebrow. */
  .qb-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
}
.qb-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--space-3);
}

/* ---- (i) buttons: the method panel, and the notes by each heading ------------------------- */
.qb-infobtn,
.qb-i {
  display: inline-grid;
  grid-auto-flow: column;
  place-items: center;
  gap: 0.5rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-round);
  background: color-mix(in srgb, var(--brand-500) 5%, transparent);
  color: var(--text-2);
  font: 600 0.8125rem / 1 var(--display-family);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.16s ease;
}
.qb-infobtn,
.qb-i-text {
  padding: 0 1rem 0 0.75rem;
}
.qb-infobtn {
  color: var(--text);
}
.qb-infobtn:hover,
.qb-i:hover {
  border-color: var(--qb-good);
  color: var(--text);
}
.qb-infobtn:active,
.qb-i:active {
  transform: scale(0.95);
}
.qb-infobtn:focus-visible,
.qb-i:focus-visible {
  outline: var(--qb-focus);
  outline-offset: 2px;
}
.qb-i[aria-expanded='true'] {
  border-color: var(--qb-good);
  color: var(--qb-good);
}
.qb-i_icon {
  width: 1.125rem;
  height: 1.125rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}
.qb-infobtn .qb-i_icon {
  color: var(--qb-good);
}
.qb-i_dot {
  fill: currentColor;
}
.qb-panehead {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.qb .qb-panehead .qb-h2 {
  margin: 0;
}
.qb .qb-notes {
  margin: 0 0 var(--space-3);
}
.qb .qb-notes > .qb-note {
  margin-top: 0;
}
.qb .qb-notes > .qb-note + .qb-note {
  margin-top: var(--space-2);
}

/* ---- the method panel: a sheet from the right (full screen on a phone) -------------------- */
.qb-info {
  inset: 0 0 0 auto;
  width: min(46rem, 100%);
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: var(--space-4) var(--space-5) var(--space-6);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 0;
  border-left: var(--border-width) solid var(--border);
  background: var(--dark-800, #19191e);
  color: var(--text);
}
.qb-info::backdrop {
  background: rgb(0 0 0 / 0.6);
  backdrop-filter: blur(4px);
}
/* The page behind stays where it is while the panel is open. */
:root:has(.qb-info[open]) {
  overflow: hidden;
}
.qb-info_close {
  position: sticky;
  top: 0;
  z-index: 1;
  float: right;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: var(--space-2);
  padding: 0;
  border: var(--border-width) solid var(--border);
  border-radius: 50%;
  background: var(--dark-800, #19191e);
  color: var(--text);
  cursor: pointer;
}
.qb-info_close svg {
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
}
.qb-info_close:hover {
  border-color: var(--qb-good);
}
.qb-info_close:active {
  transform: scale(0.94);
}
.qb-info_close:focus-visible {
  outline: var(--qb-focus);
  outline-offset: 2px;
}
.qb .qb-info_h2 {
  margin-top: var(--space-6);
}
.qb-info .qb-three {
  grid-template-columns: 1fr;
}
@media (width < 48rem) {
  .qb-info {
    width: 100%;
    padding-inline: var(--space-3);
    border-left: 0;
  }
}

/* ---- control strip: weeks and section tabs, sticky under the site header --------------------- */
.qb-strip {
  position: sticky;
  top: var(--qb-top, 0px);
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.25rem;
  margin: 0 calc(-1 * var(--site-margin)) var(--space-3);
  padding: var(--space-2) var(--site-margin) 0;
  border-bottom: var(--border-width) solid var(--border);
  /* Opaque: nothing scrolled under it shows through. */
  background: var(--background);
}
.qb-strip .qb-weeks {
  padding-bottom: 0.125rem;
}
.qb-tabs {
  position: relative;
  display: flex;
  gap: 0.25rem;
  justify-self: start;
}
.qb-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 0.875rem;
  border: 0;
  border-radius: 0.5rem 0.5rem 0 0;
  background: none;
  color: var(--text-2);
  font: 600 0.8125rem / 1 var(--display-family);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}
.qb-tab:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 5%, transparent);
}
.qb-tab:active .qb-tab_icon {
  transform: translateY(1px);
}
.qb-tab:focus-visible {
  outline: var(--qb-focus);
  outline-offset: -2px;
}
.qb-tab[aria-selected='true'] {
  color: var(--text);
}
.qb-tab_icon {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.qb-tab[aria-selected='true'] .qb-tab_icon {
  color: var(--qb-good);
}
.qb-ic-bar,
.qb-ic-person,
.qb-ic-dot {
  transform-box: fill-box;
  transform-origin: center bottom;
}
.qb-ic-person,
.qb-ic-dot {
  transform-origin: center;
}
.qb-ic-dot {
  fill: currentColor;
  stroke: none;
}
.qb-ic-hand {
  transform-box: view-box;
  transform-origin: 10px 10px;
}
.qb-tabs_mark {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100px;
  height: 2px;
  background: var(--qb-good);
  transform-origin: left center;
  transition: transform 0.4s var(--qb-ease);
}
.qb-tabs[data-still] .qb-tabs_mark {
  transition: none;
}
/* Phones: the strip stays one compact sticky block (weeks, then tabs); the tabs share the width,
   icons over short labels so all four fit. */
@media (width < 48rem) {
  .qb-tabs {
    justify-self: stretch;
  }
  .qb-tab {
    flex: 1 1 0;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    min-height: 3.25rem;
    padding: 0.25rem 0.125rem;
    font-size: 0.6875rem;
    letter-spacing: 0.03em;
  }
}

/* ---- the top three ranks get the green badge --------------------------------------------- */
.qb-rankcell[data-podium] .qb-n {
  display: inline-grid;
  place-items: center;
  min-width: 1.625rem;
  height: 1.625rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand-500) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand-500) 45%, transparent);
  color: var(--qb-good);
  font-weight: 700;
}

/* Touch screens keep 44px rows and names; mice get denser rows. */
@media (pointer: coarse) {
  .qb-table tbody > tr > * {
    height: 2.75rem;
  }
  .qb-name {
    min-height: 2.75rem;
  }
}

/* ---- week row: icon label, ‹ ›, chips that fade where more are hidden, the chosen-QB chip ---- */
.qb-weeks_label {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  flex: none;
}
.qb-weeks_scroll {
  flex: 0 1 auto;
}
.qb-weeks_scroll[data-more-left],
.qb-weeks_scroll[data-more-right] {
  mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 var(--qb-fade-l, 0px),
    #000 calc(100% - var(--qb-fade-r, 0px)),
    transparent 100%
  );
}
.qb-weeks_scroll[data-more-left] {
  --qb-fade-l: 2rem;
}
.qb-weeks_scroll[data-more-right] {
  --qb-fade-r: 2rem;
}
.qb-step,
.qb-state {
  flex: none;
  display: inline-grid;
  grid-auto-flow: column;
  place-items: center;
  gap: 0.375rem;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-round);
  background: color-mix(in srgb, var(--brand-500) 5%, transparent);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.16s ease;
}
.qb-step svg,
.qb-state svg,
.qb-who_caret,
.qb-who_btn .qb-tab_icon {
  flex: none;
  width: var(--qb-icon);
  height: var(--qb-icon);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--qb-icon-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.qb-step svg > *,
.qb-state svg > *,
.qb-who_caret > *,
.qb-who_btn .qb-tab_icon > * {
  vector-effect: non-scaling-stroke;
}
.qb-step:hover,
.qb-state:hover {
  border-color: var(--qb-good);
}
.qb-step:active,
.qb-state:active {
  transform: scale(0.94);
}
.qb-step:focus-visible,
.qb-state:focus-visible {
  outline: var(--qb-focus);
  outline-offset: 2px;
}
.qb-step[aria-disabled='true'] {
  opacity: 0.3;
  cursor: default;
}
.qb-step[aria-disabled='true']:hover {
  border-color: var(--border);
}
.qb-step[aria-disabled='true']:active {
  transform: none;
}
@media (width < 48rem) {
  .qb-weeks {
    gap: 0.375rem;
  }
  .qb-weeks_label > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  /* The method button keeps its place top right, icon only (its name stays for screen readers). */
  .qb-infobtn {
    padding: 0;
  }
  .qb-infobtn_label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* Profile cards lay out by their own width (container query), not the window's. */
.qb-prof {
  container-type: inline-size;
}
@container (width < 24rem) {
  .qb-parts li {
    grid-template-columns: 6.5rem minmax(0, 1fr) 3rem;
  }
}

/* The method panel: a bottom sheet on phones. */
@media (width < 48rem) {
  .qb-info {
    inset: auto 0 0 0;
    height: auto;
    max-height: 88dvh;
    padding-top: var(--space-5);
    border-top: var(--border-width) solid var(--border);
    border-radius: var(--radius-main) var(--radius-main) 0 0;
  }
  .qb-info::before {
    content: '';
    position: absolute;
    top: 0.5rem;
    left: 50%;
    width: 2.5rem;
    height: 0.25rem;
    margin-left: -1.25rem;
    border-radius: var(--radius-round);
    background: color-mix(in srgb, var(--text) 25%, transparent);
  }
}

/* ---- the QB choice: a button in the strip, a panel with a multi-select list ------------------ */
.qb-who {
  flex: none;
  display: flex;
  gap: 0.375rem;
  margin-left: auto;
}
.qb-who_btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 16rem;
  height: 2.75rem;
  padding: 0 0.75rem 0 0.875rem;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-round);
  background: color-mix(in srgb, var(--brand-500) 5%, transparent);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.16s ease;
}
.qb-who_btn[data-on] {
  border-color: color-mix(in srgb, var(--brand-500) 60%, transparent);
  background: color-mix(in srgb, var(--brand-500) 12%, transparent);
}
.qb-who_btn .qb-tab_icon {
  flex: none;
}
.qb-who_label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qb-who_more {
  flex: none;
  padding: 0.0625rem 0.4375rem;
  border-radius: var(--radius-round);
  background: var(--brand-500);
  color: var(--background);
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.qb-who_caret {
  transition: transform 0.2s var(--qb-ease);
}
.qb-who_btn[aria-expanded='true'] .qb-who_caret {
  transform: rotate(180deg);
}
.qb-who_btn:hover {
  border-color: var(--qb-good);
}
.qb-who_btn:active {
  transform: scale(0.97);
}
.qb-who_btn:focus-visible {
  outline: var(--qb-focus);
  outline-offset: 2px;
}
.qb-state {
  width: 2.75rem;
}
/* Filter: a round funnel button by the QB button, green-filled while it filters. */
.qb-filter_btn {
  position: relative;
}
/* One green pulse when it first appears (qb-ranking.js introduceFilter). */
.qb-filter_btn.is-pulse::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--brand-500);
  pointer-events: none;
  animation: qb-pulse 0.6s ease-out both;
}
@keyframes qb-pulse {
  from {
    opacity: 0.9;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(1.7);
  }
}
.qb-who {
  position: relative;
}
.qb-filter_tip {
  position: absolute;
  top: calc(100% + 0.375rem);
  right: 0;
  z-index: 3;
  padding: 0.25rem 0.5rem;
  border: var(--border-width) solid color-mix(in srgb, var(--brand-500) 50%, transparent);
  border-radius: 0.375rem;
  background: var(--dark-800, #19191e);
  color: var(--text);
  font-size: 0.8125rem;
  white-space: nowrap;
  pointer-events: none;
}
.qb-filter_drop {
  fill: currentColor;
  stroke: none;
  transform-box: fill-box;
}
:root .qb-filter_btn[aria-pressed='true'] {
  border-color: var(--brand-500);
  background: var(--brand-500);
  color: var(--background);
}
:root .qb-filter_btn[aria-pressed='true']:is(:hover, :active) {
  color: var(--background);
}
.qb-state svg {
  color: var(--qb-good);
}

/* The panel: by the button on wide screens, a bottom sheet on phones. Shown in the top layer
   (popover) where the browser has it; fixed in place either way. */
.qb-pickpanel {
  position: fixed;
  inset: auto;
  z-index: 60;
  width: min(22rem, calc(100vw - 2rem));
  max-height: min(30rem, 70dvh);
  margin: 0;
  padding: var(--space-3);
  border: var(--border-width) solid color-mix(in srgb, var(--text) 20%, transparent);
  border-radius: var(--radius-small);
  background: var(--dark-800, #19191e);
  color: var(--text);
  box-shadow: 0 1rem 2.5rem rgb(0 0 0 / 0.55);
  flex-direction: column;
  gap: var(--space-2);
  overflow: hidden;
}
.qb-pickpanel.is-open {
  display: flex;
}
.qb-pickpanel:not(.is-open) {
  display: none;
}
.qb-pickpanel_head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.qb-pickpanel_done {
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.875rem;
  border: 0;
  border-radius: var(--radius-round);
  background: none;
  color: var(--qb-good);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.qb-pickpanel_done:hover {
  background: color-mix(in srgb, var(--brand-500) 10%, transparent);
}
.qb-pickpanel_done:focus-visible {
  outline: var(--qb-focus);
  outline-offset: -2px;
}
@media (width < 48rem) {
  .qb-pickpanel {
    inset: auto 0 0 0;
    width: auto;
    max-height: 78dvh;
    padding: var(--space-4) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom));
    border-width: var(--border-width) 0 0;
    border-radius: var(--radius-main) var(--radius-main) 0 0;
  }
  .qb-pickpanel::before {
    content: '';
    align-self: center;
    flex: none;
    width: 2.5rem;
    height: 0.25rem;
    margin-top: calc(-1 * var(--space-2));
    border-radius: 1rem;
    background: color-mix(in srgb, var(--text) 25%, transparent);
  }
  .qb-pickpanel::backdrop {
    background: rgb(0 0 0 / 0.5);
  }
}

/* Each option: a box that shows a check when chosen (shape, not colour alone). */
.qb-pick_check {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.125rem;
  height: 1.125rem;
  margin-right: 0.375rem;
  border: 1.5px solid color-mix(in srgb, var(--text) 45%, transparent);
  border-radius: 0.25rem;
}
.qb-pick_check svg {
  width: 0.75rem;
  height: 0.75rem;
  fill: none;
  stroke: var(--background);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(0.6);
  transition:
    opacity 0.15s ease,
    transform 0.15s var(--qb-ease);
}
.qb-pick_opt[aria-selected='true'] .qb-pick_check {
  border-color: var(--qb-good);
  background: var(--qb-good);
}
.qb-pick_opt[aria-selected='true'] .qb-pick_check svg {
  opacity: 1;
  transform: none;
}

/* The chosen QBs as removable chips. */
.qb-picked {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.qb-picked_chip,
.qb-picked_all {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.75rem;
  padding: 0 0.625rem 0 0.75rem;
  border: var(--border-width) solid color-mix(in srgb, var(--brand-500) 50%, transparent);
  border-radius: var(--radius-round);
  background: color-mix(in srgb, var(--brand-500) 10%, transparent);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}
.qb-picked_chip svg {
  width: 0.75rem;
  height: 0.75rem;
  fill: none;
  stroke: var(--qb-good);
  stroke-width: 1.75;
  stroke-linecap: round;
}
.qb-picked_all {
  border-color: var(--border);
  background: none;
  color: var(--text-2);
}
.qb-picked_chip:hover,
.qb-picked_all:hover {
  border-color: var(--qb-good);
}
.qb-picked_chip:focus-visible,
.qb-picked_all:focus-visible {
  outline: var(--qb-focus);
  outline-offset: 2px;
}

/* Above a table while QBs are chosen: how many rows, and the switch to all of them. */
.qb .qb-only {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--space-2);
  margin: 0 0 var(--space-2);
  color: var(--text-2);
  font-size: 0.875rem;
}
.qb-only_btn {
  min-height: 2.75rem;
  padding: 0 0.25rem;
  border: 0;
  background: none;
  color: var(--qb-good);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.qb-only_btn:focus-visible {
  outline: var(--qb-focus);
  outline-offset: 2px;
}
.qb-table tbody tr.is-picked > * {
  background: color-mix(in srgb, var(--brand-500) 10%, var(--background));
}
.qb-table tbody tr.is-picked > :first-child {
  box-shadow: inset 3px 0 0 var(--qb-good);
}

/* Charts with QBs chosen: every dot stays, the rest dim, the chosen get a ring and their name. */
.qb-chart svg[data-picked] .qb-dot:not(.is-picked, .is-active, .is-lit) {
  opacity: 0.3;
}
.qb-dot.is-picked .qb-dot_ring {
  opacity: 1;
}
.qb-dot.is-picked .qb-dot_mark {
  transform: scale(1.4);
}
.qb-chart svg[data-narrow] .qb-dot.is-picked .qb-dot_label {
  display: inline;
}
/* With QBs chosen, only their names show: the rest keep their dots (and the tooltip). */
.qb-chart svg[data-picked] .qb-dot:not(.is-picked) .qb-dot_label {
  display: none;
}
/* A larger, invisible hit area for each dot; the visible dot is unchanged. */
.qb-dot_hit {
  fill: transparent;
  pointer-events: all;
}
.qb-dot.is-picked .qb-dot_label {
  font-weight: 700;
}

/* ---- quiet scrollbars: thin, a muted thumb on a clear track, green while used ----------------
   Every scroll area of the page and the QB panel. The edge fades stay the main "more this way"
   hint; the bars stay for mouse users. */
:is(.qb-scroll, .qb-weeks_scroll, .qb-pick_pop, .qb-info, .qb-detail_scroll, .qb-detail) {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--text) 22%, transparent) transparent;
}
:is(.qb-scroll, .qb-weeks_scroll, .qb-pick_pop, .qb-info, .qb-detail_scroll, .qb-detail):hover {
  scrollbar-color: color-mix(in srgb, var(--brand-500) 55%, transparent) transparent;
}
:is(
  .qb-scroll,
  .qb-weeks_scroll,
  .qb-pick_pop,
  .qb-info,
  .qb-detail_scroll,
  .qb-detail
)::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
:is(
  .qb-scroll,
  .qb-weeks_scroll,
  .qb-pick_pop,
  .qb-info,
  .qb-detail_scroll,
  .qb-detail
)::-webkit-scrollbar-track {
  background: transparent;
}
:is(
  .qb-scroll,
  .qb-weeks_scroll,
  .qb-pick_pop,
  .qb-info,
  .qb-detail_scroll,
  .qb-detail
)::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: color-mix(in srgb, var(--text) 22%, transparent);
}
:is(
    .qb-scroll,
    .qb-weeks_scroll,
    .qb-pick_pop,
    .qb-info,
    .qb-detail_scroll,
    .qb-detail
  )::-webkit-scrollbar-thumb:is(:hover, :active) {
  background: var(--brand-500);
}

/* ---- one button system for the page and the QB panel (qb-panel.css uses it too) -------------
   Round icon buttons: ‹ › × (i) and the week arrows. Pills: chips, Compare, Open profile, Show all,
   Clear all, Done, How it works, How to read this table, the QB button. States are the same for
   all: rest = the site's subtle border; hover and press = green border and green icon or text;
   keyboard focus = the same green ring; chosen (aria-pressed / aria-selected) = green fill or ✓;
   disabled = dimmed. Never a white border. ":root" makes these win over each component's look. */
:root
  :is(
    .qb-step,
    .qb-state,
    .qb-i,
    .qb-info_close,
    .qb-detail_icon,
    .qb-infobtn,
    .qb-who_btn,
    .qb-picked_chip,
    .qb-picked_all,
    .qb-pickpanel_done,
    .qb-only_btn,
    .qb-detail_compare,
    .qb-detail_profile,
    .qb-chip
  ) {
  border: var(--border-width) solid var(--border);
}
:root :is(.qb-pickpanel_done, .qb-only_btn) {
  min-height: 2.75rem;
  padding: 0 1rem;
  border-radius: var(--radius-round);
  text-decoration: none;
}
:root
  :is(
    .qb-step,
    .qb-state,
    .qb-i,
    .qb-info_close,
    .qb-detail_icon,
    .qb-infobtn,
    .qb-who_btn,
    .qb-picked_chip,
    .qb-picked_all,
    .qb-pickpanel_done,
    .qb-only_btn,
    .qb-detail_compare,
    .qb-detail_profile,
    .qb-chip,
    .qb-filter_clear
  ):is(:hover, :active):not([aria-disabled='true'], [aria-selected='true'], [aria-pressed='true']) {
  border-color: var(--brand-500);
  color: var(--brand-500);
}
:root .qb-chip[aria-selected='true']:is(:hover, :active) {
  border-color: var(--brand-500);
}
:root
  :is(
    .qb-step,
    .qb-state,
    .qb-i,
    .qb-info_close,
    .qb-detail_icon,
    .qb-infobtn,
    .qb-who_btn,
    .qb-picked_chip,
    .qb-picked_all,
    .qb-pickpanel_done,
    .qb-only_btn,
    .qb-detail_compare,
    .qb-detail_profile,
    .qb-chip,
    .qb-filter_clear,
    .qb-sort,
    .qb-tab
  ):focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
}
:root :is(.qb-step, .qb-state, .qb-i, .qb-info_close, .qb-detail_icon):focus-visible {
  border-color: var(--brand-500);
  color: var(--brand-500);
}
:root :is(.qb-step, .qb-detail_icon)[aria-disabled='true'],
:root :is(.qb-step, .qb-detail_icon):disabled {
  border-color: var(--border);
  color: var(--text);
  opacity: 0.35;
  cursor: default;
}

@media (prefers-reduced-motion: reduce) {
  .qb *,
  .qb *::before,
  .qb *::after {
    animation: none !important;
    transition: none !important;
  }
  .qb-prof:is(:hover, :focus-within) {
    transform: none;
  }
  .qb-weeks[data-busy] .qb-weeks_busy::after {
    transform: translateX(120%);
  }
}

/* ---- preview banner (preview pages only: the server adds #qb-preview) --------------------------
   Neutral, not green or red: the week is waiting. Dashed edge and a clock say "pending" without
   colour. Above the strip, scrolls away with the page, never over the strip. */
.qb-preview {
  display: none;
}
:root:is([data-qb-preview], :has(#qb-preview)) .qb-preview {
  display: block;
  padding-top: var(--space-4);
}
.qb-preview_in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  min-height: 4.5rem;
  padding: var(--space-2) var(--space-3);
  border: var(--border-width) dashed color-mix(in srgb, var(--text) 45%, transparent);
  border-radius: var(--radius-small);
  background: var(--qb-card-solid);
}
.qb-preview_icon {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.qb-preview_text {
  flex: 1 1 14rem;
  min-width: 0;
}
/* The site trims paragraphs to their cap height (text-box); these lines sit in a box, so not. */
.qb-preview :is(p, b) {
  text-box: normal;
}
.qb-preview_text:focus {
  outline: none;
}
.qb-preview_text:focus-visible {
  outline: var(--qb-focus);
  outline-offset: 4px;
  border-radius: 0.25rem;
}
.qb-preview_title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}
.qb-preview_meta {
  margin: 0;
  color: color-mix(in srgb, var(--text) 75%, transparent);
  font-size: 0.875rem;
  line-height: 1.4;
}
.qb-preview_link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--qb-good);
  font-weight: 600;
  text-underline-offset: 0.2em;
}
.qb-preview_link:focus-visible {
  outline: var(--qb-focus);
  outline-offset: 2px;
}
.qb-preview_actions {
  display: none;
}
/* data-qb-key: set before the first paint when the address holds a review key (index.html). */
:root[data-qb-key] .qb-preview_actions,
.qb-preview_confirm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.qb-preview_confirm {
  flex: 1 1 100%;
}
.qb-preview_confirm p {
  flex: 1 1 16rem;
  margin: 0;
  font-size: 0.9375rem;
}
.qb-preview_error {
  flex: 1 1 100%;
  margin: 0;
  padding-left: 0.75rem;
  border-left: 3px solid var(--signal-negative, #fa666c);
  font-size: 0.9375rem;
}
.qb-preview_error::before {
  content: 'Not done: ';
  font-weight: 700;
}
.qb-preview[data-state='live'] .qb-preview_in {
  border-style: solid;
  border-color: var(--qb-good);
}
@media (width < 48rem) {
  /* Two lines kept for "Replaces the live week N." and "Uploaded …", each on its own: the same
     height before and after they are filled, whatever the font. */
  .qb-preview_meta {
    min-height: 2lh;
  }
  .qb-preview_meta > * {
    display: block;
  }
  .qb-preview_actions {
    flex: 1 1 100%;
  }
  .qb-preview_actions .qb-act {
    flex: 1;
  }
}

/* Action buttons (preview banner, review page): pills in the button system. Primary = green fill
   with dark text; the rest = the subtle border, green on hover. A spinner while sending. */
:root .qb-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1.125rem;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-round);
  background: color-mix(in srgb, var(--brand-500) 5%, transparent);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease;
}
:root .qb-act:is(:hover, :active):not(:disabled, [data-kind='primary']) {
  border-color: var(--brand-500);
  color: var(--brand-500);
}
:root .qb-act[data-kind='primary'] {
  border-color: var(--brand-500);
  background: var(--brand-500);
  color: var(--background, #000);
}
:root .qb-act[data-kind='primary']:is(:hover, :active):not(:disabled) {
  background: color-mix(in srgb, var(--brand-500), white 25%);
}
:root .qb-act:active:not(:disabled) {
  transform: scale(0.97);
}
:root .qb-act:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
}
:root .qb-act:disabled {
  opacity: 0.55;
  cursor: default;
}
.qb-act_spin {
  display: none;
  width: 0.875rem;
  height: 0.875rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: qb-spin 0.7s linear infinite;
}
.qb-act[data-busy] .qb-act_spin {
  display: block;
}
@keyframes qb-spin {
  to {
    transform: rotate(1turn);
  }
}
