/* The app uses four charcoal values on white. On its inverse surface (#192821)
   increased load needs increased lightness to keep the same visual emphasis. */
.bm-demo {
  --bm-ground: #192821;
  --bm-paper: #f5f7f4;
  --bm-ink: #192821;
  --bm-secondary-ink: #536159;
  --bm-rule: #ccd4ce;
  --bm-badge: #e4eae4;
  --bm-text: #f5f7f8;
  --bm-muted: #b6c3ba;
  --bm-track: #718078;
  --bm-outline: rgba(245, 247, 248, .34);
  --bm-level-0: rgba(245, 247, 248, .10);
  --bm-level-1: #84958b;
  --bm-level-2: #b0beb5;
  --bm-level-3: #e5ece7;
  --bm-accent: #c2f826;
  --bm-clear: transparent;
  container: bm-container / inline-size;
  width: 100%;
  min-width: 0;
  font-family: inherit;
  line-height: 1.5;
  color: var(--bm-text);
  background-color: var(--bm-ground);
}

.bm-layout {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
.bm-map { min-width: 0; }
.bm-note {
  margin: 0 0 16px;
  color: var(--bm-muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}
.bm-note strong { color: var(--bm-text); font-weight: 600; }
.bm-figures {
  display: flex;
  justify-content: center;
  gap: clamp(0px, 1.5cqi, 18px);
}
.bm-figure {
  display: grid;
  gap: 7px;
  justify-items: center;
  width: min(47%, 158px);
  margin: 0;
}
.bm-svg { display: block; width: 100%; height: auto; overflow: visible; }
.bm-head, .bm-part > path {
  stroke: var(--bm-outline);
  stroke-width: 1.15px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.bm-head { fill: var(--bm-level-0); }
.bm-part { outline: none; cursor: pointer; }
.bm-part > path { fill: var(--bm-fill); transition: fill 500ms ease; }
.bm-part[aria-pressed="true"] > path { stroke: var(--bm-accent); stroke-width: 2.5px; }
.bm-part:focus-visible > path { stroke: var(--bm-text); stroke-width: 3px; stroke-dasharray: 4 2; }
.bm-caption {
  display: flex;
  width: 72%;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px;
  font-size: 15px;
  font-weight: 600;
}
.bm-side { font-weight: 400; color: var(--bm-muted); font-size: 12px; }
.bm-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--bm-muted);
}
.bm-key { display: inline-flex; align-items: center; gap: 6px; }
.bm-swatch {
  box-sizing: border-box;
  width: 11px;
  height: 11px;
  border: 1px solid var(--bm-outline);
  border-radius: 2px;
  background-color: var(--bm-fill);
}
.bm-swatch + .bm-swatch { margin-inline-start: -2px; }
.bm-demo [data-bm-level="0"] { --bm-fill: var(--bm-level-0); }
.bm-demo [data-bm-level="1"] { --bm-fill: var(--bm-level-1); }
.bm-demo [data-bm-level="2"] { --bm-fill: var(--bm-level-2); }
.bm-demo [data-bm-level="3"] { --bm-fill: var(--bm-level-3); }

.bm-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 520px;
  margin: 20px auto 0;
  font-size: 14px;
  color: var(--bm-muted);
}
.bm-select {
  box-sizing: border-box;
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid var(--bm-track);
  border-radius: 7px;
  color-scheme: dark;
  background-color: var(--bm-ground);
  color: var(--bm-text);
  font: inherit;
  font-size: 16px;
}
.bm-select:focus-visible { outline: 2px solid var(--bm-text); outline-offset: 3px; }
.bm-time { margin: 12px auto 0; max-width: 520px; }
.bm-time-header { display: flex; align-items: center; justify-content: space-between; }
.bm-clock { font-size: 16px; font-weight: 600; }
.bm-num {
  font-family: "Barlow Condensed", var(--bm-inherited-font, sans-serif);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.bm-clock .bm-num { font-size: 1.32em; }
.bm-replay, .bm-tick {
  appearance: none;
  box-sizing: border-box;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--bm-clear);
  font-family: inherit;
  color: var(--bm-muted);
  cursor: pointer;
}
.bm-replay { min-width: 44px; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.bm-replay:focus-visible, .bm-tick:focus-visible { outline: 2px solid var(--bm-text); outline-offset: 1px; }
.bm-ticks {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.bm-ticks::before {
  content: "";
  position: absolute;
  top: 10px;
  inset-inline: calc(100% / 12);
  height: 1px;
  background-color: var(--bm-track);
  pointer-events: none;
}
.bm-tick {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  padding-block: 7px 5px;
  font-size: 12px;
  white-space: nowrap;
}
.bm-tick::before {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--bm-track);
}
.bm-tick[aria-pressed="true"] { color: var(--bm-text); }
.bm-tick[aria-pressed="true"]::before { background-color: var(--bm-accent); transform: scale(1.55); }
.bm-tick .bm-num { font-size: 16px; }
.bm-card {
  box-sizing: border-box;
  display: grid;
  align-content: start;
  min-width: 0;
  border-radius: 20px;
  background-color: var(--bm-paper);
  color: var(--bm-ink);
  padding: clamp(20px, 3.4cqi, 38px);
}
.bm-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bm-name { margin: 0; color: var(--bm-ink); font: inherit; font-size: clamp(26px, 3.1cqi, 34px); line-height: 1.25; font-weight: 600; }
.bm-state {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
  white-space: nowrap;
}
.bm-state { padding: 3px 9px; border-radius: 5px; background-color: var(--bm-badge); color: var(--bm-ink); }
.bm-estimate {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 .2em;
  min-height: 68px;
  align-content: center;
  margin: 20px 0;
  color: var(--bm-ink);
  font-size: clamp(19px, 2.5cqi, 29px);
  font-weight: 600;
  line-height: 1.3;
}
.bm-estimate .bm-num { font-weight: 700; font-size: clamp(52px, 6.8cqi, 76px); line-height: 1.05; }
.bm-sources { border-top: 1px solid var(--bm-rule); padding-top: 20px; }
.bm-sources-title { color: var(--bm-secondary-ink); margin: 0 0 8px; font: inherit; font-size: 13px; }
.bm-loads { list-style: none; padding: 0; margin: 0; font-size: 15px; font-weight: 600; }
.bm-loads .bm-num { font-size: 1.15em; }
@container bm-container (min-width: 720px) {
  .bm-layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 5cqi, 64px); }
  .bm-map { padding-inline: min(2cqi, 24px); }
  .bm-figure { width: min(47%, 174px); }
}
@media (prefers-reduced-motion: reduce) {
  .bm-part > path { transition: none; }
}
