
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 24px 16px; }
h1 { font-size: 22px; margin: 0 0 4px; }
p { color: var(--text-2); margin: 0 0 16px; }
a { color: var(--accent); }
.tbl { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--text-2); font-weight: 600; font-size: 12px; }
tr:last-child td { border-bottom: 0; }
.muted { color: var(--text-3); font-size: 12px; margin-top: 12px; }
td .nm { color: var(--text-2); }
tr.tot td { font-weight: 600; border-top: 2px solid var(--border); }
th { white-space: normal; vertical-align: bottom; }
h2 { font-size: 16px; margin: 28px 0 4px; }
.hint { font-size: 13px; color: var(--text-3); }
.hint code { font-size: 12px; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.cgrid .cc { display: block; padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface);
  color: var(--text-3); font-size: 13px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cgrid .cc b { font-weight: 600; margin-right: 4px; }
.cgrid a.cc.on { color: var(--text); border-color: var(--accent); }
.cgrid a.cc.on b { color: var(--accent); }
.cgrid a.cc.on:hover { background: var(--bg); }


.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 4px; }
.slegend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--text-2); }
.evo-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0; }
.seg { display: inline-flex; }
.seg button { font: inherit; font-size: 12px; padding: 4px 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; }
.seg button:first-child { border-radius: 6px 0 0 6px; }
.seg button:last-child { border-radius: 0 6px 6px 0; margin-left: -1px; }
.seg button[aria-pressed="true"] { background: var(--bg); color: var(--text); border-color: var(--accent); position: relative; }
.evo-chart { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px; margin-bottom: 10px; }
.evo-chart svg { display: block; width: 100%; height: auto; }
.evo-chart .tip { position: absolute; display: none; pointer-events: none; background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  padding: 6px 8px; font-size: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.12); white-space: nowrap; z-index: 5; }
table.evo td { vertical-align: top; }
table.evo td b { font-weight: 600; }
table.evo .sh { color: var(--text-3); font-size: 12px; }
table.evo .na { color: var(--text-3); }
.mbar { display: flex; height: 5px; width: 64px; margin: 4px 0 0 auto; border-radius: 2px; overflow: hidden; background: var(--border); }
.mbar span { height: 100%; }


.hero { margin-bottom: 16px; }
.lede { font-size: 15px; max-width: 820px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
.kpi-l { font-size: 12px; color: var(--text-2); }
.kpi-v { font-size: 26px; font-weight: 650; margin: 2px 0; letter-spacing: -0.01em; }
.kpi-s { font-size: 12px; color: var(--text-3); }
.verdict { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 8px;
  padding: 14px 18px; margin-bottom: 8px; }
.verdict h2 { margin: 0 0 6px; }
.v-answer { font-size: 17px; font-weight: 650; color: var(--text); margin: 0 0 8px; }
.v-facts { margin: 0 0 10px; padding-left: 18px; color: var(--text-2); max-width: 980px; }
.v-facts li { margin-bottom: 6px; }
.v-facts b, .v-note b { color: var(--text); }
.v-note { font-size: 13px; color: var(--text-3); margin: 0; max-width: 980px; }


.rk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 10px; }
.rk-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
.rk-card h3 { font-size: 14px; margin: 0; }
.rk-sub { font-size: 12px; color: var(--text-3); margin: 2px 0 10px; }
.rk-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rk-h { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); margin-bottom: 4px; }
.rk-col ol { list-style: none; margin: 0; padding: 0; }
.rk-col li { display: grid; grid-template-columns: 1fr auto; column-gap: 6px; padding: 4px 0; border-bottom: 1px solid var(--grid); font-size: 13px; }
.rk-col li:last-child { border-bottom: 0; }
.rk-col li a { color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rk-col li a b { color: var(--accent); font-weight: 600; }
.rk-col li a .nm { color: var(--text-2); }
.rk-col li a:hover .nm { text-decoration: underline; }
.rk-v { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.rk-bar { grid-column: 1 / -1; height: 4px; background: var(--grid); border-radius: 2px; margin-top: 3px; overflow: hidden; }
.rk-bar span { display: block; height: 100%; border-radius: 2px; }
.rk-n { grid-column: 1 / -1; font-size: 11px; color: var(--text-3); margin-top: 2px; }
.rk-foot { font-size: 12px; color: var(--text-3); margin: 8px 0 0; }
@media (max-width: 460px) { .rk-grid { grid-template-columns: 1fr; } .rk-cols { grid-template-columns: 1fr; } }


.st-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 10px; }
@media (max-width: 520px) { .st-grid { grid-template-columns: 1fr; } }
.st-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; min-width: 0; }
.st-card h3, .st-h { font-size: 14px; margin: 0 0 2px; }
.st-h { margin: 18px 0 8px; }
.st-card .hint { margin: 0 0 8px; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .tip, .st-card .tip { position: absolute; display: none; pointer-events: none; background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 8px; font-size: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.12); white-space: nowrap; z-index: 5; }
.hb-row { display: grid; grid-template-columns: minmax(150px, 1.3fr) 2fr auto; align-items: center; gap: 10px; padding: 5px 0; font-size: 13px; }
.hb-bar { height: 12px; background: var(--grid); border-radius: 3px; overflow: hidden; }
.hb-bar span { display: block; height: 100%; border-radius: 3px; }
.hb-v { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; font-weight: 600; }
.muted-i { color: var(--text-3); font-weight: 400; margin-left: 4px; }
ol.hot, ol.cur { margin: 0 0 10px; padding-left: 20px; font-size: 13px; color: var(--text-2); }
ol.hot li, ol.cur li { margin-bottom: 4px; }
ol.hot a b, ol.cur a b { color: var(--accent); }
ol.hot a, ol.cur a { text-decoration: none; color: var(--text); }
ol.cur li { display: list-item; }
ol.cur li span { color: var(--text-3); margin-left: 6px; }
table.rob td { white-space: normal; vertical-align: top; }
table.rob td:nth-child(2), table.rob td:nth-child(3) { white-space: nowrap; }
table.rob td:last-child, table.rob th:last-child { text-align: left; color: var(--text-2); font-size: 13px; }
details.more, details.method { margin: 12px 0; }
details.more > summary, details.method > summary { cursor: pointer; color: var(--accent); font-size: 13px; margin-bottom: 8px; }
details.method p { font-size: 13px; max-width: 980px; }


