/* cv11.css — Cornerstone Insurance Contractors (Archetype A6: Live Layer Simulator)
   Scoped strictly to .cv11-* classes. Architectural blueprint geometry, zero CLS, WCAG 2.2 AA, 390px mobile safe. */

.cv11-panel {
  background: #FFFFFF;
  border: 1.5px solid rgba(10, 26, 51, 0.22);
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(10, 26, 51, 0.05), 0 18px 38px -20px rgba(10, 26, 51, 0.24);
  overflow: hidden;
}

/* Blueprint Title Bar with 3-Slab Keystone Mark */
.cv11-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1.15rem;
  background: #0A1A33;
  color: #FFFFFF;
  border-bottom: 3px solid #F26822;
}

.cv11-bar-id {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.cv11-keystone {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2.5px;
  flex: 0 0 auto;
}

.cv11-slab {
  display: block;
  height: 3.5px;
  border-radius: 1px;
}
.cv11-slab:nth-child(1) { width: 20px; background: #F26822; }
.cv11-slab:nth-child(2) { width: 15px; background: #579CCD; }
.cv11-slab:nth-child(3) { width: 10px; background: #FFFFFF; }

.cv11-bar-code {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #E2EEF9;
}

.cv11-presets {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cv11-preset-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  border: 1.5px solid #579CCD;
  background: #1C4A75;
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cv11-preset-btn:hover {
  background: #F26822;
  border-color: #F26822;
  color: #0A1A33;
}

/* Locked-Ratio Blueprint SVG Stage (CLS = 0.000) */
.cv11-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 960 / 380;
  background: #0A1A33;
  overflow: hidden;
}

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

/* Live SVG Layer Visibility (GPU opacity only — zero layout shift) */
.cv11-layer {
  opacity: 1;
  transition: opacity 0.26s ease;
}

.cv11-gap {
  opacity: 0;
  transition: opacity 0.26s ease;
}

.cv11-panel[data-gl="off"] .cv11-l-gl,
.cv11-panel[data-tools="off"] .cv11-l-tools,
.cv11-panel[data-auto="off"] .cv11-l-auto,
.cv11-panel[data-umb="off"] .cv11-l-umb {
  opacity: 0.06;
}

.cv11-panel[data-gl="off"] .cv11-g-gl,
.cv11-panel[data-tools="off"] .cv11-g-tools,
.cv11-panel[data-auto="off"] .cv11-g-auto,
.cv11-panel[data-umb="off"] .cv11-g-umb {
  opacity: 1;
}

/* Ambient Blueprint Motion (runs only when visible, unpaused, non-reduced) */
.cv11-panel.cv11-inview .cv11-flow-line {
  animation: cv11-dash 16s linear infinite;
}

.cv11-panel.cv11-inview[data-gl="off"] .cv11-g-gl,
.cv11-panel.cv11-inview[data-tools="off"] .cv11-g-tools,
.cv11-panel.cv11-inview[data-auto="off"] .cv11-g-auto,
.cv11-panel.cv11-inview[data-umb="off"] .cv11-g-umb {
  animation: cv11-warn-pulse 2s ease-in-out infinite alternate;
}

@keyframes cv11-dash {
  to { stroke-dashoffset: -120; }
}
@keyframes cv11-warn-pulse {
  from { opacity: 0.72; }
  to { opacity: 1; }
}

/* 4 Tactile Layer Toggle Switches */
.cv11-controls {
  padding: 1.05rem 1.2rem;
  background: #EFF2F5;
  border-top: 1px solid rgba(10, 26, 51, 0.14);
  border-bottom: 1px solid rgba(10, 26, 51, 0.14);
}

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

.cv11-switch {
  min-width: 0;
  min-height: 76px;
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  border: 2px solid #1C4A75;
  background: #FFFFFF;
  color: #0A1A33;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.45rem;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.cv11-switch:hover {
  box-shadow: 0 6px 14px -8px rgba(10, 26, 51, 0.32);
}

.cv11-switch[aria-pressed="false"] {
  border-color: rgba(181, 66, 11, 0.55);
  background: #FFF9F6;
}

.cv11-sw-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}

.cv11-sw-code {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #1C4A75;
  background: #E8F2FA;
  padding: 0.16rem 0.45rem;
  border-radius: 4px;
}

.cv11-switch[aria-pressed="false"] .cv11-sw-code {
  background: #FEF1EA;
  color: #B5420B;
}

/* Visual Rocker Pill */
.cv11-sw-pill {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #1C4A75;
  flex: 0 0 auto;
  transition: background-color 0.2s ease;
}

.cv11-sw-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #FFFFFF;
  transform: translateX(20px);
  transition: transform 0.2s ease;
}

.cv11-switch[aria-pressed="false"] .cv11-sw-pill {
  background: #94A3B8;
}

.cv11-switch[aria-pressed="false"] .cv11-sw-thumb {
  transform: translateX(0);
}

.cv11-sw-name {
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.25;
  color: #0A1A33;
}

.cv11-sw-state {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #1C4A75;
}

.cv11-switch[aria-pressed="false"] .cv11-sw-state {
  color: #B5420B;
}

/* Live Score Bar & Plain-English Gap Readout */
.cv11-readout {
  padding: 1.25rem 1.35rem 1.4rem;
  background: #FFFFFF;
}

.cv11-score-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.cv11-score-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1C4A75;
  margin-bottom: 0.15rem;
}

.cv11-score-title {
  margin: 0;
  font-size: clamp(1.12rem, 1.9vw, 1.38rem);
  font-weight: 800;
  line-height: 1.2;
  color: #0A1A33;
}

.cv11-score-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.34rem 0.8rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #0A1A33;
  color: #FFFFFF;
}

.cv11-score-badge[data-level="partial"] {
  background: #F26822;
  color: #0A1A33;
}

.cv11-score-badge[data-level="low"] {
  background: #B5420B;
  color: #FFFFFF;
}

.cv11-meter {
  width: 100%;
  height: 12px;
  border-radius: 4px;
  background: #E2E8F0;
  overflow: hidden;
  margin-bottom: 0.9rem;
}

.cv11-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #1C4A75 0%, #2E72AC 70%, #579CCD 100%);
  transition: width 0.28s ease;
}

.cv11-meter-fill.cv11-fill-warn {
  background: linear-gradient(90deg, #B5420B 0%, #F26822 100%);
}

.cv11-summary {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #334155;
}

.cv11-gaps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.cv11-gap-ok {
  grid-column: 1 / -1;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  background: #E8F2FA;
  border: 1px solid rgba(28, 74, 117, 0.22);
  border-left: 4px solid #1C4A75;
}

.cv11-gap-card {
  min-width: 0;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  background: #FFF8F4;
  border: 1px solid rgba(181, 66, 11, 0.26);
  border-left: 4px solid #F26822;
}

.cv11-gap-tag {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #B5420B;
}

.cv11-gap-tag-ok {
  color: #1C4A75;
}

.cv11-gap-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #1E293B;
}

@media (max-width: 900px) {
  .cv11-switches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .cv11-bar {
    padding: 0.7rem 0.9rem;
  }
  .cv11-controls {
    padding: 0.85rem;
  }
  .cv11-switches {
    grid-template-columns: 1fr;
  }
  .cv11-readout {
    padding: 1rem 0.9rem 1.15rem;
  }
  .cv11-gaps {
    grid-template-columns: 1fr;
  }
}
