/* Worker B (analysis): cohorts, transfers, flows, events */
.co-legend { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: .75rem; color: var(--muted, #595959); flex-wrap: wrap; }
.co-ramp { display: inline-block; width: 160px; height: 10px; border-radius: 2px; }
.co-zero { margin-left: 8px; }
.cap-mark { display: inline-block; width: 8px; height: 8px; border: 1.5px solid #595959; border-radius: 50%; margin-right: 6px; vertical-align: baseline; box-sizing: border-box; }
.cap-notes { margin: 10px 0 0; padding: 0; list-style: none; font-size: .8125rem; color: var(--muted, #595959); max-width: 90ch; }
.cap-notes li { margin: 3px 0; }
.cap-basis { display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 999px; background: #f0f0f0; color: #333; font: 600 .6875rem/1.5 var(--font, inherit); vertical-align: middle; }
.tf-hook:empty { display: none; }
.tf-hook table.data td.sup { color: #595959; }
.oe-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 10px 0 6px; }
.oe-stat { border: 1px solid #d9d9d9; border-radius: 4px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.oe-stat b { font-size: 1.75rem; line-height: 1.15; font-weight: 700; }
.oe-stat span { font-size: .875rem; color: #111; }
.oe-stat small { font-size: .75rem; color: #595959; }
.oe-table th, .oe-table td { white-space: nowrap; padding: 4px 8px; }
.oe-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 8px 0; max-width: 100ch; font-size: .875rem; }
.oe-dl dt { font-weight: 600; } .oe-dl dd { margin: 0; color: #333; }
.oe-areas { columns: 3 200px; margin: 6px 0; padding-left: 18px; font-size: .875rem; }
@media (max-width: 600px) { .oe-dl { grid-template-columns: 1fr; } .oe-dl dt { margin-top: 6px; } }

/* ---- flows: diverging chart, readout, hatched swatch, map labels ---- */
.fl-div { margin-top: 4px; }
.fl-div svg rect[tabindex]:focus-visible { outline: 2px solid #cc0033; outline-offset: -2px; }
.fl-readout { min-height: 3.6em; margin: 8px 0 0; font-size: .875rem; color: var(--ink-2, #333); max-width: 90ch; }
.legend .sq.ood, .sq.ood { background: #a9c8ef; border: 1px solid #5c8fd6; box-sizing: border-box; }   /* edge on the small legend swatch only; the chart bars stay unoutlined (owner removed a bar outline twice, 10-16 and 10-22: it makes the light segment look taller); tools/visual_check.mjs guards the bars */
.fl-legend { margin: 6px 0 8px; }
.fl-legend .info-btn { margin-left: 2px; }
@media (max-width: 520px) { .fl-readout { min-height: 5.6em; } }
.note.quiet { color: var(--muted, #595959); font-size: .8125rem; margin: 4px 0 8px; max-width: 90ch; }
.note.quiet:empty { display: none; }
.touch-hint { display: none; }
@media (pointer: coarse) { .touch-hint { display: block; } }
.cl-wrap { background: none; border: 0; }
.cl { position: absolute; left: 0; top: 0; white-space: nowrap; font: 600 11px/16px var(--font, Inter, system-ui, sans-serif); color: #111; padding: 0 4px; background: rgba(255,255,255,.82); border-radius: 3px; pointer-events: none; }
.cl.sel { color: #cc0033; font-weight: 700; }
.ood-chip { position: absolute; left: 0; top: 0; white-space: nowrap; font: 700 11px/14px var(--font, Inter, system-ui, sans-serif); color: #0b2a55; padding: 0 5px; border: 1px solid #5c8fd6; border-radius: 3px; background: #a9c8ef; pointer-events: auto; }
table.flm thead th.selc, table.flm tbody tr.selr th { color: var(--maroon, #940804); background: var(--red-tint, #fbeaee); font-weight: 700; }

/* ---- capacity bars ---- */
.cap-chart svg text { font-family: inherit; }
.cap-row-hit:focus-visible { outline: 2px solid #cc0033; }

/* ---- events: year chip, not-adopted state, role lines ---- */
.ev-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; padding: 6px 12px; border-radius: 6px; background: var(--red-tint, #fdecee); font-size: .875rem; }
.ev-chip[hidden] { display: none; }
.ev-chip .btn { padding: 2px 10px; }
.na-state { border: 1px dashed #8a8a8a; border-radius: 8px; padding: 12px 14px; background: #f7f7f7; color: #333; }
.na-state b { display: block; font-size: 1rem; margin-bottom: 4px; }
.na-state ul { margin: 6px 0 0; padding-left: 18px; font-size: .875rem; }
ul.ev-roles { list-style: none; margin: 8px 0; padding: 0; font-size: .875rem; }
ul.ev-roles li { margin: 3px 0; }
.ev-card.na .role-tag, .na-state .role-tag { border-color: #8a8a8a; color: #4a4a4a; background: #f0f0f0; }
.ev-card .badge.na { background: #eee; color: #333; border: 1px solid #8a8a8a; }
.ev-row { flex-direction: column; flex-wrap: nowrap; gap: 2px; }
.ev-dot { width: 100%; flex-direction: row; justify-content: flex-start; align-items: center; gap: 8px; padding: 4px 6px; text-align: left; }
.ev-d { flex: none; min-width: 3.4em; }
.ev-t { font: 500 .75rem/1.25 var(--font, inherit); color: var(--ink, #111); white-space: normal; }
.impact td.zr small, .zr small { color: var(--muted, #595959); display: block; }
#fl-take { min-height: 4.6em; }
#fl-fnote.note.quiet:empty { display: block; min-height: 1.3em; }
@media (max-width: 700px) { #fl-take { min-height: 7em; } }

.map-toast { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 1200; padding: 6px 12px; border-radius: 6px; background: #111; color: #fff; font: 600 .8125rem/1.3 var(--font, Inter, system-ui, sans-serif); pointer-events: none; }
.map-toast[hidden] { display: none; }
.role-named { border-style: dashed; border-color: #767676; color: #4a4a4a; background: #f0f0f0; }
.oe-areas li { break-inside: avoid; } .oe-areas .cap-basis { white-space: nowrap; }
.oe-details { margin: 10px 0; } .oe-details summary { cursor: pointer; font-weight: 600; font-size: .9rem; padding: 6px 0; }

.mlab.sel { color: #cc0033; font-weight: 700; }
.mlab.dim { opacity: .6; }
.mapside[hidden] { display: none; }

/* ---- transfers: detail card beside the chart (>=1100px) / below it (phone) ---- */
.fl-split { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .fl-split { grid-template-columns: minmax(0, 1fr) 300px; } .fl-card { position: sticky; top: calc(var(--bar-h, 64px) + 12px); } }
.fl-card { border: 1px solid var(--card-rule, #d8d8d8); border-radius: 8px; padding: 12px 14px; background: #fff; font-size: .875rem; min-height: 260px; }
.fl-card-h { margin: 0 0 6px; font-size: 1rem; }
.fl-card-t { width: 100%; border-collapse: collapse; margin: 0 0 10px; }
.fl-card-t caption { display: flex; justify-content: space-between; text-align: left; font-weight: 600; padding: 4px 0; border-bottom: 1px solid var(--card-rule, #ddd); }
.fl-card-t caption b { font-variant-numeric: tabular-nums; }
.fl-card-t th { text-align: left; font-weight: 400; padding: 3px 0; background: none; position: static; }
.fl-card-t td.n { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; padding-left: 8px; }
.fl-card-t td.p { text-align: right; width: 3.6em; color: var(--muted, #595959); font-variant-numeric: tabular-nums; }
.fl-card .sq { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 8px; vertical-align: -1px; }
.fl-net { display: flex; align-items: baseline; gap: 8px; margin: 0 0 10px; padding: 8px 10px; background: var(--red-tint, #fdecee); border-radius: 4px; }
.fl-net b { font-size: 1.25rem; font-variant-numeric: tabular-nums; margin-left: auto; }
.fl-net small { display: none; }
.fl-card .mut { color: var(--muted, #595959); font-weight: 400; }
.fl-seemap { font-weight: 600; }

/* line charts: swatch legend on phones only (desktop has end labels) */
.legend.line-leg { display: none; margin: 4px 0 2px; }
@media (max-width: 600px) { .legend.line-leg { display: flex; } }

/* Cohort table (desktop/tablet): grade step x year pair, compact fixed-width cells */
#co-table { overflow-x: auto; }
#co-table table.co-desk { width: max-content; min-width: 0; border-collapse: separate; border-spacing: 0; }
#co-table .co-desk th, #co-table .co-desk td { padding: 0; border-bottom: 0; text-align: center; position: static; background: transparent; }
#co-table .co-desk thead th { padding: 6px 2px; width: 120px; font-size: .78rem; font-weight: 600; color: var(--muted, #595959); border-bottom: 1px solid var(--line, #e0e0e0); white-space: nowrap; }
#co-table .co-desk thead th.co-h0 { width: auto; text-align: left; padding-right: 14px; }
#co-table .co-desk th.co-rl { text-align: left; font-weight: 500; font-size: .8125rem; padding: 0 14px 0 0; white-space: nowrap; color: var(--ink); }
#co-table .co-desk tr.co-grp th { text-align: left; padding: 12px 0 4px; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted, #595959); background: transparent; }
#co-table .co-desk td.co-td { width: 120px; height: 34px; padding: 1px; box-sizing: border-box; }
#co-table .co-desk .co-cell, #co-table .co-desk .co-c { display: flex; width: 100%; height: 32px; box-sizing: border-box; align-items: center; justify-content: center; border-radius: 3px; font-size: .8125rem; font-variant-numeric: tabular-nums; }
#co-table .co-desk .co-cell.is-cur { box-shadow: inset 0 0 0 2px var(--ink, #111); }
#co-table .co-desk .co-cell:hover { box-shadow: inset 0 0 0 2px var(--ink, #111); }
#co-table .co-desk .co-c { font-size: .75rem; }

/* Transfers restructure (T1): level chip, collapsed tables, bar lists */
.lv-chip { display: inline-block; vertical-align: middle; margin-left: 4px; padding: 1px 8px; border: 1px solid var(--card-rule, #d9d9d9); border-radius: 999px; color: var(--muted, #595959); background: transparent; font: 500 .6875rem/1.5 var(--font); white-space: nowrap; }
.oe-stat.em { border-color: #2a78d6; box-shadow: inset 4px 0 0 #2a78d6; }
.oe-stat.em b { color: #1d5fb0; }
.re-stats { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.tf-disc { margin: 8px 0 12px; }
.tf-disc-btn { appearance: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid var(--card-rule, #d9d9d9); border-radius: 999px; background: #fff; color: var(--ink, #111); font: 600 .8125rem/1 var(--font); cursor: pointer; }
.tf-disc-btn::before { content: ''; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.tf-disc-btn[aria-expanded="true"]::before { transform: rotate(45deg); }
.tf-disc-btn:hover { border-color: var(--ink, #111); }
.tf-disc-btn:focus-visible { outline: 2px solid var(--ink, #111); outline-offset: 2px; }
.tf-disc-body { margin-top: 10px; }
.tf-disc-body[hidden] { display: none; }
.bl { list-style: none; margin: 8px 0 4px; padding: 0; display: grid; gap: 2px 28px; grid-template-columns: 1fr; max-width: 760px; }
.bl-row { display: grid; grid-template-columns: minmax(110px, 36%) 1fr; gap: 10px; align-items: center; padding: 4px 0; border-radius: 4px; }
.bl-row:focus-visible { outline: 2px solid var(--ink, #111); outline-offset: 1px; }
.bl-name { display: flex; flex-direction: column; min-width: 0; text-align: right; }
.bl-n { font-size: .8125rem; font-weight: 600; line-height: 1.25; }
.bl-sub { font-size: .6875rem; color: var(--muted, #595959); line-height: 1.25; }
.bl-track { display: flex; align-items: center; gap: 6px; min-width: 0; }
.bl-bar { display: block; height: 13px; border-radius: 2px; flex: none; max-width: calc(100% - 3.2em); }
.bl-val { font-size: .75rem; font-variant-numeric: tabular-nums; }
@media (min-width: 900px) { .bl-campus { grid-template-columns: 1fr 1fr; max-width: none; } }
@media (max-width: 600px) { .bl-row { grid-template-columns: minmax(96px, 40%) 1fr; gap: 8px; } }

/* Transfers page sections: h2 header + one-line subtitle (same h2 as the Budget tab) */
.tf-sec { margin: 40px 0 14px; }
.tf-sec:first-child { margin-top: 8px; }
.tf-sec h2 { margin-bottom: 4px; }
.tf-sec-sub { margin: 0; color: var(--muted, #595959); max-width: 70ch; }
.fl-wh { margin: 8px 0 0; }

/* Students from outside the district, by campus: one column, grouped by level, one shared scale (bar width = (track - label room) x share of max) */
.oe-cb { max-width: 640px; margin: 4px 0 8px; }
.oe-cb-h { margin: 14px 0 4px; font: 600 .72rem/1.3 var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--muted, #595959); }
.oe-cb-h:first-child { margin-top: 6px; }
.oe-cb-l { list-style: none; margin: 0; padding: 0; }
.oe-cb-r { display: grid; grid-template-columns: 9.5em 1fr; gap: 10px; align-items: center; min-height: 24px; padding: 2px 0; border-radius: 3px; }
.oe-cb-r:focus-visible { outline: 2px solid var(--ink, #111); outline-offset: 1px; }
.oe-cb-n { font-size: .8125rem; font-weight: 600; text-align: right; line-height: 1.25; }
.oe-cb-t { display: flex; align-items: center; gap: 6px; min-width: 0; }
.oe-cb-b { display: block; flex: none; height: 13px; min-width: 2px; border-radius: 2px; background: #8a8a8a; }
.oe-cb-v { font-size: .75rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.oe-cb-v.mut { color: var(--muted, #595959); font-style: normal; }
@media (max-width: 600px) { .oe-cb-r { grid-template-columns: 9.4em 1fr; gap: 8px; } }

/* charter residents by school level (Transfers, Outside Coppell ISD) */
.cl-bar { display: flex; height: 18px; gap: 2px; margin: 8px 0 10px; max-width: 720px; }
.cl-seg { display: block; min-width: 2px; border-radius: 2px; }
.cl-seg.dim { opacity: .35; }
.cl-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 720px; margin-bottom: 8px; }
.cl-tile { border: 1px solid #d9d9d9; border-radius: 4px; padding: 8px 12px; display: flex; flex-direction: column; gap: 1px; position: relative; }
.cl-tile.on { border-color: #2a78d6; box-shadow: inset 4px 0 0 #2a78d6; }
.cl-tile b { font-size: 1.375rem; line-height: 1.2; font-weight: 700; }
.cl-tile .cl-n { font-size: .875rem; color: #111; }
.cl-tile small { font-size: .75rem; color: #595959; }
.cl-tile .sq { position: absolute; top: 12px; right: 12px; width: 10px; height: 10px; border-radius: 2px; border: 1px solid rgba(0,0,0,.15); }
@media (max-width: 640px) { .cl-tiles { gap: 8px; } .cl-tile { padding: 8px; } .cl-tile b { font-size: 1.25rem; } .cl-tile .cl-n { font-size: .75rem; } }

/* ---- How each class grows (classgrowth.js) ---- */
.cg { margin-top: var(--sp-5, 32px); }
.cg-sub { margin: 2px 0 8px; }
.cg-toggle { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; margin: 0 0 6px; border: 1px solid #b5b5b5; border-radius: var(--r, 6px); background: #fff; color: var(--ink-2, #333); font: 500 .8125rem var(--font); }
.cg-toggle[hidden] { display: none; }
.cg-toggle:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.cg-notes:empty { display: none; }
.cg-notes { margin: 6px 0 0; }
.cg-note { margin: 4px 0; font-size: .8125rem; color: var(--ink-2, #333); line-height: 1.45; display: flex; gap: 8px; align-items: baseline; }
.cg-num { flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #f4f4f3; border: 1px solid #c9c9c9; font-size: .6875rem; }
.cg-axis { margin: 4px 0 0; }
.cg-legend i.cg-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #111; margin-right: 6px; vertical-align: 1px; }
.cg-legend i.cg-dia { display: inline-block; width: 7px; height: 7px; border: 1.5px solid #111; background: #fff; transform: rotate(45deg); margin: 0 7px 0 3px; vertical-align: 1px; }
