.bsv-slot {
  margin: 18px 0;
}

.bsv-card,
.bsv-modal__dialog,
.bsv-metric,
.bsv-comp,
.bsv-advice,
.bsv-paywall,
.bsv-section,
.bsv-chart-wrap {
  box-sizing: border-box;
}

.bsv-card {
  position: relative;
  border: 1px solid rgba(24, 49, 83, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 10px 30px rgba(17, 31, 54, 0.06);
  padding: 18px 18px 16px;
  overflow: hidden;
}

.bsv-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #1f64ff 0%, #43cbd6 100%);
}

.bsv-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.bsv-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #55708f;
}

.bsv-value {
  margin-top: 6px;
  font-size: clamp(28px, 2.8vw, 40px);
  line-height: 1;
  font-weight: 800;
  color: #10233b;
}

.bsv-subtitle {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.45;
  color: #51657f;
}

.bsv-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(24, 49, 83, 0.12);
  background: #ffffff;
  color: #153c72;
  cursor: pointer;
  font-weight: 700;
}

.bsv-icon:hover,
.bsv-icon:focus-visible {
  box-shadow: 0 0 0 4px rgba(31, 100, 255, 0.12);
  outline: none;
}

.bsv-card__meta,
.bsv-comp__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bsv-card__meta {
  margin-top: 14px;
}

.bsv-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(24, 49, 83, 0.08);
  background: #fff;
  color: #173557;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.bsv-chip--up,
.bsv-chip--confidence-high {
  background: rgba(30, 161, 85, 0.08);
  color: #146a3b;
  border-color: rgba(30, 161, 85, 0.18);
}

.bsv-chip--down,
.bsv-chip--confidence-low,
.bsv-chip--review {
  background: rgba(210, 64, 61, 0.08);
  color: #922624;
  border-color: rgba(210, 64, 61, 0.18);
}

.bsv-chip--stable,
.bsv-chip--confidence-medium,
.bsv-chip--similar {
  background: rgba(31, 100, 255, 0.08);
  color: #1c4cb6;
  border-color: rgba(31, 100, 255, 0.16);
}

.bsv-chip--very_close {
  background: rgba(38, 120, 255, 0.08);
  color: #19469f;
  border-color: rgba(38, 120, 255, 0.16);
}

.bsv-chip--lock {
  background: rgba(198, 149, 20, 0.08);
  color: #8a6510;
  border-color: rgba(198, 149, 20, 0.18);
}

.bsv-chip--score {
  background: rgba(16, 35, 59, 0.06);
  color: #10233b;
}

.bsv-card__actions {
  margin-top: 16px;
}

.bsv-card__actions .button,
.bsv-paywall .button,
.bsv-advice .button {
  min-height: 42px;
  border-radius: 999px;
  padding: 0 16px;
  font-weight: 700;
}

.bsv-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
}

.bsv-modal[hidden] {
  display: none !important;
}

.bsv-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 32, 0.56);
  backdrop-filter: blur(4px);
}

.bsv-modal__dialog {
  position: relative;
  width: min(1000px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  margin: 20px auto;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(24, 49, 83, 0.08);
  box-shadow: 0 28px 80px rgba(8, 16, 30, 0.26);
  overflow: hidden;
}

.bsv-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(24, 49, 83, 0.07);
  background: linear-gradient(180deg, rgba(246, 250, 255, 0.96) 0%, rgba(255,255,255,0.96) 100%);
}

.bsv-modal__title-wrap {
  min-width: 0;
}

.bsv-modal__title {
  margin-top: 4px;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 800;
  color: #11243d;
}

.bsv-modal__close {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(24, 49, 83, 0.12);
  border-radius: 999px;
  background: #ffffff;
  color: #132741;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.bsv-modal__body {
  min-height: 240px;
  overflow: auto;
  padding: 22px;
}

.bsv-loader {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: #5a6f89;
  font-weight: 600;
}

.bsv-popup-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.bsv-popup-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.bsv-popup-title {
  margin: 6px 0 0;
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.2;
  color: #122740;
}

.bsv-window-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bsv-window-pill {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(24, 49, 83, 0.12);
  background: #fff;
  cursor: pointer;
  color: #1a3555;
  font-weight: 700;
}

.bsv-window-pill.is-active,
.bsv-window-pill:hover,
.bsv-window-pill:focus-visible {
  background: rgba(31, 100, 255, 0.08);
  border-color: rgba(31, 100, 255, 0.22);
  box-shadow: 0 0 0 4px rgba(31, 100, 255, 0.08);
  outline: none;
}

.bsv-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.bsv-metric {
  border: 1px solid rgba(24, 49, 83, 0.07);
  border-radius: 18px;
  background: #ffffff;
  padding: 16px;
  min-height: 108px;
}

.bsv-metric__label {
  font-size: 12px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #60748d;
}

.bsv-metric__value {
  margin-top: 8px;
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.1;
  font-weight: 800;
  color: #11253e;
}

.bsv-metric__meta {
  margin-top: 8px;
  font-size: 13px;
  color: #60748d;
}