.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tv-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 8px; font-size: 13px; color: var(--text-2); }
.tv-tools input, .tv-tools select { font: inherit; font-size: 13px; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 8px; }
.tv-q { width: 180px; }
.tv-fv { width: 90px; }
.tv-groups { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.tv-groups label { cursor: pointer; white-space: nowrap; }
.tv-addf { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tv-fu { color: var(--text-3); min-width: 18px; }
.tv-btn { font: inherit; font-size: 12px; padding: 4px 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 6px; cursor: pointer; }
.tv-btn:hover { border-color: var(--accent); }
.tv-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 9px; border: 1px solid var(--accent); border-radius: 12px;
  background: var(--sel); color: var(--text); font-size: 12px; }
.chip button { border: 0; background: none; color: var(--text-2); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 4px; }
.tv-right { margin-left: auto; display: inline-flex; gap: 8px; align-items: center; }
.tv-count { color: var(--text-3); }
.tv-wrap { max-height: 78vh; overflow: auto; }
table.tv th, table.tv td { padding: 6px 9px; }
table.tv thead th { position: sticky; top: 0; background: var(--surface); z-index: 2; }
table.tv thead tr.grp th { top: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); text-align: center;
  border-bottom: 0; padding-bottom: 0; }
table.tv thead tr:not(.grp) th { top: 22px; }
table.tv th button { font: inherit; font-weight: 600; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
table.tv th.on, table.tv th.on button { color: var(--text); }
table.tv th button:hover { color: var(--accent); }
table.tv .ar { font-size: 9px; margin-left: 3px; color: var(--accent); }
table.tv td.tx, table.tv th.tx { text-align: left; }
table.tv td.na { color: var(--text-3); }
table.tv tbody tr:hover td { background: var(--bg); }
table.tv tr > :first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
table.tv thead tr > :first-child { z-index: 3; }
table.tv tbody tr:hover > :first-child { background: var(--bg); }
table.tv td:first-child a { color: var(--text); text-decoration: none; white-space: nowrap; }
table.tv td:first-child a b { color: var(--accent); }
table.tv tfoot td { font-weight: 600; border-top: 2px solid var(--border); position: sticky; bottom: 0; background: var(--surface); }
.tv-bar { display: block; height: 4px; width: 56px; margin: 3px 0 0 auto; background: var(--grid); border-radius: 2px; overflow: hidden; }
.tv-bar span { display: block; height: 100%; }
.rk-more { display: inline-block; margin-top: 8px; font-size: 12px; text-decoration: none; }
.rk-more:hover { text-decoration: underline; }
@media (max-width: 700px) { .tv-right { margin-left: 0; } .tv-q { width: 140px; } }
table.tv { width: max-content; min-width: 100%; }
table.tv th button { display: inline-block; max-width: 78px; white-space: normal; vertical-align: bottom; }
table.tv th, table.tv td { padding: 6px 8px; }
.tv-tag { font-size: 11px; color: var(--text-3); border: 1px solid var(--border); border-radius: 8px; padding: 0 5px; margin-left: 4px; white-space: nowrap; }
table.tv th.tx button { max-width: none; white-space: nowrap; }


body:has(dialog.dlg[open]) { overflow: hidden; }
dialog.dlg { width: min(780px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; overflow: auto; overscroll-behavior: contain;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(0, 0, 0, .28); }
dialog.dlg::backdrop { background: rgba(0, 0, 0, .62); }
.dlg-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.dlg-head h2 { margin: 0; font-size: 17px; }
.dlg-x { flex: none; width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text-2);
  font-size: 20px; line-height: 1; cursor: pointer; }
.dlg-x:hover { color: var(--text); border-color: var(--text-3); }
.dlg-body { padding: 16px 20px 20px; }
.dlg-body h3 { font-size: 14px; margin: 22px 0 6px; }
.dlg-body p, .dlg-body li { color: var(--text-2); }
.dlg-body p { margin: 0 0 10px; }
.dlg-body ul, .dlg-body ol { margin: 0 0 12px; padding-left: 20px; }
.dlg-body li { margin-bottom: 4px; }
.dlg-body b { color: var(--text); }
.dlg-body .tbl { margin: 4px 0 10px; }
.rx-lead { font-size: 16px; color: var(--text) !important; }
.rx-lead > b:first-child { font-size: 20px; }
.rx-sum { font-size: 13px; }
.rx-foot { margin: 18px 0 0 !important; font-size: 13px; }
table.rx-t th, table.rx-t td { padding: 6px 10px; }
table.rx-t td:first-child { white-space: normal; }

.rx-scale { position: relative; height: 92px; margin: 6px 8px 14px; }
.rx-axis { position: absolute; left: 0; right: 0; top: 46px; height: 2px; background: var(--border); }
.rx-band { position: absolute; top: 39px; height: 16px; border-radius: 8px; background: var(--accent); opacity: .22; }
.rx-dot { position: absolute; top: 39px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
.rx-dot span { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); font-weight: 700; font-size: 15px; color: var(--text); white-space: nowrap; }
.rx-one { position: absolute; top: 22px; height: 42px; border-left: 2px dashed var(--text-3); }
.rx-one span { position: absolute; top: -18px; left: 0; transform: translateX(-50%); font-size: 12px; color: var(--text-2); white-space: nowrap; }
.rx-tick { position: absolute; top: 58px; transform: translateX(-50%); font-size: 11px; color: var(--text-3); }
.rx-ends { position: absolute; left: 0; right: 0; top: 74px; display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); }

