/* Deltas for the budget cuts flow (/doorstops/budget-cuts).

   The step system, cards and templates come from bathroom-flow.css,
   repainted for the zine by components/flow/flow-css.js. This file adds what
   only this page has: the district report, the budget calendar, and the
   step 3 visuals (the spending bar, the category list, the bar charts and
   the harm-vs-noticed plot).

   Everything inside a step is drawn with rules, not boxes: the step is
   already the card. Scope every rule with .bc so it beats the chrome's
   `.dl button` and `.dl :where(p,ul)` resets. */

.bc .bf-title { max-width: 16ch; margin-left: auto; margin-right: auto; }
.bc .bc-hero-sub { margin: -6px auto 26px; max-width: 620px; font-size: 20px; line-height: 1.5; color: var(--dl-muted); text-align: center; }

#bf-school-status:empty { display: none; }
.bc a { display: inline; }
.bc [hidden] { display: none !important; }
.bc .bf-solution-body { padding-left: 0; }
.bc span, .bc b, .bc em, .bc strong { display: inline; }
/* ...but the step numbers stay centered in their boxes */
.bc .bf-step-num { display: grid; place-items: center; line-height: 1; }

.bc .bc-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (min-width: 621px) { .bc .bc-fields--3 { grid-template-columns: 1.2fr .7fr 1.5fr; } }
@media (max-width: 620px) { .bc .bc-fields { grid-template-columns: 1fr; } }
.bc .bc-text { width: 100%; resize: vertical; font: inherit; }
.bc select.bf-input { width: 100%; }
.bc .bf-step-body p.bc-small, .bc p.bc-small { margin: 0 0 14px; font-size: 14px; line-height: 1.55; color: var(--bf-soft); }
.bc .bf-step-body p.bc-note, .bc p.bc-note { margin: 10px 0 18px; font-size: 13.5px; line-height: 1.55; color: var(--bf-soft); }
.bc .bc-find { margin: -4px 0 0; padding: 0 18px 14px; font-size: 13.5px; color: var(--bf-soft); }
.bc .bc-h4 { margin: 22px 0 8px; font-family: var(--dl-font-display); font-size: 18px; font-weight: 700; color: #16130f; }
.bc .bc-big { margin: 14px 0 22px; font-size: 17px; line-height: 1.55; color: var(--bf-ink); }
.bc .bc-big strong { color: #16130f; }

.bc .bc-list { list-style: disc; padding-left: 22px !important; margin: 0 0 16px; }
.bc .bc-list li { list-style: disc; margin: 0 0 6px; font-size: 15.5px; line-height: 1.6; color: var(--bf-ink); }
.bc .bc-questions { padding-left: 22px !important; }
.bc .bc-questions li { list-style: decimal; margin: 0 0 6px; font-size: 15px; line-height: 1.55; }

/* ------------------------------------------------------ step 2: report */

.bc .bc-progress { list-style: none; padding: 0 !important; margin: 10px 0 18px; }
.bc .bc-progress li { list-style: none; display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--bf-line); font-size: 15.5px; }
.bc .bc-progress li em { color: var(--bf-soft); font-style: normal; font-size: 14px; }
.bc .bc-progress .bc-prog-idle { color: var(--bf-soft); }
.bc .bc-tick { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 2px solid #16130f; background: #3ECFB0; font-size: 13px; font-weight: 700; color: #16130f; }
.bc .bc-tick--none { background: #fff; }
.bc .bc-tick--wait { background: #fff; border-color: var(--bf-line); }

.bc .bc-report-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 10px; }
.bc .bc-badge { display: inline-block; padding: 4px 12px; border: 2px solid #16130f; font-weight: 700; font-size: 14px; letter-spacing: .02em; color: #16130f; }
.bc .bc-badge--hot { background: #FFB3A7; }
.bc .bc-badge--warm { background: #FFE08A; }
.bc .bc-badge--calm { background: #E4F6E9; }
.bc .bc-report-where { font-weight: 700; color: var(--bf-soft); }
.bc .bc-summary { margin: 0 0 14px; font-size: 17px; line-height: 1.55; color: var(--bf-ink); }

.bc .bc-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 18px; margin: 0 0 16px; border-top: 2px solid #16130f; }
.bc .bc-facts > div { padding: 10px 0; border-bottom: 1px solid var(--bf-line); }
.bc .bc-facts dt { margin: 0 0 2px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bf-soft); }
.bc .bc-facts dd { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--bf-ink); }
.bc .bc-facts dd span { display: block; font-size: 14px; color: var(--bf-soft); }

.bc .bc-cuts { list-style: none; padding: 0 !important; margin: 0 0 14px; border-top: 2px solid #16130f; }
.bc .bc-cut, .bc .bf-step-body .bc-cut { list-style: none; display: grid; grid-template-columns: 34px 1fr; gap: 10px; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--bf-line); }
.bc .bc-cut-icon { font-size: 22px; line-height: 1.2; }
.bc .bc-cut-main { font-size: 15.5px; line-height: 1.5; color: var(--bf-ink); }
.bc .bc-cut-amt { color: var(--bf-soft); }
.bc .bc-cut-meta { display: block; margin-top: 2px; font-size: 13.5px; color: var(--bf-soft); }
.bc .bc-cut--reversed .bc-cut-main strong { text-decoration: line-through; text-decoration-thickness: 2px; }
.bc .bc-chip { display: inline-block; padding: 1px 8px; border: 1.5px solid #16130f; font-size: 12px; font-weight: 700; color: #16130f; background: #fff; }
.bc .bc-chip--approved { background: #FFB3A7; }
.bc .bc-chip--proposed { background: #FFE08A; }
.bc .bc-chip--reversed { background: #3ECFB0; }
.bc .bc-watch { margin: 0 0 12px; padding: 10px 0 10px 14px; border-left: 4px solid #3ECFB0; font-size: 15.5px; line-height: 1.55; }
.bc .bc-alerts { list-style: none; padding: 0 !important; }
.bc .bc-alerts li { list-style: none; padding: 6px 0; border-bottom: 1px solid var(--bf-line); font-size: 14.5px; }
.bc .bc-alert-date { display: inline-block; min-width: 92px; color: var(--bf-soft); font-size: 13px; }

/* ------------------------------------------------------ step 2: calendar */

.bc .bc-phases { list-style: none; padding: 0 !important; margin: 0 0 18px; border-top: 2px solid #16130f; }
.bc .bc-phase { list-style: none; display: grid; grid-template-columns: 90px 1fr; gap: 2px 12px; padding: 9px 0; border-bottom: 1px solid var(--bf-line); font-size: 15px; line-height: 1.5; }
.bc .bc-phase > span:last-child { grid-column: 2; color: var(--bf-ink); }
.bc .bc-phase--best strong::after { content: ' ★ best time'; color: #0d7a63; font-size: 13px; }
.bc .bc-phase-when { color: var(--bf-soft); font-size: 13.5px; font-weight: 700; }

.bc .bc-timeline { position: relative; margin: 30px 0 14px; padding-top: 4px; }
.bc .bc-tl-months { display: grid; grid-template-columns: repeat(12, 1fr); border-bottom: 2px solid #16130f; }
.bc .bc-tl-months span { padding: 0 0 4px; font-size: 12px; font-weight: 700; text-align: center; color: var(--bf-soft); }
.bc .bc-tl-rows { display: grid; gap: 5px; padding: 8px 0 4px; }
.bc .bc-tl-row { position: relative; height: 26px; }
.bc .bc-tl-bar {
  position: absolute; top: 0; bottom: 0;
  left: calc(var(--from) / 12 * 100%); width: calc((var(--to) - var(--from)) / 12 * 100%);
  display: flex; align-items: center; padding: 0 8px; overflow: hidden; white-space: nowrap;
  border: 2px solid #16130f; background: #fff; font-size: 12.5px; color: #16130f;
}
.bc .bc-tl-row--best .bc-tl-bar { background: #3ECFB0; }
.bc .bc-tl-row--now .bc-tl-bar { background: #FFE08A; box-shadow: 3px 3px 0 #16130f; }
.bc .bc-tl-today {
  position: absolute; top: 0; bottom: 0; left: calc(var(--at) / 12 * 100%);
  border-left: 2px dashed #E4572E; pointer-events: none;
}
.bc .bc-tl-today span { position: absolute; top: -20px; left: -22px; padding: 0 4px; background: #E4572E; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.bc .bc-phase-notes { list-style: none; padding: 0 !important; margin: 0 0 14px; }
.bc .bc-phase-notes li { list-style: none; padding: 5px 0; font-size: 14.5px; line-height: 1.5; color: var(--bf-ink); }
.bc .bc-phase-notes li.is-now { background: #FDF3D8; padding-left: 8px; }

.bc .bc-dates { list-style: none; padding: 0 !important; margin: 0 0 16px; border-top: 2px solid #16130f; }
.bc .bc-dates li { list-style: none; display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--bf-line); font-size: 15px; line-height: 1.5; }
.bc .bc-dates li.is-past { color: var(--bf-soft); }
.bc .bc-dates li.is-ahead .bc-date { font-weight: 700; color: #16130f; }
.bc .bc-date { font-size: 14px; }
@media (max-width: 520px) { .bc .bc-dates li { grid-template-columns: 1fr; gap: 0; } }

.bc .bc-state, .bc .bc-found { margin: 10px 0 16px; padding: 12px 0 2px 14px; border-left: 4px solid #16130f; }
.bc .bc-state-head { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bf-soft); }
.bc .bc-found p { font-size: 15.5px; line-height: 1.55; }

/* ------------------------------------------------------ figures */

.bc .bc-figure { margin: 8px 0 18px; }
.bc .bc-figure figcaption { margin: 0 0 10px; font-family: var(--dl-font-display); font-size: 17px; font-weight: 700; color: #16130f; }

/* when cuts show up: a month bar chart */
.bc .bc-months { display: grid; grid-template-columns: repeat(9, 1fr); align-items: end; margin-bottom: 12px; }
.bc .bc-month { display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; height: 152px; }
.bc .bc-bar { display: block; height: calc(var(--v) / 87 * 120px); margin: 0 3px; background: #16130f; }
.bc .bc-month:nth-child(-n+4) .bc-bar { background: #3ECFB0; border: 2px solid #16130f; border-bottom: 0; }
/* the label sits under the baseline, in the flow, so it can't run into the note */
.bc .bc-m { display: block; padding-top: 4px; border-top: 2px solid #16130f; text-align: center; font-size: 12px; font-weight: 700; line-height: 1.2; color: var(--bf-soft); }
@media (max-width: 480px) { .bc .bc-m { font-size: 10px; } .bc .bc-bar { margin: 0 2px; } }

/* where the money goes: one stacked bar */
.bc .bc-stack { display: flex; height: 64px; border: 2px solid #16130f; overflow: hidden; }
.bc .bc-seg {
  display: flex; flex-direction: column; justify-content: center; flex: 0 0 calc(var(--w) * 1%);
  min-width: 0; padding: 0 6px; overflow: hidden; white-space: nowrap;
  border-right: 2px solid #16130f; font-size: 12px; color: #16130f;
}
.bc .bc-seg:last-child { border-right: 0; }
.bc .bc-seg b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.bc .bc-seg:not(.bc-seg--1) b { display: none; }
.bc .bc-seg--1 { background: #3ECFB0; }
.bc .bc-seg--2 { background: #FFE08A; }
.bc .bc-seg--3 { background: #B9E3FF; }
.bc .bc-seg--4 { background: #FFB3A7; }
.bc .bc-seg--5 { background: #E5D4FF; }
.bc .bc-seg--6 { background: #FFD3A3; }
.bc .bc-seg--7 { background: #EDE7DA; }
.bc .bc-legend { list-style: none; padding: 0 !important; margin: 12px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
@media (max-width: 620px) { .bc .bc-legend { grid-template-columns: 1fr; } }
.bc .bc-legend li { list-style: none; position: relative; padding-left: 22px; font-size: 14px; line-height: 1.45; color: var(--bf-ink); }
.bc .bc-legend .bc-key { position: absolute; left: 0; top: 3px; width: 14px; height: 14px; border: 2px solid #16130f; }

/* the category list */
.bc .bc-cats { border-top: 2px solid #16130f; margin: 6px 0 4px; }
.bc .bc-cat { border-bottom: 1px solid var(--bf-line); }
.bc .bc-cat > summary { display: flex; align-items: center; gap: 10px; padding: 10px 2px; cursor: pointer; list-style: none; font-size: 16px; font-weight: 600; color: #16130f; }
.bc .bc-cat > summary::-webkit-details-marker { display: none; }
.bc .bc-cat > summary::after { content: '+'; margin-left: auto; font-weight: 700; font-size: 20px; color: var(--bf-soft); }
.bc .bc-cat[open] > summary::after { content: '–'; }
.bc .bc-cat-icon { flex: 0 0 28px; font-size: 22px; text-align: center; }
.bc .bc-cat-name { flex: 1 1 auto; }
.bc .bc-cat-body { padding: 0 0 12px 38px; }
.bc .bc-cat-body p { margin: 0 0 8px; font-size: 15px; line-height: 1.6; color: var(--bf-ink); }
.bc .bc-cat.is-listed > summary { background: #FDF3D8; }
.bc .bc-onlist { display: inline-block; margin-left: 6px; padding: 1px 7px; border: 1.5px solid #16130f; background: #FFB3A7; font-size: 11.5px; font-weight: 700; vertical-align: 2px; }
.bc .bc-onlist-key { display: block; margin-top: 6px; font-size: 14px; color: var(--bf-soft); }

/* evidence meter: three squares */
.bc .bc-meter { display: inline-flex; gap: 3px; flex: 0 0 auto; vertical-align: -1px; }
.bc .bc-meter {
  width: 42px; height: 12px;
  background:
    linear-gradient(90deg, var(--m1) 0 12px, transparent 12px 15px, var(--m2) 15px 27px, transparent 27px 30px, var(--m3) 30px 42px);
  outline: 0;
  --m1: #E6DFCF; --m2: #E6DFCF; --m3: #E6DFCF;
}
.bc .bc-meter[data-level="1"] { --m1: #16130f; }
.bc .bc-meter[data-level="2"] { --m1: #16130f; --m2: #16130f; }
.bc .bc-meter[data-level="3"] { --m1: #16130f; --m2: #16130f; --m3: #16130f; }
.bc .bc-cat .bc-meter { margin-left: 4px; }

/* horizontal bars: what districts cut */
.bc .bc-bars { list-style: none; padding: 0 !important; margin: 0; }
.bc .bc-bars li { list-style: none; display: grid; grid-template-columns: minmax(120px, 230px) 1fr 44px; align-items: center; gap: 10px; padding: 4px 0; font-size: 14.5px; color: var(--bf-ink); }
.bc .bc-bars-bar { display: block; height: 16px; width: calc(var(--v) / 32 * 100%); background: #16130f; }
.bc .bc-bars li.is-listed .bc-bars-bar { background: #E4572E; }
.bc .bc-bars li.is-listed .bc-bars-label { font-weight: 700; }
.bc .bc-bars-num { font-weight: 700; text-align: right; }
@media (max-width: 520px) { .bc .bc-bars li { grid-template-columns: 1fr 44px; } .bc .bc-bars-bar { grid-column: 1 / -1; grid-row: 2; } }

.bc .bc-ladder { padding-left: 0 !important; margin: 4px 0 6px; counter-reset: bcl; border-top: 2px solid #16130f; }
.bc .bc-ladder li { list-style: none; counter-increment: bcl; position: relative; padding: 9px 0 9px 42px; border-bottom: 1px solid var(--bf-line); font-size: 15.5px; line-height: 1.55; }
.bc .bc-ladder li::before {
  content: counter(bcl); position: absolute; left: 0; top: 9px;
  display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid #16130f; background: #FFE08A; font-weight: 700;
}

/* harm vs noticed */
.bc .bc-plot {
  position: relative; height: 340px; margin: 4px 0 0 22px;
  border-left: 2px solid #16130f; border-bottom: 2px solid #16130f;
  background:
    linear-gradient(#FDF3D8, #FDF3D8) 0 0 / 50% 50% no-repeat,
    linear-gradient(var(--bf-line), var(--bf-line)) 50% 0 / 1px 100% no-repeat,
    linear-gradient(var(--bf-line), var(--bf-line)) 0 50% / 100% 1px no-repeat;
}
.bc .bc-plot-y { position: absolute; left: -24px; top: 50%; transform: translate(-50%, -50%) rotate(-90deg); white-space: nowrap; font-size: 12.5px; font-weight: 700; color: var(--bf-soft); }
.bc .bc-plot-x { position: absolute; right: 0; bottom: -24px; font-size: 12.5px; font-weight: 700; color: var(--bf-soft); }
.bc .bc-dot {
  position: absolute; left: calc(var(--x) * 1%); bottom: calc(var(--y) * 1%);
  transform: translate(-50%, 50%); padding: 2px 8px; border: 2px solid #16130f; border-radius: 999px;
  background: #fff; font-size: 12.5px; font-weight: 600; white-space: nowrap; color: #16130f;
}
.bc .bc-dot.is-listed { background: #E4572E; color: #fff; }
.bc .bc-plot + .bc-note { margin-top: 38px; }
@media (max-width: 620px) {
  .bc .bc-plot { height: 440px; }
  .bc .bc-dot { font-size: 11px; padding: 1px 6px; border-radius: 10px; white-space: normal; max-width: 96px; text-align: center; }
}

/* ------------------------------------------------------ step 5 */

.bc .bc-offsets { border-top: 2px solid #16130f; margin: 6px 0 12px; }
.bc .bc-offset, .bc .bc-check { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--bf-line); font-size: 15px; line-height: 1.5; cursor: pointer; }
.bc .bc-offset input, .bc .bc-check input { margin-top: 4px; flex: 0 0 auto; accent-color: #16130f; }
.bc .bc-check { border-bottom: 0; margin: 4px 0 6px; }
.bc .bc-offset:has(input:checked) { background: #FDF3D8; }

/* ------------------------------------------------------ help */

.bc .bc-cta-list { list-style: disc; padding-left: 22px; margin: 0 0 16px; }
.bc .bc-cta-list li { list-style: disc; font-size: 16px; line-height: 1.6; color: var(--bf-ink); margin-bottom: 4px; }