.bsv-section {
  border: 1px solid rgba(24, 49, 83, 0.07);
  border-radius: 20px;
  background: #ffffff;
  padding: 18px;
}

.bsv-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.bsv-section__head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  color: #122740;
}

.bsv-section__meta {
  color: #61758d;
  font-size: 13px;
  font-weight: 600;
}

.bsv-chart-wrap {
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(31, 100, 255, 0.04) 0%, rgba(67, 203, 214, 0.04) 100%);
  padding: 10px;
}

.bsv-chart {
  width: 100%;
  height: auto;
}

.bsv-chart polyline {
  stroke: #1f64ff;
}

.bsv-advice {
  border: 1px solid rgba(24, 49, 83, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 16px;
}

.bsv-advice p {
  margin: 0 0 12px;
  color: #213954;
}

.bsv-advice--competitive,
.bsv-advice--good {
  border-color: rgba(30, 161, 85, 0.18);
  background: rgba(30, 161, 85, 0.04);
}

.bsv-advice--high,
.bsv-advice--slightly_high {
  border-color: rgba(210, 64, 61, 0.18);
  background: rgba(210, 64, 61, 0.04);
}

.bsv-comps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.bsv-comp {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid rgba(24, 49, 83, 0.08);
  border-radius: 18px;
  background: #ffffff;
  padding: 14px;
}

.bsv-comp__thumb {
  width: 82px;
  height: 82px;
  border-radius: 14px;
  background: #f3f7fb;
  overflow: hidden;
}

.bsv-comp__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bsv-comp__body {
  min-width: 0;
}

.bsv-comp__title {
  font-size: 14px;
  line-height: 1.45;
  font-weight: 700;
  color: #122740;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bsv-comp__price {
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 800;
  color: #122740;
}

.bsv-comp__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
  font-size: 12px;
  color: #60748d;
}

.bsv-comp__tags {
  margin-top: 10px;
}

.bsv-comp__link {
  display: inline-flex;
  margin-top: 12px;
  color: #1f64ff;
  font-weight: 700;
  text-decoration: none;
}

.bsv-comp__link:hover,
.bsv-comp__link:focus-visible {
  text-decoration: underline;
}

.bsv-paywall {
  margin-top: 14px;
  border: 1px solid rgba(24, 49, 83, 0.08);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(31, 100, 255, 0.06) 0%, rgba(198, 149, 20, 0.06) 100%);
  padding: 18px;
}

.bsv-paywall__title {
  font-size: 18px;
  font-weight: 800;
  color: #122740;
}

.bsv-paywall p,
.bsv-method-text,
.bsv-method-note,
.bsv-legal-note {
  margin: 8px 0 0;
  color: #51657f;
  line-height: 1.55;
}

.bsv-method-note,
.bsv-legal-note {
  font-size: 13px;
}

.bsv-legal-note {
  margin-top: 12px;
}

.bsv-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1000000;
  padding: 10px 14px;
  border-radius: 12px;
  background: #10233b;
  color: #fff;
  box-shadow: 0 10px 32px rgba(0,0,0,0.18);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.bsv-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.bsv-modal-open {
  overflow: hidden;
}

@media (max-width: 1024px) {
  .bsv-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bsv-comps-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .bsv-slot {
    margin: 14px 0;
  }

  .bsv-card {
    border-radius: 18px;
    padding: 16px;
  }

  .bsv-value {
    font-size: 32px;
  }

  .bsv-subtitle {
    font-size: 13px;
  }

  .bsv-card__actions .button {
    width: 100%;
    justify-content: center;
  }

  .bsv-modal__dialog {
    width: 100vw;
    max-height: 100vh;
    height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .bsv-modal:not(.bsv-modal--fullscreen) .bsv-modal__dialog {
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
    max-height: calc(100vh - 16px);
    margin: 8px auto;
    border-radius: 24px;
  }

  .bsv-modal__header,
  .bsv-modal__body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .bsv-popup-top {
    flex-direction: column;
  }

  .bsv-window-switch {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    flex-wrap: nowrap;
  }

  .bsv-summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bsv-metric {
    min-height: 94px;
    border-radius: 16px;
    padding: 14px;
  }

  .bsv-section {
    border-radius: 18px;
    padding: 16px;
  }

  .bsv-comp {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .bsv-comp__thumb {
    width: 72px;
    height: 72px;
  }
}

@media (max-width: 480px) {
  .bsv-summary-grid {
    grid-template-columns: 1fr;
  }

  .bsv-metric__value {
    font-size: 24px;
  }

  .bsv-comp__price {
    font-size: 20px;
  }
}

.bsv-comp__note {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: #51657f;
}

.bsv-empty-state {
  border: 1px dashed rgba(24, 49, 83, 0.16);
  border-radius: 16px;
  background: #f8fbff;
  padding: 18px;
}

.bsv-empty-state strong {
  display: block;
  color: #122740;
}

.bsv-empty-state p {
  margin: 8px 0 0;
  color: #51657f;
}


.bsv-legal-note--compact {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
}

.bsv-legal-note--important {
  font-weight: 700;
}
