/* Croton civic data: editorial spacing and an opt-in budget explorer.
   Only /data loads this file. Existing data, sources and shared charts stay intact. */
body .dp {
  --data-navy: #244b61;
  --data-clay: #a65e36;
  --data-wash: #f1eee7;
  max-width: 1060px;
  padding: 2.6rem 2rem 5rem;
}
body .dp > .kicker {
  display: flex; gap: .7rem; align-items: center;
  font-size: .69rem; letter-spacing: .14em; color: var(--ink-secondary);
}
body .dp > .kicker span { color: var(--accent); }
body .dp h1 {
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1.03; letter-spacing: -.035em;
  margin: .8rem 0 1rem; max-width: 850px;
}
body .dp .lede {
  max-width: 830px; font-style: normal; font-size: 1.04rem;
  line-height: 1.75; margin: 0 0 1.8rem;
}
.data-jumps {
  display: flex; flex-wrap: wrap; align-items: center; gap: .45rem 1.4rem;
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule);
  padding: .8rem 0; margin: 0 0 1.75rem;
  font-family: var(--sans, system-ui, sans-serif); font-size: .78rem;
}
.data-jumps > span {
  font-size: .64rem; text-transform: uppercase; letter-spacing: .1em;
  font-weight: 700; color: var(--ink-muted); margin-right: .25rem;
}
.data-jumps a { color: var(--ink); text-decoration: none; padding: .25rem 0; }
.data-jumps a span { color: var(--accent); margin-left: .3rem; }
.data-jumps a:hover { text-decoration: underline; text-underline-offset: .25rem; }
body .dp .dbcards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0 0 1.7rem; }
body .dp .dbcard {
  background: transparent; border: 0; border-top: 1px solid var(--rule);
  border-radius: 0; padding: 1rem 1.1rem 1.1rem 0; min-width: 0;
}
body .dp .dbcard:nth-child(3n + 2), body .dp .dbcard:nth-child(3n + 3) { padding-left: 1.1rem; border-left: 1px solid var(--rule); }
body .dp .dbcard .t { font-size: 1.13rem; line-height: 1.25; }
body .dp .dbcard .d { font-size: .79rem; line-height: 1.6; margin-top: .45rem; }
body .dp .dbcard .c { color: var(--ink-secondary); font-size: .64rem; margin-top: .7rem; }
body .dp .dbcard:hover .t { text-decoration: underline; text-underline-offset: .2rem; }
body .dp .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); }
body .dp .kpi { border: 0; background: transparent; border-radius: 0; padding: 1.2rem .65rem; text-align: left; }
body .dp .kpi + .kpi { border-left: 1px solid var(--rule); }
body .dp .kpi .n { font-size: clamp(1.4rem, 2.8vw, 2rem); letter-spacing: -.025em; }
body .dp .kpi .l { text-transform: none; letter-spacing: 0; color: var(--ink-secondary); line-height: 1.4; margin-top: .5rem; }
body .dp .src { line-height: 1.6; font-size: .75rem; }
body .dp > h2 { margin-top: 3.2rem; font-size: 1.85rem; letter-spacing: -.02em; padding-bottom: .6rem; }
body .dp .note { max-width: 900px; line-height: 1.7; margin: .6rem 0 1rem; }
body .dp .chart { border-radius: 3px; padding: 1.1rem .8rem .7rem; }
body .dp .sm-grid { gap: .8rem; margin-top: 1.3rem; }
body .dp .sm { padding: .9rem 1rem; }
body .dp .sm .v { margin-top: .55rem; font-size: 1.6rem; }
body .dp details.tv > summary { padding: .55rem 0; }
body .dp :is(#village-budget, #capital-plan, #village-over-time, #school-district, [id^="c-"]) { scroll-margin-top: 85px; }
.data-section-heading {
  display: flex; justify-content: space-between; align-items: end; gap: 1.5rem;
  margin-top: 3.5rem; padding-top: 1.3rem; padding-bottom: .7rem;
  border-top: 2px solid var(--ink);
}
.data-eyebrow { font-size: .65rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-secondary); }
body .dp .data-section-heading h2 { border: 0; font-size: clamp(2rem, 3.6vw, 2.8rem); line-height: 1.1; letter-spacing: -.03em; padding: 0; margin: .55rem 0 0; }
.data-source-link { flex-shrink: 0; font-size: .74rem; color: var(--ink); padding-bottom: .25rem; text-underline-offset: .25rem; }
.data-source-link span { margin-left: .5rem; }
body .dp .budget-feature { padding: 0; background: var(--paper-card); border-color: var(--rule); }
.bw.bw-editorial {
  --budget-soft: #f4f1ea;
  --budget-rule: var(--rule);
  text-align: left; padding: 1.35rem 1.5rem 1.25rem;
  font-size: .9rem; -webkit-tap-highlight-color: transparent;
}
.bw-editorial .bw-pie, .bw-editorial .bw-crumbs { user-select: none; touch-action: manipulation; }
.bw-editorial .bw-crumbs { display: flex; flex-wrap: wrap; align-items: center; }
.bw-editorial .bw-crumb { border: 0; background: none; cursor: pointer; border-radius: 2px; }
.bw-editorial .bw-crumb:hover { text-decoration: underline; text-underline-offset: .2rem; }
.bw-editorial .bw-crumb[disabled] { cursor: default; text-decoration: none; font-weight: 700; }
.bw-editorial .bw-mseg { border: 0; cursor: pointer; font-family: inherit; font-weight: 700; }
.bw-editorial .bw-tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; text-align: left; }
.bw-editorial .bw-tbl td { border-bottom: 1px solid var(--rule); vertical-align: top; }
.bw-editorial .bw-tbl td:last-child { text-align: right; white-space: nowrap; width: 7.5rem; }
.bw-editorial .bw-tbl tr.g td { font-weight: 700; }
.bw-editorial .bw-tbl tr.d td:first-child { padding-left: 1.3rem; }
.bw-editorial .bw-row { cursor: pointer; }
.bw-editorial .bw-row[data-static] { cursor: default; }
.bw-editorial .bw-acts { margin-top: 1rem; text-align: left; }
.bw-editorial .bw-acts h4 { font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; }
.bw-editorial .bw-act { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; border: 1px solid var(--rule); margin-bottom: .5rem; border-radius: 3px; }
.bw-editorial .bw-act .amt { font-family: Georgia, serif; font-weight: 700; color: var(--blue-civic); white-space: nowrap; }
.bw-editorial .bw-act .typ { font-size: .64rem; text-transform: uppercase; font-weight: 700; }
.bw-editorial .bw-act .dsc { flex: 1 1 14rem; font-size: .84rem; line-height: 1.5; }
.bw-editorial .bw-act a { font-size: .8rem; white-space: nowrap; }
.bw-editorial .bw-mode { margin: 0 0 1.25rem; border-color: var(--budget-rule); border-radius: 3px; width: auto; display: inline-flex; background: var(--paper); padding: 3px; gap: 3px; }
.bw-editorial .bw-mseg { font-size: .76rem; letter-spacing: 0; padding: .65rem 1rem; color: var(--ink-secondary); background: transparent; border-radius: 2px; min-height: 42px; }
.bw-editorial .bw-mseg.on { background: var(--data-navy); color: white; }
.bw-editorial .bw-crumbs { margin-bottom: .6rem; gap: .3rem; }
.bw-editorial .bw-crumb { font-family: var(--sans, system-ui, sans-serif); font-size: .75rem; color: var(--ink-secondary); padding: .3rem .15rem; }
.bw-editorial .bw-crumb[disabled] { color: var(--ink); }
.bw-editorial .bw-sep { font-size: .8rem; padding: 0 .15rem; }
.bw-editorial .bw-hint { text-align: left; margin: 0 0 .8rem; font-size: .74rem; color: var(--ink-secondary); }
.bw-editorial .bw-overview { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(0, 1.25fr); gap: 1rem 2rem; align-items: center; padding-bottom: .9rem; }
.bw-editorial .bw-pie { display: flex; justify-content: center; min-width: 0; }
.bw-editorial .bw-pie .vega-embed { max-width: 100%; }
.bw-editorial .bw-pie svg { max-width: 100%; height: auto; }
.bw-editorial .bw-list { margin: 0; min-width: 0; }
.bw-editorial .bw-row {
  display: grid; grid-template-columns: 9px minmax(0, 1fr) 2.7rem 6.8rem 9px;
  align-items: center; gap: .65rem; width: 100%; text-align: left;
  font-family: var(--sans, system-ui, sans-serif); background: transparent;
  border: 0; border-bottom: 1px solid var(--rule); border-radius: 0;
  padding: .85rem .35rem; min-height: 54px;
}
.bw-editorial .bw-row i { width: 8px; height: 23px; border-radius: 1px; }
.bw-editorial .bw-row .n { font-size: .82rem; line-height: 1.4; color: var(--ink); }
.bw-editorial .bw-row .pc { font-size: .72rem; color: var(--ink-secondary); text-align: right; }
.bw-editorial .bw-row .am { font-family: var(--sans, system-ui, sans-serif); font-size: .83rem; font-weight: 650; color: var(--ink); text-align: right; }
.bw-editorial .bw-row .go { font-size: 1.2rem; color: var(--accent); text-align: right; }
.bw-editorial button.bw-row:hover { background: var(--budget-soft); }
.bw-editorial .bw-row[data-static] { grid-template-columns: 9px minmax(0, 1fr) 2.7rem 6.8rem; }
.bw-editorial .bw-note { border-top: 1px solid var(--rule); padding-top: 1rem; margin-top: .3rem; color: var(--ink-secondary); font-size: .72rem; line-height: 1.65; }
.bw-editorial .bw-note:empty { display: none; }
.bw-editorial .bw-detail { margin-top: 1.2rem; }
.bw-editorial .bw-detail:empty { display: none; }
.bw-editorial .bw-tbl { font-size: .85rem; margin-top: 0; }
.bw-editorial .bw-tbl td { border-color: var(--rule); padding: .7rem .65rem; }
.bw-editorial .bw-tbl tr.g td { background: var(--budget-soft); color: var(--ink); }
.bw-editorial .bw-tbl tr.d td { color: var(--ink-secondary); font-size: .79rem; }
.bw-editorial .bw-acts h4 { margin-top: 1.8rem; color: var(--ink-secondary); }
.bw-editorial .bw-act { padding: .85rem; }
.bw-editorial .bw-act .dsc { color: var(--ink-secondary); }
.bw-editorial .bw-load-error { padding: 1.2rem; line-height: 1.6; }
body .dp :is(a, button, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[data-theme="dark"] .dp { --data-navy: #335a70; --data-clay: #d19670; --data-wash: #282722; }
[data-theme="dark"] .bw-editorial { --budget-soft: #282b2c; }
@media (max-width: 760px) {
  body .dp { padding: 1.8rem 1.1rem 4rem; }
  body .dp .dbcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body .dp .dbcard:nth-child(n) { padding: 1rem .9rem 1rem 0; border-left: 0; }
  body .dp .dbcard:nth-child(even) { padding-left: .9rem; border-left: 1px solid var(--rule); }
  body .dp .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body .dp .kpi { border-bottom: 1px solid var(--rule); }
  body .dp .kpi:nth-child(4) { border-left: 0; }
  .bw-editorial .bw-overview { grid-template-columns: 1fr; gap: .3rem; }
  .bw.bw-editorial { padding: 1rem; }
  .bw-editorial .bw-pie { padding-top: .3rem; }
  .bw-editorial .bw-row { grid-template-columns: 8px minmax(0, 1fr) 2.3rem 6.1rem 8px; gap: .45rem; }
  .bw-editorial .bw-row[data-static] { grid-template-columns: 8px minmax(0, 1fr) 2.3rem 6.1rem; }
}
@media (max-width: 430px) {
  body .dp { padding-inline: .9rem; }
  body .dp > .kicker { font-size: .59rem; gap: .45rem; letter-spacing: .08em; }
  body .dp h1 { font-size: 2.8rem; }
  body .dp .lede { font-size: .94rem; line-height: 1.65; }
  .data-jumps { gap: .4rem 1rem; }
  .data-jumps > span { flex-basis: 100%; }
  body .dp .dbcard .t { font-size: 1rem; }
  body .dp .kpi .n { font-size: 1.45rem; }
  .data-section-heading { display: block; }
  .data-source-link { display: inline-block; margin-top: .8rem; }
  .bw.bw-editorial { padding: .85rem .65rem; }
  .bw-editorial .bw-mseg { padding: .55rem .65rem; font-size: .7rem; }
  .bw-editorial .bw-row .n { font-size: .76rem; }
  .bw-editorial .bw-row .am { font-size: .76rem; }
  .bw-editorial .bw-row .pc { font-size: .67rem; }
  .bw-editorial .bw-tbl td { padding: .65rem .4rem; }
}
@media (prefers-reduced-motion: reduce) {
  body .dp *, body .dp *::before, body .dp *::after { scroll-behavior: auto; transition: none !important; animation: none !important; }
}


/* Budget instrument: each perimeter tick represents one percentage point.
   Hover/focus links the ring, exact value, and comparison row. */
.bw-editorial .bw-pie { flex-direction: column; align-items: center; }
.bw-instrument { position: relative; width: 100%; max-width: 388px; aspect-ratio: 1; isolation: isolate; }
.bw-editorial .bw-ring { display: block; width: 100%; height: auto; overflow: visible; }
.bw-scale line { stroke: var(--rule); stroke-width: .8; }
.bw-scale line.major { stroke: var(--ink-muted); stroke-width: 1; opacity: .55; }
.bw-arc { pointer-events: fill; transition: opacity 220ms ease, filter 220ms ease; outline: none; }
.bw-arc[role="button"] { cursor: pointer; }
.bw-arc.is-muted { opacity: .28; }
.bw-arc.is-active { filter: drop-shadow(0 3px 3px #182c3526); }
.bw-arc:focus-visible { stroke: var(--ink); stroke-width: 2; }
.bw-center { position: absolute; inset: 26%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .65rem; text-align: center; pointer-events: none; }
.bw-center-label { font: .68rem/1.4 var(--sans,system-ui,sans-serif); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-secondary); max-width: 180px; }
.bw-center-amount { font-family: Georgia,serif; font-size: clamp(1.45rem,2.5vw,2rem); font-weight: 500; letter-spacing: -.045em; line-height: 1.1; color: var(--ink); white-space: nowrap; }
.bw-center-share { font: .65rem/1.5 var(--sans,system-ui,sans-serif); color: var(--ink-muted); }
.bw-center.is-category .bw-center-label { color: var(--ink); letter-spacing: .035em; }
.bw-ring-caption { font-size: .66rem; letter-spacing: .04em; color: var(--ink-muted); text-align: center; margin: -.1rem 0 .7rem; }
.bw-editorial .bw-overview { gap: 1rem 2.4rem; }
.bw-editorial .bw-row { position: relative; isolation: isolate; overflow: hidden; transition: background 220ms ease; padding-block: .95rem; }
.bw-editorial .bw-row::after { content: ""; position: absolute; z-index: -1; left: 0; bottom: 0; width: var(--slice-share); height: 2px; background: var(--slice-color); opacity: .42; transition: height 240ms ease, opacity 240ms ease; }
.bw-editorial .bw-row.is-active { background: var(--budget-soft); }
.bw-editorial .bw-row.is-active::after { height: 4px; opacity: 1; }
.bw-editorial .bw-row i { height: 9px; width: 9px; border-radius: 50%; transition: transform 240ms ease; }
.bw-editorial .bw-row.is-active i { transform: scale(1.3); }
.bw-editorial .bw-row .go { transition: transform 240ms ease; }
.bw-editorial .bw-row.is-active .go { transform: translateX(2px); }
.bw-editorial .bw-mode { position: relative; border: 1px solid var(--rule); border-radius: 5px; }
.bw-editorial .bw-mseg { transition: color 240ms ease, background 240ms ease, box-shadow 240ms ease; }
.bw-editorial .bw-mseg.on { box-shadow: 0 2px 5px #183a4c18; }
.bw-editorial .bw-hint { color: var(--ink-secondary); margin-bottom: 1.1rem; line-height: 1.6; }
.bw-editorial .bw-crumb { transition: color 180ms ease; }
@media (max-width: 760px) {
  .bw-instrument { max-width: 340px; }
  .bw-center-amount { font-size: 1.85rem; }
  .bw-editorial .bw-overview { gap: .7rem; }
}
@media (max-width: 430px) {
  .bw-center-label { font-size: .6rem; letter-spacing: .06em; }
  .bw-center-amount { font-size: 1.65rem; }
  .bw-center-share { font-size: .6rem; }
  .bw-center { gap: .45rem; }
}
@media (prefers-reduced-motion: reduce) {
  .bw-arc, .bw-editorial .bw-row, .bw-editorial .bw-row::after,
  .bw-editorial .bw-row i, .bw-editorial .bw-row .go, .bw-editorial .bw-mseg { transition: none !important; }
}

.bw-editorial .bw-back { font: 600 .74rem var(--sans,system-ui,sans-serif); background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: 3px; padding: .5rem .7rem; margin-right: .6rem; cursor: pointer; transition: background 180ms ease; }
.bw-editorial .bw-back:hover:not(:disabled) { background: var(--budget-soft); }
.bw-editorial .bw-back:disabled { opacity: .42; cursor: default; }
