.rank-product-picker { position: relative; margin: 16px 0 10px; }
.rank-product-picker summary { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); cursor: pointer; list-style: none; }
.rank-product-picker summary::-webkit-details-marker { display: none; }
.rank-product-picker summary:hover, .rank-product-picker[open] summary { border-color: var(--purple); background: var(--lavender); }
.rank-product-picker summary:focus-visible, .rank-product-menu button:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
#rank-product-logo { display: flex; flex-shrink: 0; }
#rank-product-logo:empty { display: none; }
.rank-product-copy, .rank-option-copy { display: grid; gap: 4px; min-width: 0; }
.rank-product-copy strong { font-size: 16px; }
.rank-product-copy small, .rank-option-copy small { font-size: 12px; color: var(--muted); }
.rank-product-change { display: flex; align-items: center; gap: 7px; margin-left: auto; color: var(--purple); font-size: 12px; font-weight: 650; }
.rank-product-change .icon { width: 16px; height: 16px; transform: rotate(90deg); }
.rank-product-picker[open] .rank-product-change .icon { transform: rotate(-90deg); }
.rank-product-menu { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 5; background: white; border: 1px solid var(--line); border-radius: 16px; padding: 8px; box-shadow: 0 16px 40px #26204426; }
.rank-product-menu > p { font-size: 12px; font-weight: 650; color: var(--muted); padding: 8px 10px 12px; }
.rank-product-menu ul { list-style: none; margin: 0; padding: 0; max-height: min(400px, 55vh); overflow-y: auto; scrollbar-width: thin; }
.rank-product-menu li { margin: 0; padding: 0; }
.rank-product-menu button { display: flex; width: 100%; align-items: center; gap: 12px; border: 0; border-radius: 10px; padding: 12px 10px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.rank-product-menu button:hover, .rank-product-menu button[aria-pressed="true"] { background: var(--lavender); }
.rank-product-menu button:focus-visible { outline-offset: -3px; }
.rank-product-menu .small-logo { width: 38px; height: 38px; flex-shrink: 0; }
.rank-option-copy strong { font-size: 14px; }
.rank-option-total { display: grid; gap: 3px; margin-left: auto; text-align: right; font-size: 13px; font-weight: 650; }
.rank-option-total small { font-weight: 400; font-size: 10px; color: var(--muted); white-space: nowrap; }
.rank-option-check { width: 16px; height: 16px; color: var(--purple); visibility: hidden; flex-shrink: 0; }
[aria-pressed="true"] .rank-option-check { visibility: visible; }
.boost-contribution { margin-top: 26px; }
.boost-contribution > label { display: block; font-size: 15px; font-weight: 650; margin-bottom: 12px; }
.boost-amount-field { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--paper); }
.boost-amount-field:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px #5545ed18; }
.boost-amount-field > span:first-child { font-size: 34px; font-weight: 650; color: var(--purple); }
.vendor-rank .boost-amount-field input { min-width: 0; width: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; outline: none; background: transparent; box-shadow: none; color: var(--ink); font: inherit; font-size: 36px; font-weight: 650; letter-spacing: -.035em; }
.boost-currency { color: var(--muted); font-size: 11px; font-weight: 650; }
.boost-amount-error { min-height: 18px; margin-top: 4px; color: #a92b40; font-size: 12px; }
.boost-amount-field:has([aria-invalid="true"]) { border-color: #a92b40; }
.boost-suggestion { display: flex; align-items: center; justify-content: center; gap: 12px; width: fit-content; max-width: 100%; height: 48px; margin: 4px auto 14px; padding: 0 16px; border: 1px solid var(--purple); border-radius: 12px; background: var(--purple); color: white; font: inherit; font-size: 20px; line-height: 1.2; font-weight: 750; text-align: center; cursor: pointer; }
.boost-suggestion:hover { border-color: var(--purple-dark); background: var(--purple-dark); }
.boost-suggestion:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.boost-suggestion .icon { flex-shrink: 0; width: 28px; height: 28px; stroke-width: 3; transform: rotate(-90deg); }
.vendor-rank .quote-card { container: boost-quote / inline-size; }
.boost-result { margin: 20px 0 17px; color: var(--ink); }
.boost-result-content { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; width: 100%; }
.boost-result-label, .boost-result strong { font-size: 22px; font-weight: 750; line-height: 1.25; text-align: center; white-space: nowrap; }
.boost-result-label { width: 100%; padding: 12px 18px; border: 1px solid #ded6fa; border-radius: 999px; background: #eeeaff; }
.boost-result strong { flex-shrink: 0; color: var(--purple); font-size: 36px; line-height: 1; letter-spacing: normal; font-variant-numeric: tabular-nums; }
.boost-rank-prefix { font-size: .7em; margin-right: 1px; }
.boost-result.is-empty { color: var(--muted); }
.boost-result.is-empty .boost-result-label { background: var(--lavender); border-color: var(--line); }
.boost-result.is-empty strong { min-width: 0; height: auto; padding: 0; border: 0; background: transparent; color: inherit; font-size: 13px; letter-spacing: -.02em; text-align: center; line-height: 1.35; }
.vendor-rank .quote-line strong { text-align: right; }
.vendor-rank .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.rank-position-note { font-size: 12px; line-height: 1.7; color: var(--muted); text-align: center; margin-bottom: 24px; }
.vendor-rank .field-hint, .vendor-rank .quote-line > span, .vendor-rank .quote-amount small { color: var(--muted); }
.vendor-rank .info-note { background: var(--lavender); color: var(--muted); border-color: var(--line); }
#rank-selection-error { color: #a92b40; padding: 20px 0; font-size: 14px; }
#boost-payment[aria-disabled="true"] { opacity: .45; cursor: default; }
body:has(#preview-dark-mode:checked) .rank-product-menu { background: #211d2e; }
body:has(#preview-dark-mode:checked) #rank-selection-error { color: #ffacb9; }
body:has(#preview-dark-mode:checked) .boost-amount-error { color: #ffacb9; }
body:has(#preview-dark-mode:checked) .vendor-rank .boost-amount-field input { background: transparent; }
body:has(#preview-dark-mode:checked) .boost-result-label { background: #302941; border-color: #4a3a63; }
body:has(#preview-dark-mode:checked) .boost-suggestion { background: #6552ef; border-color: #6552ef; }
body:has(#preview-dark-mode:checked) .boost-suggestion:hover { background: #7563f6; border-color: #7563f6; }
@container boost-quote (min-width: 351px) and (max-width: 390px) {
  .boost-result-label { font-size: 20px; }
  .boost-result-label { padding-inline: 12px; }
}
@container boost-quote (min-width: 311px) and (max-width: 350px) {
  .boost-result-label { font-size: 18px; }
  .boost-result-label { padding-inline: 12px; }
}
@container boost-quote (max-width: 310px) {
  .boost-suggestion { gap: 8px; padding: 0 10px; font-size: 18px; }
  .boost-suggestion .icon { width: 26px; height: 26px; }
  .boost-result-label { padding: 12px; }
  .boost-result-label { font-size: 16px; white-space: normal; }
  .boost-result.is-empty strong { font-size: 12px; }
}
@container boost-quote (max-width: 250px) {
  .boost-result-label { padding-inline: 8px; }
  .boost-result-label { font-size: 14px; }
  .boost-result-label { white-space: normal; }
  .boost-result.is-empty strong { font-size: 12px; }
}
@media (max-width: 420px) {
  .rank-product-picker summary { padding: 12px; gap: 10px; }
  .rank-product-menu button { padding: 12px 8px; gap: 8px; }
  .rank-option-copy small { font-size: 10px; }
  .rank-product-change { gap: 3px; }
  .rank-product-menu .small-logo { width: 30px; height: 30px; }
}
