/* Burden dashboard (Pano). Same soft ground, tokens and type as the map (style.css + uiverse.css). */
.viewsw button { display: inline-flex; align-items: center; gap: 6px; }
.viewsw svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.place-acts { display: flex; gap: 6px; }
.place-acts svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.dash { flex: 1; min-height: 0; overflow-y: auto; background: var(--neu-bg); -webkit-overflow-scrolling: touch; }
.dash[hidden], .layout[hidden] { display: none; }
.dash-loading { padding: 24px; }
.dash-inner { max-width: 1320px; margin: 0 auto; padding: 20px 24px 40px; display: flex; flex-direction: column; gap: 20px; }
.dash h1 { margin: 0; font: 700 1.6rem/1.15 var(--f-display); letter-spacing: -.015em; }
.dash h2 { margin: 0; font: 700 1.02rem/1.25 var(--f-display); }
.dash h3 { margin: 0 0 6px; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dash p { margin: 0; }
.small { font-size: .8rem; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.dash-head .muted { margin-top: 4px; max-width: 60ch; }
.dash-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; }
.seg button { border: 0; background: none; padding: 6px 12px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.sel { display: inline-flex; align-items: center; gap: 8px; }
.sel[hidden] { display: none; }
.sel select { font: inherit; font-size: .85rem; color: var(--ink); border: 0; border-radius: 12px; padding: 8px 30px 8px 12px; background: var(--neu-bg);
  box-shadow: var(--inset-sm); appearance: none; -webkit-appearance: none; max-width: 100%;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }

.card { background: var(--neu-bg); border-radius: 22px; box-shadow: var(--raised); padding: 18px 20px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }

/* tiles + distribution */
.dash-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tile { background: var(--neu-bg); border-radius: 20px; box-shadow: var(--raised-sm); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.t-label { font-size: .8rem; color: var(--ink-2); font-weight: 600; }
.t-val { font: 700 1.9rem/1.05 var(--f-body); font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--ink); }
.t-val span { font-size: .85rem; font-weight: 500; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.t-sub { font-size: .78rem; color: var(--muted); }
.dist { margin: 0; }
.dist figcaption { margin-bottom: 12px; }
.dist figcaption .muted { font-size: .78rem; margin-top: 2px; }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bars li { display: grid; grid-template-columns: 52px minmax(0, 1fr) 96px; align-items: center; gap: 10px; font-size: .8rem; }
.b-lab { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.b-track { height: 14px; border-radius: 4px; box-shadow: inset 2px 2px 4px var(--neu-lo), inset -2px -2px 4px var(--neu-hi); padding: 2px; }
.b-track i { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.b-val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.b-val small { color: var(--muted); font-weight: 400; }

/* table + profile */
.dash-main { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.rank { display: flex; flex-direction: column; gap: 10px; }
.rank .card-head { margin-bottom: 0; }
.search-in { position: relative; }
.search-in svg { position: absolute; left: 12px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search-in input { width: 100%; height: 38px; border: 0; border-radius: 14px; padding: 0 12px 0 34px; background: var(--neu-bg); box-shadow: var(--inset); }
.search-in input:focus { outline: none; box-shadow: var(--inset), 0 0 0 2px var(--focus); }
.tbl-wrap { max-height: 620px; overflow: auto; border-radius: 14px; box-shadow: var(--inset-sm); background: var(--neu-bg); }
#d-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .84rem; font-variant-numeric: tabular-nums; }
#d-table thead th { position: sticky; top: 0; z-index: 2; background: var(--neu-bg); box-shadow: 0 1px 0 var(--line); text-align: right; vertical-align: bottom; padding: 0; }
#d-table thead th button { all: unset; cursor: pointer; display: flex; flex-direction: column; align-items: flex-end; padding: 10px 8px 8px; font-size: .74rem; font-weight: 600; color: var(--ink-2); line-height: 1.2; width: 100%; box-sizing: border-box; }
#d-table thead th button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
#d-table thead th button small { font-weight: 400; color: var(--muted); }
#d-table thead th button i { font-style: normal; font-size: .62rem; color: var(--ink); min-height: .8em; }
#d-table thead th.c-name button { align-items: flex-start; }
#d-table thead th.c-rank { padding: 10px 8px 8px; font-size: .74rem; color: var(--muted); }
#d-table td, #d-table tbody th { padding: 7px 8px; border-top: 1px solid var(--line-2); text-align: right; white-space: nowrap; }
#d-table tbody tr { cursor: pointer; }
#d-table tbody tr:hover td, #d-table tbody tr:hover th { background: rgba(255, 255, 255, .45); }
#d-table tbody tr.on td, #d-table tbody tr.on th { background: #fff; }
#d-table tbody tr.on .c-name span { font-weight: 700; }
#d-table tbody tr:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
#d-table .c-rank { color: var(--muted); width: 2.5em; font-size: .76rem; }
#d-table .c-name { text-align: left; font-weight: 500; position: sticky; left: 0; z-index: 1; background: var(--neu-bg); max-width: 200px; }
#d-table thead .c-name { z-index: 3; }
#d-table .c-name span { display: block; overflow: hidden; text-overflow: ellipsis; }
#d-table .c-name small { display: block; color: var(--muted); font-size: .72rem; font-weight: 400; }
#d-table .c-burden { min-width: 112px; }
#d-table .c-burden b { display: inline-block; min-width: 2ch; }
.bb { display: inline-block; vertical-align: middle; width: 64px; height: 8px; margin-right: 8px; border-radius: 4px; background: var(--neu-bg);
  box-shadow: inset 1px 1px 3px var(--neu-lo), inset -1px -1px 3px var(--neu-hi); overflow: hidden; }
.bb i { display: block; height: 100%; border-radius: 0 4px 4px 0; }
#d-table abbr { text-decoration: none; color: var(--muted); margin-left: 1px; }
#d-table td.hot { background: rgba(227, 26, 28, .12); color: #7a0019; font-weight: 600; }
#d-table tbody tr.on td.hot { background: rgba(227, 26, 28, .16); }

.profile { position: sticky; top: 16px; max-height: calc(100vh - var(--top-h) - 32px); overflow: auto; display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 12px; }
.pf-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pf-head h2 { font-size: 1.35rem; margin-top: 2px; }
.pf-head .btn { white-space: nowrap; padding: 8px 14px; font-size: .82rem; font-weight: 600; flex: none; }
.pf-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; align-items: center; padding: 12px 14px; border-radius: 16px; box-shadow: var(--inset-sm); }
.hero-n { display: flex; align-items: baseline; gap: 4px; }
.hero-n b { font: 700 2.4rem/1 var(--f-body); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.hero-n span:last-child { color: var(--muted); font-size: .85rem; }
.sw-c { width: 12px; height: 12px; border-radius: 3px; align-self: center; margin-right: 6px; }
.hero-t p + p { margin-top: 2px; }
.warn { color: #7a4b00; }
.ev { grid-column: 1 / -1; display: flex; gap: 18px; margin: 4px 0 0; font-size: .8rem; }
.ev div { display: flex; gap: 6px; } .ev dt { color: var(--muted); } .ev dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.pf-g { display: flex; flex-direction: column; gap: 10px; }
.st { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; }
.st-l { font-size: .84rem; color: var(--ink); display: flex; align-items: center; gap: 6px; min-width: 0; }
.st-v { text-align: right; font-size: .84rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-track { grid-column: 1 / -1; position: relative; height: 10px; border-radius: 5px; background: var(--neu-bg); box-shadow: inset 1px 1px 3px var(--neu-lo), inset -1px -1px 3px var(--neu-hi); }
.st-track .zone { position: absolute; left: 80%; right: 0; top: 0; bottom: 0; border-radius: 0 5px 5px 0; background: rgba(227, 26, 28, .14); }
.st-track .med { position: absolute; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: var(--muted); border-radius: 1px; }
.st-track .dot { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2px var(--neu-bg); }
.st-s { grid-column: 1 / -1; font-size: .72rem; }
.tag { font-size: .62rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-radius: 6px; padding: 1px 5px; box-shadow: var(--inset-sm); white-space: nowrap; }
.link { all: unset; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; overflow: hidden; text-overflow: ellipsis; }
.link:hover { text-decoration-color: var(--ink-2); }
.link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.pf-ej summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.pf-ej summary::-webkit-details-marker { display: none; }
.pf-ej summary::after { content: "+"; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.pf-ej[open] summary::after { content: "−"; }
.pf-ej[open] { gap: 10px; }
.text-btn { border: 0; background: none; color: var(--ink-2); font-weight: 600; padding: 6px 0; text-align: left; }
.only-narrow { display: none; }

/* relationship */
.rel-ctrl { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-bottom: 8px; }
.rho { font-size: .85rem; font-variant-numeric: tabular-nums; }
.scatter { position: relative; }
.scatter svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.scatter .grid line { stroke: var(--line); stroke-width: 1; }
.scatter text { font: 11px var(--f-body); fill: var(--muted); }
.scatter .ax-t { fill: var(--ink-2); font-weight: 600; }
.scatter .po { fill: #3a4256; fill-opacity: .35; }
.scatter .pi { fill: #c8432b; fill-opacity: .9; stroke: var(--neu-bg); stroke-width: 1.5; }
.scatter .ps { fill: #141a2b; stroke: #fff; stroke-width: 2.5; }
.scatter .cmed { stroke: #141a2b; stroke-width: 2.5; stroke-linecap: round; }
.scatter .dl { fill: var(--ink-2); font-size: 10.5px; }
.scatter .hov circle { fill: none; stroke: #141a2b; stroke-width: 2; }
.tip { position: absolute; pointer-events: none; z-index: 5; background: var(--paper); border-radius: 12px; box-shadow: var(--shadow); padding: 8px 10px;
  font-size: .78rem; display: flex; flex-direction: column; gap: 2px; min-width: 150px; max-width: 240px; }
.tip small { color: var(--muted); }
.key { list-style: none; margin: 8px 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .76rem; color: var(--ink-2); }
.key li { display: flex; align-items: center; gap: 6px; }
.key i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.k-o { background: rgba(58, 66, 86, .45); } .k-i { background: #c8432b; } .k-s { background: #141a2b; box-shadow: 0 0 0 2px #fff; }
.k-m { width: 14px !important; height: 3px !important; border-radius: 2px !important; background: #141a2b; }
#d-relnote:empty { display: none; }

@media (max-width: 1023px) {
  .dash-top, .dash-main { grid-template-columns: minmax(0, 1fr); }
  .profile { position: static; max-height: none; overflow: visible; }
  .only-narrow { display: block; }
  .tbl-wrap { max-height: 460px; }
}
@media (max-width: 760px) {
  .viewsw span { display: none; }
  .viewsw button { padding: 6px 8px; }
  .dash-inner { padding: 14px 16px 32px; gap: 16px; }
  .dash h1 { font-size: 1.3rem; }
  .card { padding: 14px; border-radius: 18px; }
  .tiles { gap: 12px; }
  .tile { padding: 12px; border-radius: 16px; }
  .t-val { font-size: 1.5rem; }
  .bars li { grid-template-columns: 46px minmax(0, 1fr) 84px; gap: 8px; }
  #d-table .c-name { max-width: 128px; }
  #d-table .c-rank { display: none; }
  #d-table .c-burden { min-width: 84px; }
  .bb { width: 36px; margin-right: 6px; }
  .pf-head { flex-direction: column; }
  .dash-filters, .dash-filters .sel, .dash-filters .sel select { width: 100%; }
}
@media (max-width: 420px) {
  .lang button { padding: 4px 8px; }
}