.rx-bars { margin: 6px 0 12px; }
.rx-row { display: grid; grid-template-columns: minmax(120px, 230px) 1fr auto; align-items: center; gap: 10px; padding: 3px 0; font-size: 13px; }
.rx-row.ind .rx-l { padding-left: 14px; color: var(--text-2); }
.rx-l { color: var(--text); }
.rx-track { height: 10px; background: var(--grid); border-radius: 0 5px 5px 0; overflow: hidden; }
.rx-track span { display: block; height: 100%; border-radius: 0 5px 5px 0; }
.rx-v { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rx-n { display: block; color: var(--text-3); font-size: 12px; }
.rx-unit { font-size: 12px; color: var(--text-3); margin-top: 2px; }
@media (max-width: 560px) {
  .dlg-body { padding: 12px 14px 16px; }
  .dlg-head { padding: 10px 14px; }
  .rx-row { grid-template-columns: 1fr auto; }
  .rx-row .rx-track { grid-column: 1 / -1; grid-row: 2; }
  table.rx-t th, table.rx-t td { padding: 6px 6px; }
  table.rx-t th:first-child, table.rx-t td:first-child { padding-left: 8px; }
}


.ym-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 6px 0 8px; }
.ym-years { flex-wrap: wrap; }
.ym-years button { margin-left: -1px; border-radius: 0; }
.ym-years button:first-child { margin-left: 0; }
.ym-play { min-width: 82px; }
.ym-opt { font-size: 13px; color: var(--text-2); display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.ym-stats { font-size: 13px; color: var(--text-2); margin: 0 0 8px; min-height: 19px; }
.ym-stats b { color: var(--text); }
.ym-stats.loading::after { content: ' · loading…'; color: var(--text-3); }
.ym-map { height: min(64vh, 580px); min-height: 320px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); overflow: hidden; }
.ym-map > .hint { padding: 16px; }
.ym-map .leaflet-container, .ym-map.leaflet-container { font: 12px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--surface); }
.ym-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 0; font-size: 13px; color: var(--text-2); }
.ym-lg { display: inline-flex; align-items: center; gap: 6px; }
.ym-lg b { color: var(--text); font-weight: 600; }
.ym-lg .ln { width: 18px; height: 4px; border-radius: 2px; display: inline-block; }
.ym-lg .ln.prev { height: 7px; background: var(--route-old); }
.ym-note { margin-top: 6px; }
.ym-map .leaflet-tooltip { background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.ym-map .leaflet-tooltip-left::before { border-left-color: var(--border); }
.ym-map .leaflet-tooltip-right::before { border-right-color: var(--border); }
#evolution .hit { cursor: pointer; }   
@media (max-width: 520px) {
  .ym-years button { padding-left: 7px; padding-right: 7px; }
  .ym-map { height: 58vh; }
}
