:root { --ink:#1f2933; --muted:#616e7c; --line:#d9e2ec; --bg:#f7f9fb; --panel:#fff;
        --treated:#c0392b; --untreated:#d9e4dc; --panel-width: clamp(20rem, 32vw, 30rem); --focus:#1f6feb; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin:0; font:14px/1.45 system-ui, sans-serif; color:var(--ink); background:var(--bg); height:100vh; display:flex; flex-direction:column; }
header { display:flex; gap:1rem; align-items:center; padding:.55rem .9rem; background:var(--panel); border-bottom:1px solid var(--line); min-width:0; }
.brand { display:flex; align-items:center; gap:.4rem; min-width:0; }
.dataset-name { color:var(--muted); font-size:.82rem; max-width:18rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
header strong { font-size:1.05rem; letter-spacing:.04em; }
.build { color:var(--muted); font-size:.72rem; }
header label { display:flex; gap:.4rem; align-items:center; color:var(--muted); }
header select { max-width:16rem; }
header .year { flex:1; }
header input[type=range] { flex:1; min-width:8rem; }
#status { color:var(--muted); font-variant-numeric:tabular-nums; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:22rem; }
main { flex:1; display:grid; grid-template-columns:var(--panel-width) 6px 1fr; min-height:0; min-width:0; }
aside { background:var(--panel); border-right:1px solid var(--line); padding:.6rem; overflow:auto; }
#sidebar { display:flex; flex-direction:column; padding:0; overflow:hidden; }
.sidebar-body { flex:1; min-height:0; overflow:auto; padding:0 .6rem .6rem; }
.workspaces { display:flex; gap:.25rem; margin:.5rem .6rem .25rem; flex:none; }
.workspaces button { flex:1; min-width:0; min-height:2rem; border:1px solid var(--line); background:#eef2f6; padding:.3rem .45rem; border-radius:.35rem; cursor:pointer; font:inherit; font-size:.82rem; }
.workspaces button.active { background:var(--ink); color:#fff; border-color:var(--ink); }
.subnav { display:flex; gap:.2rem; margin:.15rem 0 .35rem; padding-bottom:.25rem; border-bottom:1px solid var(--line); flex-wrap:wrap; }
.subnav button { border:1px solid transparent; background:transparent; padding:.22rem .45rem; border-radius:.25rem; cursor:pointer; font:inherit; font-size:.78rem; color:var(--muted); }
.subnav button.active { background:#e8f1ff; color:var(--ink); border-color:#c7d8f2; }
.workspaces button:focus-visible, .subnav button:focus-visible, nav.tabs button:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }
.skip-link { position:absolute; left:.5rem; top:-3rem; z-index:20; background:#fff; border:1px solid var(--ink); padding:.35rem .55rem; }
.skip-link:focus { top:.5rem; }
.dataset-name::before { content:"·"; margin-right:.4rem; color:var(--line); }
.chat { flex:none; display:flex; flex-direction:column; gap:.3rem; height:var(--chat-height,15rem); min-height:8rem;
        padding:.45rem .55rem .55rem; border-top:1px solid var(--line); background:#fbfcfd; }
#chat-splitter { flex:none; height:6px; cursor:row-resize; background:var(--line); }
#chat-splitter:hover, #chat-splitter.dragging { background:#b7c4d1; }
.chat-head { display:flex; align-items:center; gap:.4rem; font-size:.78rem; font-weight:600; }
.chat-head .chat-model { color:var(--muted); font-weight:400; font-size:.66rem; margin-left:auto;
                         overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:9rem; }
.chat-head button { padding:.12rem .4rem; font-size:.7rem; }
.chat-log { flex:1; min-height:0; overflow:auto; display:flex; flex-direction:column; gap:.3rem; }
.chat-msg { padding:.3rem .45rem; border-radius:.4rem; font-size:.8rem; line-height:1.35;
            white-space:pre-wrap; overflow-wrap:anywhere; }
.chat-msg.user { background:#e8eef5; align-self:flex-end; max-width:92%; }
.chat-msg.agent { background:#fff; border:1px solid var(--line); align-self:stretch; }
.chat-msg.error { border-color:#e0b4b4; background:#fff4f4; }
.chat-msg pre { background:#f4f6f8; padding:.3rem; overflow:auto; margin:.25rem 0; border-radius:.25rem; }
.chat-msg code { background:#f4f6f8; padding:0 .15rem; border-radius:.2rem; }
.chat-actions { display:flex; flex-wrap:wrap; gap:.2rem; margin-top:.25rem; }
.chat-action { font-size:.66rem; color:var(--muted); border:1px solid var(--line);
               border-radius:.3rem; padding:0 .28rem; max-width:100%; overflow:hidden;
               text-overflow:ellipsis; white-space:nowrap; }
.chat-form { display:flex; gap:.3rem; align-items:stretch; }
.chat-form textarea { flex:1; resize:vertical; min-height:2.2rem; max-height:6rem; font:inherit;
                      font-size:.8rem; padding:.3rem; border:1px solid var(--line); border-radius:.35rem; }
.chat-form button { padding:.35rem .6rem; }
aside h2 { font-size:.88rem; text-transform:uppercase; letter-spacing:.07em; color:var(--muted); margin:.8rem 0 .35rem; }
aside label { display:flex; gap:.4rem; align-items:center; margin:.25rem 0; }
aside b { margin-left:auto; font-variant-numeric:tabular-nums; }
.hint { color:var(--muted); font-size:.85rem; }
.detail { margin-top:.8rem; padding:.5rem; border:1px solid var(--line); border-radius:.4rem; min-height:3.5rem; font-size:.85rem; }
#targets { white-space:pre-wrap; font-size:.78rem; background:#f4f6f8; padding:.5rem; border-radius:.4rem; max-height:60vh; overflow:auto; }
#reports { padding-left:1rem; }
#reports a { color:#1f6feb; }
#map-wrap { position:relative; min-height:0; background:#eef4f8; }
#maplibre-map { position:absolute; inset:0; }
#maplibre-map .maplibregl-canvas { outline:none; }
svg#map { width:100%; height:100%; display:block; cursor:grab; }
svg#map.dragging { cursor:grabbing; }
.scale { position:absolute; right:.6rem; bottom:.5rem; background:rgba(255,255,255,.85); padding:.15rem .4rem; border-radius:.3rem; color:var(--muted); font-size:.78rem; }
circle.block { stroke:rgba(0,0,0,.15); stroke-width:.4; }
circle.treated { fill:var(--treated); }
circle.untreated { fill:var(--untreated); fill-opacity:.78; }
#targets-table { width:100%; border-collapse:collapse; font-size:.74rem; }
#targets-table th, #targets-table td { border-bottom:1px solid var(--line); padding:.12rem .14rem; text-align:left; }
#targets-table th { color:var(--muted); font-weight:600; }
#targets-table input[type=number] { width:3rem; font-size:.72rem; padding:.08rem .12rem; }
#targets-table input[type=number]::-webkit-outer-spin-button,
#targets-table input[type=number]::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
#targets-table input[type=number] { -moz-appearance:textfield; }
#targets-table td.account { max-width:6.5rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#save-targets { margin-top:.5rem; padding:.3rem .7rem; }
#report-preview { margin-top:.6rem; overflow:auto; max-height:55vh; }
#report-preview table { border-collapse:collapse; font-size:.72rem; }
#report-preview th, #report-preview td { border-bottom:1px solid var(--line); padding:.15rem .3rem; white-space:nowrap; }
#report-preview th { position:sticky; top:0; background:var(--panel); }
.run-row { display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; margin-top:.5rem; }
.run-row input { width:4.5rem; }
.run-row button { padding:.3rem .7rem; }
#run-panel { display:flex; gap:.5rem; align-items:center; margin:.5rem 0; padding:.45rem .55rem;
             border:1px solid #b7d7c2; background:#eef8f1; border-radius:.4rem; font-size:.82rem; }
.pulse { width:.6rem; height:.6rem; border-radius:50%; background:#2f7d4f; animation:pulse 1.2s infinite; flex:none; }
@keyframes pulse { 0% { opacity:.35; transform:scale(.8); } 50% { opacity:1; transform:scale(1.15); } 100% { opacity:.35; transform:scale(.8); } }
.mini { position:relative; display:inline-block; overflow:hidden; width:3.6rem; height:.55rem; margin-right:.35rem; vertical-align:middle; background:#eef2f6; border-radius:.3rem; }
.mini-band { position:absolute; top:0; bottom:0; background:#b7d7c2; border-radius:.3rem; }
.mini-marker { position:absolute; top:-.15rem; width:2px; height:.85rem; background:#1f2933; transform:translateX(-1px); }
.mini-text { font-variant-numeric:tabular-nums; }
.watch { display:grid; grid-template-columns:1fr; gap:.25rem; margin:.4rem 0 .6rem; min-width:0; }
.watch-item { display:flex; flex-wrap:wrap; align-items:center; gap:.15rem .4rem; min-width:0; padding:.2rem .35rem; border:1px solid var(--line);
              border-radius:.35rem; font-size:.78rem; }
.watch-name { flex:1 1 100%; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#spark { flex:none; background:#fff; border:1px solid var(--line); border-radius:.3rem; }
#splitter { cursor:col-resize; background:var(--line); }
#splitter:hover, #splitter.dragging { background:#b7c4d1; }
.table-wrap { overflow-x:auto; }
.swatch { display:inline-block; width:.6rem; height:.6rem; border-radius:50%; margin:0 .15rem; }
.swatch.treated { background:var(--treated); }
.swatch.untreated { background:var(--untreated); opacity:.6; }
.account-value { color:var(--muted); font-size:.68rem; margin-left:1.1rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.window-card { border:1px solid var(--line); border-radius:.4rem; padding:.35rem .45rem; margin:.35rem 0; }
.window-title { display:flex; justify-content:space-between; gap:.5rem; font-size:.76rem; margin-bottom:.15rem; }
.window-title .name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.window-badge { flex:none; white-space:nowrap; font-variant-numeric:tabular-nums; }
.window-badge.met { color:var(--untreated); }
.window-badge.below { color:var(--treated); }
.window-badge.above { color:#b45309; }
.window-svg { width:100%; height:88px; display:block; }
.window-band { fill:#b7d7c2; opacity:.85; }
.window-bound { stroke:#2f7d4f; stroke-width:1; stroke-dasharray:2 2; }
.window-line { fill:none; stroke:#1f2933; stroke-width:1.3; }
.window-dot { fill:#1f2933; }
.window-dot.met { fill:var(--untreated); }
.window-dot.below { fill:var(--treated); }
.window-dot.above { fill:#d97706; }
.window-axis { stroke:var(--line); }
.window-label { fill:var(--muted); font-size:8px; }
.compare-runs { display:flex; flex-wrap:wrap; gap:.35rem 1rem; margin:.35rem 0 .5rem; }
.compare-runs label { gap:.3rem; }
.compare-runs select { max-width:12rem; }
.compare-swatch { display:inline-block; width:.55rem; height:.55rem; border-radius:.15rem; margin:0 .12rem; vertical-align:middle; }
.compare-swatch.compare-a { background:#c0392b; }
.compare-swatch.compare-b { background:#1f6feb; }
.compare-swatch.compare-both { background:#6b4c9a; }
circle.compare-a, path.compare-a { fill:#c0392b; }
circle.compare-b, path.compare-b { fill:#1f6feb; }
circle.compare-both, path.compare-both { fill:#6b4c9a; }
#compare-targets, #compare-accounts { width:100%; border-collapse:collapse; font-size:.74rem; }
#compare-targets th, #compare-targets td,
#compare-accounts th, #compare-accounts td { border-bottom:1px solid var(--line); padding:.15rem .25rem; text-align:left; }
#compare-targets th, #compare-accounts th { color:var(--muted); font-weight:600; }
#compare-targets td.num, #compare-accounts td.num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
#compare-accounts td.account { max-width:9rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#compare-targets td.met { color:var(--untreated); }
#compare-targets td.below { color:var(--treated); }
#compare-targets td.above { color:#b45309; }
.compare-delta-positive { color:#1f6feb; }
.compare-delta-negative { color:#c0392b; }
#compare-filter { width:100%; margin:.2rem 0 .4rem; padding:.25rem .35rem; border:1px solid var(--line); border-radius:.35rem; font:inherit; font-size:.8rem; }
.layer-tree { display:flex; flex-direction:column; gap:.35rem; margin:.3rem 0 .5rem; }
.layer-group { border:1px solid var(--line); border-radius:.4rem; padding:.3rem .4rem; }
.layer-group-title { font-size:.7rem; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); margin-bottom:.15rem; }
.layer-option { display:flex; align-items:center; gap:.35rem; font-size:.8rem; margin:.1rem 0; }
.layer-option.disabled { color:var(--muted); }
.layer-option .hint { margin-left:auto; font-size:.75rem; }
.layer-swatch { width:.55rem; height:.55rem; border-radius:.15rem; flex:none; }
.block.current { fill:var(--treated); }
.block.past { fill:#d9a066; }
path.block { stroke:rgba(23,35,45,.28); stroke-width:.35; }
.layer-legend { display:flex; flex-wrap:wrap; align-items:center; gap:.3rem; margin:.2rem 0 .1rem;
                font-size:.72rem; color:var(--muted); }
.layer-swatch.current { background:var(--treated); }
.layer-swatch.past { background:repeating-linear-gradient(45deg, #f0d2b0 0 3px, #a96f3c 3px 4.5px); }
path.block.untreated { fill:var(--untreated); fill-opacity:.78; }
path.block.treated { fill:var(--treated); }
path.block.current { fill:var(--treated); }
path.block.past { fill:url(#earlier-hatch); }
path.block.compare-a { fill:#c0392b; }
path.block.compare-b { fill:#1f6feb; }
path.block.compare-both { fill:#6b4c9a; }
.base-legend { max-height:10rem; overflow:auto; margin-top:.25rem; border-top:1px solid var(--line); padding-top:.2rem; }
.base-legend-row { display:flex; align-items:center; gap:.35rem; font-size:.73rem; padding:.05rem 0; }
.base-swatch { width:.6rem; height:.6rem; border-radius:.15rem; flex:none; }
#layer-tree select { font:inherit; font-size:.78rem; max-width:11rem; }
#targets-table tr.inactive { opacity:.55; }
.window-badge.off { color:var(--muted); }
.window-dot.off { fill:var(--muted); }
.report-builder { display:flex; flex-wrap:wrap; align-items:flex-end; gap:.4rem .6rem; margin:.3rem 0 .4rem; }
.report-builder label { display:flex; flex-direction:column; gap:.15rem; font-size:.74rem; color:var(--muted); }
.report-builder input { font:inherit; font-size:.78rem; padding:.2rem .3rem; border:1px solid var(--line); border-radius:.3rem; width:8rem; }
.report-builder input#report-accounts { width:15rem; }
.report-builder button { padding:.3rem .6rem; }
#report-export { font-size:.78rem; padding:.25rem .4rem; border:1px solid var(--line); border-radius:.3rem; }
#standard-reports { padding-left:1rem; margin:.2rem 0 .5rem; }
#standard-reports a { color:#1f6feb; }
.road { fill:none; stroke:#4c5661; stroke-width:.55; opacity:.55; pointer-events:none; }
.road.used { stroke:#6d28d9; stroke-width:1.1; opacity:.9; }
.window-table { display:grid; gap:.1rem; margin-top:.25rem; font-size:.68rem; font-variant-numeric:tabular-nums; }
.window-row { display:grid; grid-template-columns:2.6rem 1fr 1fr 1fr 3.2rem; gap:.3rem; align-items:baseline; }
.window-row.header { color:var(--muted); text-transform:uppercase; letter-spacing:.04em; font-size:.6rem; }
.window-row span:nth-child(n+2) { text-align:right; }
.window-row span.met { color:var(--untreated); }
.window-row span.below { color:var(--treated); }
.window-row span.above { color:#b45309; }

/* Account browser and target activation */
.account-browser { margin:.6rem 0 .8rem; border:1px solid var(--line); border-radius:.45rem;
                   padding:.5rem; background:#fbfcfd; }
.account-browser-head { display:flex; gap:.5rem; align-items:center; margin-bottom:.4rem; }
.account-browser-head h3 { font-size:.8rem; margin:0; text-transform:uppercase; letter-spacing:.06em;
                           color:var(--muted); white-space:nowrap; }
.account-browser-head input { flex:1; min-width:0; }
.account-tree { max-height:18rem; overflow:auto; font-size:.8rem; }
.account-tree details { margin-left:.55rem; }
.account-tree > details { margin-left:0; }
.account-tree summary { cursor:pointer; color:var(--muted); }
.account-leaf { display:flex; gap:.4rem; align-items:baseline; width:100%; border:0; background:none;
                text-align:left; cursor:pointer; padding:.08rem .2rem; border-radius:.25rem; }
.account-leaf:hover { background:#eef2f6; }
.account-leaf .name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account-leaf .value { margin-left:auto; color:var(--muted); font-variant-numeric:tabular-nums;
                       white-space:nowrap; }
.badge { background:#eef2f6; border:1px solid var(--line); border-radius:999px; padding:0 .35rem;
         font-size:.68rem; color:var(--muted); }
.account-picker { margin-top:.5rem; border-top:1px solid var(--line); padding-top:.45rem; }
.picked-account { display:flex; gap:.4rem; align-items:baseline; flex-wrap:wrap; margin-bottom:.25rem; }
.account-leaf .kind { color:var(--muted); font-size:.66rem; text-transform:uppercase; letter-spacing:.03em; }
.account-leaf .badge { flex:none; }
.remove-target { padding:.05rem .35rem; font-size:.72rem; }
#targets-table th:last-child, #targets-table td:last-child { position:sticky; right:0; background:var(--panel);
  box-shadow:-1px 0 var(--line); text-align:center; }
.run-controls { position:sticky; bottom:0; z-index:3; background:var(--panel);
  border-top:1px solid var(--line); padding:.35rem .1rem .15rem; margin-top:.5rem; }
.target-detail td { padding-top:0; padding-bottom:.35rem; background:#fbfcfd; }
.target-detail-inner { display:flex; flex-wrap:wrap; gap:.35rem .8rem; align-items:center;
  font-size:.72rem; color:var(--muted); }
.target-detail-inner label { display:flex; gap:.25rem; align-items:center; }
.target-detail-inner select { font:inherit; font-size:.72rem; }
.target-detail-inner input[type=text] { width:10rem; font:inherit; font-size:.72rem;
  padding:.1rem .2rem; border:1px solid var(--line); border-radius:.25rem; }
.target-detail-inner input[type=number] { width:3rem; font-size:.72rem; padding:.1rem .15rem; }
.ending-summary { margin:.4rem 0 .8rem; }
.ending-summary .table-wrap { max-height:16rem; }
#ending-table, #compare-ending { width:100%; border-collapse:collapse; font-size:.74rem; }
#ending-table th, #ending-table td, #compare-ending th, #compare-ending td {
  border-bottom:1px solid var(--line); padding:.12rem .25rem; text-align:left; }
#ending-table th, #compare-ending th { color:var(--muted); font-weight:600; }
#ending-table td.num, #compare-ending td.num { text-align:right; font-variant-numeric:tabular-nums; }
.search-pick { display:flex; gap:.4rem; align-items:center; font-size:.78rem; color:var(--muted); margin:.4rem 0; }
.search-pick select { font:inherit; font-size:.78rem; max-width:22rem; }
#search-table { width:100%; border-collapse:collapse; font-size:.74rem; }
#search-table th, #search-table td { border-bottom:1px solid var(--line); padding:.15rem .25rem; text-align:left; }
#search-table th { color:var(--muted); font-weight:600; }
#search-table tr.search-front { background:#eef8f1; font-weight:600; }
.search-run { margin:.4rem 0; border:1px solid var(--line); border-radius:.35rem; padding:.35rem .45rem; }
.search-run summary { cursor:pointer; color:var(--muted); font-size:.78rem; }
.search-run textarea { font:inherit; font-size:.74rem; width:100%; min-width:18rem; }
.search-run .run-row { align-items:flex-start; }
#account-count { white-space:nowrap; font-size:.7rem; }
.multi-select { display:flex; gap:.25rem; align-items:center; white-space:nowrap; font-size:.7rem; color:var(--muted); }
.account-leaf.selected { background:#e8f1ff; box-shadow:inset 2px 0 #1f6feb; }
.link-button { border:0; background:none; color:#1f6feb; cursor:pointer; font:inherit; font-size:.72rem; padding:0 .2rem; }
#search-table tbody tr { cursor:pointer; }
#search-table tbody tr:hover { background:#f2f6fa; }
.search-detail { margin-top:.6rem; border-top:1px solid var(--line); padding-top:.45rem; font-size:.76rem; }
.search-detail h3 { font-size:.82rem; margin:.2rem 0; }
.search-detail pre { background:#f7f9fb; padding:.35rem; overflow:auto; max-height:10rem; }
.search-detail ul { margin:.2rem 0 .4rem 1rem; padding:0; }

.lidar-meta { display:flex; flex-direction:column; gap:.25rem; margin:.4rem 0 .6rem; }
.lidar-row { display:flex; gap:.6rem; justify-content:space-between; font-size:.8rem; border-bottom:1px solid var(--line); padding:.18rem 0; }
.lidar-row span:first-child { color:var(--muted); }
.lidar-row span:last-child { text-align:right; overflow-wrap:anywhere; }
.lidar-field { display:flex; align-items:center; gap:.4rem; font-size:.8rem; margin:.4rem 0; }
.lidar-field select { font:inherit; font-size:.8rem; max-width:14rem; }
.lidar-legend { margin:.5rem 0; }
.lidar-bar { height:.55rem; border-radius:.2rem; background:linear-gradient(90deg,#440154,#3b528b,#21918c,#5ec962,#fde725); border:1px solid var(--line); }
.lidar-ends { display:flex; justify-content:space-between; color:var(--muted); font-size:.75rem; margin-top:.15rem; }

.carbon-chart { width:100%; min-height:8.5rem; border:1px solid var(--line); border-radius:.35rem; background:#fbfcfe; margin:.35rem 0; }
.carbon-composition { display:flex; flex-direction:column; gap:.25rem; margin:.45rem 0; }
.carbon-bar-row { display:grid; grid-template-columns:7rem 1fr 6rem; gap:.4rem; align-items:center; font-size:.78rem; }
.carbon-bar { height:.55rem; border-radius:.2rem; background:#2f7d4f; }
.carbon-bar-row span:last-child { text-align:right; color:var(--muted); }
.carbon-files { margin:.2rem 0; padding-left:1rem; font-size:.8rem; }
.carbon-files a { color:#1f6feb; }


.map-loading { position:absolute; inset:0; display:flex; gap:.55rem; align-items:center; justify-content:center;
               background:rgba(247,249,251,.82); color:var(--muted); font-size:.9rem; z-index:5; pointer-events:none; }
.spinner { width:1rem; height:1rem; border:2px solid var(--line); border-top-color:var(--focus); border-radius:50%; animation:spin .8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
@media (max-width: 1200px) {
  header { flex-wrap:wrap; gap:.45rem .8rem; }
  header .year { flex-basis:100%; order:5; }
  #status { flex-basis:100%; order:6; max-width:none; }
  .dataset-name { max-width:11rem; }
  aside { padding:.45rem; }
  .workspaces { margin:.35rem .45rem .2rem; }
  .sidebar-body { padding:0 .45rem .45rem; }
}

.target-canvas { grid-column:3; grid-row:1; min-width:0; min-height:0; overflow:auto; background:var(--bg); padding:1rem 1.1rem 2rem; }
.target-canvas-head { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; margin-bottom:.6rem; }
.target-canvas-head h2 { margin:.1rem 0 .15rem; font-size:1.1rem; text-transform:none; letter-spacing:0; color:var(--ink); }
.target-canvas-head .hint { max-width:52rem; margin:0; }
.target-chart-count { color:var(--muted); font-size:.8rem; white-space:nowrap; padding-top:.35rem; }
.target-chart-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(300px, 1fr)); gap:.9rem; }
.target-chart-card { background:var(--panel); border:1px solid var(--line); border-radius:.45rem; padding:.55rem .65rem .45rem; min-width:0; }
.target-chart-card.inactive { border-style:dashed; }
.target-chart-title { display:flex; gap:.5rem; justify-content:space-between; align-items:baseline; margin-bottom:.2rem; }
.target-chart-title .name { font-size:.86rem; font-weight:600; overflow-wrap:anywhere; line-height:1.2; }
.target-chart-title .meta { color:var(--muted); font-size:.72rem; white-space:nowrap; }
.target-chart-svg { display:block; width:100%; height:210px; border:1px solid var(--line); border-radius:.3rem; background:#fcfdfe; }
.target-chart-legend { display:flex; flex-wrap:wrap; gap:.75rem; margin-top:.25rem; color:var(--muted); font-size:.7rem; }
.target-chart-legend span::before { content:""; display:inline-block; width:.55rem; height:.55rem; margin-right:.25rem; vertical-align:-.05rem; border-radius:.1rem; }
.target-chart-legend .min::before { background:#f4b4b4; }
.target-chart-legend .max::before { background:#b7c9f4; }
.target-chart-legend .achieved::before { background:#1f2933; }
.target-chart-empty { color:var(--muted); padding:2rem .5rem; }
.target-chart-card .target-chart-foot { color:var(--muted); font-size:.7rem; margin-top:.2rem; }
.target-min-zone { fill:#f4b4b4; fill-opacity:.7; }
.target-max-zone { fill:#b7c9f4; fill-opacity:.7; }
.target-ok-zone { fill:#d9e2ec; fill-opacity:.55; }
.target-chart-line { fill:none; stroke:#1f2933; stroke-width:1.6; }
.target-chart-dot { fill:#1f2933; }
.target-chart-dot.below { fill:#b91c1c; }
.target-chart-dot.above { fill:#b45309; }
.target-chart-dot.met { fill:#2f7d4f; }
.target-chart-grid-line { stroke:#e5ebf1; stroke-width:1; }
.target-chart-axis-label { fill:#616e7c; font-size:10px; }
.target-chart-period:hover { opacity:.85; }
.target-chart-readout { min-height:1.1rem; margin-top:.25rem; color:var(--ink); font-size:.72rem; font-variant-numeric:tabular-nums; }
.target-chart-table { margin-top:.25rem; font-size:.7rem; }
.target-chart-table summary { cursor:pointer; color:var(--muted); }
.target-chart-table table { width:100%; border-collapse:collapse; margin-top:.25rem; }
.target-chart-table th, .target-chart-table td { border-bottom:1px solid var(--line); padding:.12rem .2rem; text-align:left; }
.target-chart-table th { color:var(--muted); font-weight:600; }
.target-chart-table td.num { text-align:right; font-variant-numeric:tabular-nums; }
.target-chart-table td.met { color:var(--untreated); }
.target-chart-table td.below { color:var(--treated); }
.target-chart-table td.above { color:#b45309; }
@media (max-width: 1100px) {
  .target-chart-title { flex-direction:column; align-items:flex-start; gap:.1rem; }
  .target-chart-title .meta { white-space:normal; }
}
.target-canvas-actions { display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; justify-content:flex-end; }
.target-canvas-actions button { font:inherit; font-size:.75rem; padding:.25rem .5rem; }
.target-canvas-actions button:disabled { color:var(--muted); cursor:default; }
.target-chart-controls { display:flex; flex-wrap:wrap; align-items:center; gap:.25rem .55rem; margin:.25rem 0 .35rem; padding:.25rem .35rem; border:1px solid var(--line); border-radius:.3rem; background:#f7f9fb; font-size:.7rem; }
.target-chart-controls label { display:flex; align-items:center; gap:.2rem; }
.target-chart-controls select, .target-chart-controls input[type=number] { font:inherit; font-size:.7rem; max-width:8rem; padding:.1rem .2rem; }
.target-chart-controls button { font:inherit; font-size:.7rem; padding:.15rem .35rem; }
.target-chart-table input { width:6rem; font:inherit; font-size:.68rem; padding:.05rem .15rem; text-align:right; }
.target-chart-svg { cursor:crosshair; touch-action:none; }
.target-chart-card.editing { border-color:#93b4e6; }
.target-chart-selected-period { fill:#e8f1ff; fill-opacity:.55; pointer-events:none; }
.map-legend { position:absolute; left:.6rem; bottom:.5rem; z-index:4; background:rgba(255,255,255,.94); border:1px solid var(--line); border-radius:.4rem; padding:.35rem .5rem; font-size:.72rem; color:var(--ink); max-width:16rem; box-shadow:0 1px 4px rgba(20,35,50,.08); }
.map-legend[hidden] { display:none !important; }
.map-legend-title { font-weight:600; margin-bottom:.2rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.map-legend-row { display:flex; align-items:center; gap:.3rem; margin:.1rem 0; }
.map-legend-swatch { width:.6rem; height:.6rem; border-radius:.12rem; flex:none; }
.map-legend-swatch.treated { background:#b03a2e; }
.map-legend-swatch.untreated { background:#d9e4dc; border:1px solid #b8c7bb; }
.map-legend-swatch.past { background:#e6c49e; }
.map-legend-swatch.lidar { background:linear-gradient(90deg,#440154,#3b528b,#21918c,#5ec962,#fde725); }
.map-legend-count { margin-left:auto; color:var(--muted); font-variant-numeric:tabular-nums; }
.map-legend button { font:inherit; font-size:.68rem; border:1px solid var(--line); background:#f4f7fa; border-radius:.25rem; padding:.1rem .3rem; margin-top:.2rem; cursor:pointer; }
.map-legend button:hover { background:#e8eef4; }

path.block.selected, circle.block.selected { stroke:#111; stroke-width:1.6; stroke-opacity:1; }

details.layer-group > summary { cursor:pointer; user-select:none; }
details.layer-group > summary::marker { color:var(--muted); }
details.layer-group[open] > summary { margin-bottom:.2rem; }
.layer-unavailable { margin:.05rem 0 .25rem; }
.coverage-row { display:flex; align-items:center; gap:.45rem; flex-wrap:wrap; margin:.25rem 0 .4rem; }
.coverage-badge { display:inline-block; background:#e8f0f7; color:#1d3b53; border:1px solid #c7d8e6; border-radius:999px; padding:.12rem .45rem; font-size:.72rem; font-variant-numeric:tabular-nums; white-space:nowrap; }
.lidar-missing { display:flex; align-items:center; gap:.35rem; margin-top:.28rem; color:var(--muted); font-size:.72rem; }
.lidar-missing-swatch { width:.7rem; height:.45rem; border:1px solid #b8c3cf; border-radius:.12rem; background:#d5dce5; flex:none; }
.empty-state { margin:.35rem 0; padding:.5rem .6rem; border:1px dashed #c7d2dd; border-radius:.35rem; background:#f8fafc; color:var(--muted); font-size:.78rem; }
.carbon-chart-head { display:flex; align-items:baseline; justify-content:space-between; gap:.5rem; margin-top:.5rem; font-size:.8rem; }
.carbon-chart-head strong { color:var(--ink); }
.carbon-chart-wrap { position:relative; }
.chart-tooltip { position:absolute; z-index:6; pointer-events:none; background:rgba(22,32,44,.94); color:#fff; border-radius:.3rem; padding:.25rem .4rem; font-size:.72rem; line-height:1.3; white-space:nowrap; transform:translate(-50%, -110%); box-shadow:0 2px 8px rgba(20,35,50,.2); }
.chart-tooltip[hidden] { display:none; }
.carbon-chart .chart-grid { stroke:#e6edf3; stroke-width:1; }
.carbon-chart .chart-axis { stroke:#b8c5d1; stroke-width:1; }
.carbon-chart .chart-tick { fill:#5b6b7c; font-size:12px; }
.carbon-chart .chart-point { fill:#fff; stroke:#1f6feb; stroke-width:2; cursor:pointer; }
.carbon-chart .chart-point:hover, .carbon-chart .chart-point:focus { fill:#1f6feb; stroke:#0d4aa0; outline:none; }
.carbon-chart .chart-line { stroke:#1f6feb; stroke-width:2; vector-effect:non-scaling-stroke; }
.carbon-chart .chart-area { fill:rgba(31,111,235,.08); }
.visually-hidden { position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
#targets-table th { white-space:nowrap; }
#targets-table th .sort-button { appearance:none; border:0; background:transparent; color:inherit; font:inherit; font-weight:600; padding:0; cursor:pointer; }
#targets-table th .sort-button:hover { color:var(--ink); }
#targets-table th .sort-button:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }
#targets-table th[aria-sort="ascending"] .sort-button::after { content:" ↑"; color:var(--ink); }
#targets-table th[aria-sort="descending"] .sort-button::after { content:" ↓"; color:var(--ink); }
#targets-table td.account { max-width:8rem; }
.target-account-line { display:flex; align-items:center; gap:.2rem; min-width:0; max-width:100%; }
.target-account-label { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account-root { flex:none; font-size:.58rem; text-transform:uppercase; letter-spacing:.04em; color:#49657d; background:#e9f0f6; border-radius:.2rem; padding:.02rem .18rem; }
.account-unit { flex:none; font-size:.62rem; color:#5a4a2a; background:#f6efdc; border-radius:.2rem; padding:.02rem .18rem; }
.target-period { white-space:nowrap; }
.target-period-label { font-weight:600; }
.target-period-year { display:block; font-size:.62rem; color:var(--muted); }
.target-status { display:inline-block; padding:.05rem .28rem; border-radius:999px; font-size:.64rem; white-space:nowrap; background:#eef2f6; color:var(--muted); }
.target-status.met { background:#e6f4eb; color:#1e6b3f; }
.target-status.below { background:#fdeaea; color:#a22727; }
.target-status.above { background:#fff2dc; color:#8a5300; }
.target-status.off { background:#eef2f6; color:#667788; }
.target-sort-bar { display:flex; align-items:center; gap:.55rem; margin:.15rem 0 .25rem; }
.target-sort-bar[hidden] { display:none !important; }
@media (max-width:1100px) {
  #targets-table th, #targets-table td { padding:.1rem .06rem; }
  #targets-table td.account { max-width:4.5rem; }
  #targets-table input[type=number] { width:2.45rem; font-size:.68rem; padding:.06rem .08rem; }
  .account-root { font-size:.5rem; padding:0 .1rem; }
  .account-unit { font-size:.56rem; padding:0 .1rem; }
  .target-status { font-size:.58rem; padding:.03rem .18rem; }
  .target-period-year { font-size:.58rem; }
}
@media (max-width:1100px) {
  #targets-table { table-layout:fixed; width:100%; }
  #targets-table th, #targets-table td { overflow:hidden; }
  #targets-table th:nth-child(1), #targets-table td:nth-child(1) { width:1.25rem; }
  #targets-table th:nth-child(2), #targets-table td:nth-child(2) { width:5.3rem; }
  #targets-table th:nth-child(3), #targets-table td:nth-child(3) { width:2.8rem; }
  #targets-table th:nth-child(4), #targets-table td:nth-child(4),
  #targets-table th:nth-child(5), #targets-table td:nth-child(5) { width:2.35rem; }
  #targets-table th:nth-child(6), #targets-table td:nth-child(6) { width:3.35rem; }
  #targets-table th:nth-child(7), #targets-table td:nth-child(7) { width:1.25rem; }
  #targets-table td.account { max-width:none; }
  #targets-table input[type=number] { width:100%; min-width:0; }
  .target-account-label { max-width:100%; }
  .target-status { font-size:.56rem; padding:.03rem .14rem; }
  .remove-target { padding:0 .2rem; }
}
.target-summary { display:flex; flex-wrap:wrap; gap:.15rem .35rem; align-items:baseline; margin:.2rem 0 .35rem; padding:.3rem .45rem; border:1px solid var(--line); border-radius:.35rem; background:#f8fafc; font-size:.76rem; color:var(--muted); }
.target-summary .target-summary-failing { color:#a22727; font-weight:700; }
.target-filter-bar { display:flex; flex-wrap:wrap; gap:.3rem .4rem; align-items:center; margin:.2rem 0 .3rem; }
.target-filter-bar[hidden] { display:none !important; }
#target-filter-search { flex:1 1 8rem; min-width:6rem; font:inherit; font-size:.76rem; padding:.22rem .3rem; border:1px solid var(--line); border-radius:.3rem; }
#target-filter-status { font:inherit; font-size:.76rem; padding:.2rem .25rem; border:1px solid var(--line); border-radius:.3rem; }
.target-filter-bar button { font:inherit; font-size:.72rem; padding:.2rem .38rem; }
.target-filter-bar button:disabled { color:#9aa6b2; cursor:default; }
#target-filter-count { flex:1 1 100%; font-size:.7rem; color:var(--muted); }
@media (max-width:1100px) {
  .target-filter-bar { gap:.22rem .3rem; }
  #target-filter-search { flex-basis:7rem; }
}
.run-health { margin:.35rem .6rem .45rem; padding:.45rem .55rem; border:1px solid var(--line); border-radius:.4rem; background:#f8fafc; }
.run-health[hidden] { display:none !important; }
.run-health-head { display:flex; align-items:baseline; gap:.45rem; flex-wrap:wrap; }
.run-health-head strong { font-size:.82rem; }
.run-health-badges { display:flex; flex-wrap:wrap; gap:.25rem; margin:.3rem 0; }
.run-health-badges span { padding:.1rem .3rem; border-radius:999px; background:#e9f0f6; color:#28475f; font-size:.68rem; white-space:nowrap; }
.run-health-badges span.failing { background:#fdeaea; color:#a22727; font-weight:700; }
.run-health-badges span.available { background:#e6f4eb; color:#1e6b3f; }
.run-health-badges span.unavailable { background:#eef2f6; color:#667788; }
.run-health-actions { display:flex; gap:.35rem; flex-wrap:wrap; }
.run-health-actions button { font:inherit; font-size:.72rem; padding:.22rem .4rem; }
.run-health-actions button:disabled { color:#9aa6b2; cursor:default; }
.account-link { color:#1f6feb; cursor:pointer; text-decoration:underline dotted; }
.account-link:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }
@media (max-width:1100px) {
  .run-health { margin:.3rem .35rem .35rem; }
}
.live-badge { display:inline-block; padding:.1rem .32rem; border-radius:999px; background:#d9f2e2; color:#12643a; font-size:.66rem; font-weight:700; letter-spacing:.05em; }
.live-badge[hidden] { display:none !important; }

.state-engine-pill {
  align-self: center;
  border: 1px solid #5b7c68;
  border-radius: 999px;
  padding: .28rem .6rem;
  background: #eef7f1;
  color: #205c3a;
  font-size: .74rem;
  font-weight: 700;
  white-space: nowrap;
}
