/* bv05.css — Beach Insurance Flood Insurance Split-Curtain Comparator (A2)
   Coastal Carolinas Sunlit Editorial palette, WCAG 2.2 AA, zero CLS, strictly scoped to .bv05-* */

.bv05-card {
  background: var(--bv-paper, #FFFFFF);
  border: 1px solid var(--bv-line, rgba(13, 59, 110, 0.14));
  border-radius: 20px;
  box-shadow: var(--bv-shadow, 0 2px 6px rgba(13, 59, 110, 0.05), 0 18px 40px -18px rgba(13, 59, 110, 0.18));
  overflow: hidden;
}

.bv05-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.15rem;
  background: linear-gradient(90deg, #F5F0E8 0%, #EEF4FB 100%);
  border-bottom: 1px solid var(--bv-line, rgba(13, 59, 110, 0.14));
}

.bv05-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.bv05-preset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1.5px solid var(--bv-line-strong, rgba(13, 59, 110, 0.26));
  background: #FFFFFF;
  color: #0D3B6E;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.bv05-preset:hover {
  background: #EEF4FB;
  border-color: #1565A8;
}

.bv05-preset:active {
  transform: scale(0.98);
}

.bv05-preset.is-active,
.bv05-preset[aria-pressed="true"] {
  background: #0D3B6E;
  border-color: #0D3B6E;
  color: #FFFFFF;
}

.bv05-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.bv05-dot-risk { background: #C81E1E; }
.bv05-dot-split { background: #D4A017; }
.bv05-dot-safe { background: #0F8A6A; }

.bv05-meter {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid var(--bv-line, rgba(13, 59, 110, 0.14));
  color: #0D3B6E;
  font-size: 0.84rem;
}

.bv05-meter-label {
  color: #475569;
  font-weight: 600;
}

.bv05-meter-val {
  color: #0B6B52;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  min-width: 3ch;
  text-align: right;
}

/* Aspect-ratio locked stage -> CLS 0.000 */
.bv05-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 960 / 420;
  background: #DCE8F4;
  overflow: hidden;
  touch-action: pan-y;
  cursor: ew-resize;
  user-select: none;
}

.bv05-svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Gentle GPU-composited ambient motion */
@keyframes bv05-wave-drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-14px); }
}

@keyframes bv05-wave-drift-alt {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(12px); }
}

@keyframes bv05-rain-fall {
  0% { transform: translate(0, 0); opacity: 0.35; }
  50% { opacity: 0.72; }
  100% { transform: translate(-8px, 18px); opacity: 0.25; }
}

@keyframes bv05-shield-dash {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -32; }
}

.bv05-wave-a {
  animation: bv05-wave-drift 5.5s ease-in-out infinite;
  will-change: transform;
}

.bv05-wave-b {
  animation: bv05-wave-drift-alt 6.8s ease-in-out infinite;
  will-change: transform;
}

.bv05-wave-c {
  animation: bv05-wave-drift 7.5s ease-in-out infinite;
  will-change: transform;
}

.bv05-rain {
  animation: bv05-rain-fall 1.8s linear infinite;
  will-change: transform, opacity;
}

.bv05-shield-arc {
  animation: bv05-shield-dash 2.8s linear infinite;
}

.bv05-divider {
  pointer-events: none;
}

/* Scrubber Control Dock */
.bv05-scrubber {
  padding: 0.95rem 1.25rem 1.05rem;
  background: #F5F0E8;
  border-top: 1px solid var(--bv-line, rgba(13, 59, 110, 0.14));
  border-bottom: 1px solid var(--bv-line, rgba(13, 59, 110, 0.14));
}

.bv05-scrubber-labels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
}

.bv05-range-label {
  font-weight: 800;
  color: #0D3B6E;
}

.bv05-end {
  font-weight: 700;
}

.bv05-end-risk { color: #9F1D20; }
.bv05-end-safe { color: #0B6B52; }

.bv05-range-wrap {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.bv05-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-height: 44px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.bv05-range::-webkit-slider-runnable-track {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #9F1D20 0%, #D4A017 50%, #0B6B52 100%);
  border: 1px solid rgba(13, 59, 110, 0.2);
}

.bv05-range::-moz-range-track {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #9F1D20 0%, #D4A017 50%, #0B6B52 100%);
  border: 1px solid rgba(13, 59, 110, 0.2);
}

.bv05-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 44px;
  height: 44px;
  margin-top: -17px;
  border-radius: 999px;
  background: #D4A017;
  border: 3px solid #0D3B6E;
  box-shadow: 0 3px 10px rgba(13, 59, 110, 0.3);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.bv05-range::-moz-range-thumb {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #D4A017;
  border: 3px solid #0D3B6E;
  box-shadow: 0 3px 10px rgba(13, 59, 110, 0.3);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.bv05-range:hover::-webkit-slider-thumb { transform: scale(1.06); }
.bv05-range:hover::-moz-range-thumb { transform: scale(1.06); }

/* Live Readout & 4 Comparison Cards */
.bv05-readout {
  padding: 1.25rem;
  background: #FFFFFF;
}

.bv05-summary {
  padding: 1rem 1.15rem;
  border-radius: 16px;
  background: #EEF4FB;
  border: 1px solid var(--bv-line, rgba(13, 59, 110, 0.14));
  margin-bottom: 1.1rem;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.bv05-card[data-bv05-mode="exposed"] .bv05-summary {
  background: #FDF2F2;
  border-color: rgba(159, 29, 32, 0.28);
}

.bv05-card[data-bv05-mode="protected"] .bv05-summary {
  background: #E4F5F0;
  border-color: rgba(11, 107, 82, 0.3);
}

.bv05-badge {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.bv05-badge-split {
  background: #D4A017;
  color: #0D3B6E;
}

.bv05-badge-risk {
  background: #9F1D20;
  color: #FFFFFF;
}

.bv05-badge-safe {
  background: #0B6B52;
  color: #FFFFFF;
}

.bv05-summary-title {
  margin: 0 0 0.35rem;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.3;
  color: #0D3B6E;
}

.bv05-summary-text {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.55;
  color: #334155;
}

.bv05-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.bv05-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: #FAFBFD;
  border: 1px solid var(--bv-line, rgba(13, 59, 110, 0.14));
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.bv05-tile.is-emphasis-risk {
  background: #FFF7F7;
  border-color: rgba(159, 29, 32, 0.32);
}

.bv05-tile.is-emphasis-safe {
  background: #F2FBF8;
  border-color: rgba(11, 107, 82, 0.32);
}

.bv05-tile-title {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.28;
  color: #0D3B6E;
}

.bv05-tile-body {
  margin: 0 0 0.7rem;
  font-size: 0.86rem;
  line-height: 1.5;
  color: #334155;
}

.bv05-chip {
  align-self: flex-start;
  display: inline-block;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: #EEF4FB;
  color: #0D3B6E;
}

.bv05-tile.is-emphasis-risk .bv05-chip {
  background: #9F1D20;
  color: #FFFFFF;
}

.bv05-tile.is-emphasis-safe .bv05-chip {
  background: #0B6B52;
  color: #FFFFFF;
}

/* Responsive — zero overflow down to 390px */
@media (max-width: 960px) {
  .bv05-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .bv05-topbar {
    padding: 0.8rem 0.9rem;
  }
  .bv05-scrubber {
    padding: 0.85rem 0.95rem;
  }
  .bv05-readout {
    padding: 0.95rem;
  }
  .bv05-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .bv05-end {
    font-size: 0.76rem;
  }
}
