/* Bellaris Engine 1.2 — canonical Wetpet chart design. CSP-safe SVG legends, no inline styles. */
.bec-chart,
.bec-sources {
  min-width: 0;
  width: 100%;
  color: #263d3b;
  font: inherit;
}
.bec-readout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 4px 5px;
  font-size: 11px;
  color: #728363;
}
.bec-readout strong {
  color: #54794e;
  font-size: 13px;
  font-weight: 600;
}
.bec-time-svg {
  display: block;
  width: 100%;
  height: auto;
  outline-offset: 2px;
  touch-action: pan-y;
}
.bec-grid {
  stroke: #e7eddf;
  stroke-dasharray: 3 5;
}
.bec-axis {
  font:
    10px system-ui,
    sans-serif;
  fill: #758567;
}
.bec-line {
  fill: none;
  stroke: #397b68;
  stroke-width: 2.5;
  stroke-linecap: round;
}
.bec-area {
  fill: #88ae70;
  fill-opacity: 0.12;
}
.bec-point {
  fill: #397b68;
  stroke: white;
  stroke-width: 2;
}
.bec-crosshair {
  stroke: #b2c79e;
  stroke-dasharray: 4 4;
}
.bec-values {
  border-top: 1px solid #eef2e8;
  font-size: 11px;
  color: #6d7d60;
  padding-top: 10px;
  margin-top: 5px;
}
.bec-values summary {
  cursor: pointer;
}
.bec-table-wrap {
  max-height: 220px;
  overflow: auto;
  margin-top: 14px;
}
.bec-table-wrap table {
  width: 100%;
  border-collapse: collapse;
}
.bec-table-wrap th,
.bec-table-wrap td {
  text-align: left;
  padding: 7px 5px;
}
.bec-sources {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 1fr);
  gap: 24px;
  align-items: center;
}
.bec-donut-layout {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
}
.bec-donut-svg {
  width: 180px;
  height: 180px;
  flex-shrink: 0;
}
.bec-donut-svg circle {
  transition:
    opacity 0.15s,
    stroke-width 0.15s;
}
.bec-total {
  font:
    600 26px system-ui,
    sans-serif;
  fill: #345743;
  letter-spacing: -0.7px;
}
.bec-caption {
  font:
    10px system-ui,
    sans-serif;
  fill: #758567;
}
.bec-legend {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  flex: 1;
  min-width: 0;
}
.bec-legend li {
  margin: 0;
  padding: 0;
}
.bec-legend button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  border-radius: 7px;
  padding: 10px 4px;
  font:
    10px system-ui,
    sans-serif;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.bec-legend button:hover,
.bec-legend button[aria-pressed="true"] {
  background: #f2f6eb;
}
.bec-legend button:focus-visible {
  outline: 2px solid #397b68;
}
.bec-legend svg {
  flex-shrink: 0;
}
.bec-legend span {
  flex: 1;
  overflow-wrap: anywhere;
}
.bec-legend strong {
  font-size: 11px;
  font-weight: 600;
}
.bec-legend small {
  font-size: 9px;
  color: #758567;
  min-width: 35px;
  text-align: right;
}
.bec-source-guide h4 {
  font-size: 13px;
  margin: 0 0 12px;
}
.bec-source-guide dl {
  display: grid;
  gap: 12px;
  margin: 0;
}
.bec-source-guide dt {
  font-size: 12px;
  font-weight: 650;
}
.bec-source-guide dd,
.bec-source-guide p,
.bec-help,
.bec-empty p {
  font-size: 11px;
  line-height: 1.65;
  color: #758567;
  margin: 4px 0 0;
}
.bec-source-guide > p {
  margin-top: 14px;
}
.bec-empty {
  padding: 25px 0;
  text-align: center;
}
@media (max-width: 1000px) {
  .bec-sources {
    grid-template-columns: minmax(0, 1fr);
  }
  .bec-source-guide {
    border-top: 1px solid #eef2e8;
    padding-top: 18px;
  }
  .bec-source-guide dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .bec-readout {
    font-size: 10px;
  }
  .bec-readout strong {
    font-size: 11px;
  }
  .bec-donut-svg {
    width: 150px;
    height: 150px;
  }
  .bec-donut-layout {
    gap: 8px;
  }
  .bec-legend button {
    font-size: 10px;
    padding: 9px 0;
    gap: 6px;
  }
  .bec-legend small {
    min-width: 29px;
    font-size: 9px;
  }
  .bec-source-guide dl {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 360px) {
  .bec-donut-layout {
    flex-direction: column;
  }
  .bec-legend {
    width: 100%;
  }
}

.bec-transitions h3 {
  font-size: 16px;
  margin: 0 0 18px;
}
.bec-transitions ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.bec-transitions li {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 12px;
}
.bec-transitions li span {
  overflow-wrap: anywhere;
  min-width: 0;
}
