/* Advisory: budgets by practice. Five practice rows against a plan line; uses the tokens and type scale of adv.css.
   Over plan: solid #6E9EF2. Short of plan: the gap to the line hatched, the bar itself at full colour. */
.bd { display: grid; grid-template-columns: minmax(7.5em, 10em) minmax(0, 1fr) 3.2em; column-gap: 16px; row-gap: 6px; position: relative; font-size: 15px; padding-top: 30px; } /* room for the plan label */
.bd-row { display: contents; }
.bd-l { grid-column: 1; align-self: center; color: var(--ink); padding: 6px 0; line-height: 1.25; }
.bd-t { grid-column: 2; position: relative; height: 34px; }
.bd-n { grid-column: 3; align-self: center; text-align: right; font: 500 17px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.bd-bar { position: absolute; left: 0; width: 100%; top: 7px; height: 20px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--s, 0)); transition: transform var(--dur, 300ms) var(--q4); }
.bd-gap { position: absolute; left: 0; right: 0; top: 7px; height: 20px; background: var(--hatch); clip-path: inset(0 var(--g1, 100%) 0 var(--g0, 0%)); opacity: 0; transition: clip-path var(--dur, 300ms) var(--q4), opacity .3s; }
.bd-row.under .bd-gap { opacity: 1; }
.bd-row.under .bd-n { color: var(--ink-2); }
.bd-plan { position: absolute; pointer-events: none; }
.bd-plan::before { content: ""; position: absolute; top: -6px; bottom: 0; left: var(--x, 83.3%); border-left: 1px dashed var(--ink); transition: left var(--dur, 300ms) var(--q4); }
.bd-plan span { position: absolute; top: -26px; left: var(--x, 83.3%); transform: translateX(-50%); font: 500 13px/1 var(--mono); color: var(--ink); white-space: nowrap; transition: left var(--dur, 300ms) var(--q4); }
.bd-grid { position: absolute; pointer-events: none; }
.bd-grid i { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(186,195,209,.2); }
.bd-axis { grid-column: 2; position: relative; height: 24px; font: 13px/1 var(--mono); color: var(--ink-3); }
.bd-axis span { position: absolute; top: 8px; transform: translateX(-50%); }
.bd.wait .bd-bar { transform: scaleX(0); }
.bd.go .bd-bar { transition-duration: 900ms; }

/* controls: realization range, a headcount stepper, base / hard plan */
.bd-hc { display: flex; flex-direction: column; }
.bd-hc .lab { font-size: 14px; color: var(--ink-2); }
.bd-hc .ctl { display: flex; align-items: center; gap: 4px; min-height: 44px; }
.bd-hc button { width: 44px; height: 44px; border: 1px solid var(--line); background: none; color: var(--ink); font: 500 20px/1 var(--mono); border-radius: 2px; cursor: pointer; }
.bd-hc button:hover:not(:disabled) { border-color: var(--accent); }
.bd-hc button:disabled { opacity: .35; cursor: default; }
.bd-hc button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bd-hc output { min-width: 2.6em; text-align: center; font: 500 17px var(--mono); color: var(--ink); }
/* the control a step is about gets the accent */
.ax-fig[data-focus="real"] .ax-range label, .ax-fig[data-focus="hc"] .bd-hc .lab { color: var(--accent); }
.ax-fig[data-focus="plan"] .seg { outline: 1px solid var(--accent); outline-offset: 3px; }
.ax-hub .bd { font-size: 15px; }

@media (max-height: 780px) and (min-width: 901px) { .bd-t { height: 30px; } .bd-bar, .bd-gap { top: 6px; height: 18px; } }
@media (max-width: 900px) {
  .bd { grid-template-columns: minmax(0, 1fr) 3em; column-gap: 12px; row-gap: 0; }
  .bd-l { grid-column: 1 / -1; padding: 8px 0 0; font-size: 14px; }
  .bd-t { grid-column: 1; height: 28px; }
  .bd-bar, .bd-gap { top: 5px; height: 18px; }
  .bd-n { grid-column: 2; }
  .bd-axis { grid-column: 1; }
  .bd-grid { display: none; }
}
@media (prefers-reduced-motion: reduce) { .bd-bar, .bd-gap, .bd-plan::before, .bd-plan span { transition: none !important; } }
