/* ═══════════════════════════════════════════════════════════════
   HSPIM — Хяналтын самбар (ОНУХ) v2.5 — харанхуй / гэрэлтэй горим
   ═══════════════════════════════════════════════════════════════ */
:root {
  --font: 'Inter', system-ui, sans-serif; --font-head: 'Manrope', var(--font);
  --accent: #FFD500; --blue: #2E5BFF; --teal: #00D3C7; --orange: #FF7A45; --red: #FF4D6D; --green: #2ED47A; --violet: #9B7BFF;
  --side-w: 250px;
}
[data-dash-theme="dark"] {
  --bg: #050B2B; --bg-2: #0A1240; --tile: #0E1750; --tile-2: #131D5E; --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.14);
  --ink: #F2F4FF; --ink-2: #B7C0E8; --muted: #7C88BF; --grid: rgba(255,255,255,.07);
  --side-bg: #070E36; --heat-0: #0E1750; --shadow: 0 10px 30px -14px rgba(0,0,0,.6);
}
[data-dash-theme="light"] {
  --bg: #F2F4FA; --bg-2: #fff; --tile: #fff; --tile-2: #F6F8FF; --line: #E4E7F2; --line-2: #D4D8E8;
  --ink: #0D1240; --ink-2: #3B4270; --muted: #7A809E; --grid: #E7E9F2;
  --side-bg: #0D1240; --heat-0: #F3F5FB; --shadow: 0 10px 30px -16px rgba(13,18,64,.25);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body.dash { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; flex: none; }
button { font-family: inherit; cursor: pointer; }
.muted { color: var(--muted); font-size: 12.5px; }

.dash-shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }

/* ── Хажуу ── */
.dash-side { background: var(--side-bg); color: #B7C0E8; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; border-right: 1px solid rgba(255,255,255,.06); scrollbar-width: thin; }
.ds-brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px 18px; color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 12.5px; line-height: 1.25; letter-spacing: .02em; text-transform: uppercase; }
.ds-brand img, .ds-brand svg { width: 42px; height: 42px; border-radius: 12px; }
.ds-nav { padding: 6px 12px; display: grid; gap: 3px; }
.ds-nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 13px; color: #A6B1DE; transition: .15s; }
.ds-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.ds-nav a.on { background: var(--blue); color: #fff; box-shadow: 0 8px 18px -8px rgba(46,91,255,.9); }
.ds-nav a svg { width: 17px; height: 17px; }
.ds-filters { padding: 18px 16px; border-top: 1px solid rgba(255,255,255,.07); margin-top: 10px; }
.ds-filters h5 { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #7C88BF; margin-bottom: 12px; }
.ds-filters h5 svg { width: 14px; height: 14px; }
.ds-filters label { display: block; font-size: 12px; color: #8F9AC9; margin-bottom: 10px; }
.ds-filters select, .ds-filters input { width: 100%; margin-top: 4px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: #fff; padding: 8px 10px; border-radius: 8px; font-family: inherit; font-size: 12.5px; color-scheme: dark; }
.ds-filters .row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ds-filters .row input { min-width: 0; padding: 8px 6px; font-size: 11.5px; }
.ds-reset { width: 100%; background: none; border: 1px dashed rgba(255,255,255,.2); color: #A6B1DE; padding: 8px; border-radius: 8px; font-size: 12px; margin-top: 4px; }
.ds-reset:hover { border-color: var(--accent); color: var(--accent); }
.ds-foot { margin-top: auto; padding: 16px 20px 20px; border-top: 1px solid rgba(255,255,255,.07); display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; }
.ds-foot a { display: inline-flex; align-items: center; gap: 6px; color: #A6B1DE; }
.ds-foot a svg { width: 14px; height: 14px; }
.ds-lang { display: flex; gap: 2px; background: rgba(255,255,255,.06); border-radius: 20px; padding: 2px; }
.ds-lang a { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 4px; border-radius: 20px; font-weight: 700; font-size: 11px; }
.ds-lang a img { width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,255,255,.35); }
.ds-lang a:not(.on) img { opacity: .75; }
.ds-lang a.on { background: #fff; color: #0D1240; }

/* ── Толгой ── */
.dash-main { min-width: 0; }
.dash-head { display: flex; align-items: center; gap: 16px; padding: 22px 28px 12px; }
.dash-head h1 { font-family: var(--font-head); font-size: 20px; color: var(--accent); letter-spacing: .01em; text-transform: uppercase; }
.dash-head p { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.dash-head-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.chip-live { display: inline-flex; align-items: center; gap: 7px; background: rgba(46,212,122,.12); color: var(--green); font-size: 11.5px; font-weight: 700; padding: 5px 11px; border-radius: 20px; border: 1px solid transparent; font-family: inherit; }
button.chip-live { cursor: pointer; }
button.chip-live:hover, button.chip-live[aria-expanded="true"] { border-color: rgba(46,212,122,.5); }
.chip-q { display: inline-flex; width: 16px; height: 16px; border-radius: 50%; background: rgba(46,212,122,.25); align-items: center; justify-content: center; font-size: 10.5px; }
.chip-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(46,212,122,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(46,212,122,.6); } 70% { box-shadow: 0 0 0 8px rgba(46,212,122,0); } 100% { box-shadow: 0 0 0 0 rgba(46,212,122,0); } }
.ds-btn { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--tile); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; }
.ds-btn:hover { border-color: var(--accent); color: var(--accent); }
.ds-btn svg { width: 16px; height: 16px; }
.ds-burger { display: none; background: none; border: 0; color: var(--ink); }

/* ── Тайл ── */
.dash-body { padding: 8px 28px 40px; display: grid; gap: 18px; }
.tile { background: var(--tile); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow); position: relative; min-width: 0; }
.t-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.t-head h3 { font-family: var(--font-head); font-size: 14px; color: var(--ink); font-weight: 800; }
.t-sub { font-size: 12px; color: var(--muted); }
.t-tabs { display: flex; gap: 4px; background: var(--bg-2); border-radius: 8px; padding: 3px; }
.t-tabs button { background: none; border: 0; color: var(--muted); font-weight: 700; font-size: 11.5px; padding: 4px 10px; border-radius: 6px; }
.t-tabs button.on { background: var(--accent); color: #0D1240; }
.plot { position: relative; }
.h-240 { height: 240px; } .h-260 { height: 260px; } .h-280 { height: 280px; } .h-520 { height: 520px; }
.grid-3 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.sec-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.sec-title h2 { font-family: var(--font-head); font-size: 16px; color: var(--ink); }

/* KPI */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.kpi { overflow: hidden; }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--blue); }
.kpi.warn::before { background: var(--red); } .kpi.gold::before { background: var(--accent); }
.k-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.k-lbl { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.k-tag { font-size: 11px; color: var(--muted); background: var(--bg-2); padding: 2px 8px; border-radius: 20px; }
.k-val { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; }
.k-val b { font-family: var(--font-head); font-size: 34px; font-weight: 800; color: var(--ink); line-height: 1; }
.k-delta { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.k-delta.up { color: var(--green); background: rgba(46,212,122,.12); } .k-delta.down { color: var(--red); background: rgba(255,77,109,.12); } .k-delta.flat { color: var(--muted); background: var(--bg-2); }
.k-pct { font-size: 14px; color: var(--muted); font-weight: 700; }
.k-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.k-spark { height: 46px; margin-top: 10px; }
.k-groups { display: grid; grid-template-columns: 1fr; gap: 3px; margin-top: 10px; font-size: 11.5px; color: var(--ink-2); }
.k-groups span { display: flex; justify-content: space-between; gap: 8px; } .k-groups em { font-style: normal; display: inline-flex; gap: 6px; align-items: center; } .k-groups b { color: var(--ink); }

/* Map */
.map-wrap { position: relative; }
.mn-map-box { width: 100%; }
.mn-map-box svg { width: 100%; height: auto; display: block; }
.mn-map-box path { fill: var(--tile-2); stroke: var(--bg); stroke-width: 1.2; transition: fill .25s; }
.mn-map-box path.lvl-1 { fill: #4D3B8F; } .mn-map-box path.lvl-2 { fill: #A44E3A; } .mn-map-box path.lvl-3 { fill: #E0672C; } .mn-map-box path.lvl-4 { fill: #FFB020; } .mn-map-box path.lvl-5 { fill: var(--accent); }
[data-dash-theme="light"] .mn-map-box path { fill: #E8EBF5; stroke: #fff; }
[data-dash-theme="light"] .mn-map-box path.lvl-1 { fill: #CFD8FF; } [data-dash-theme="light"] .mn-map-box path.lvl-2 { fill: #98ACFF; } [data-dash-theme="light"] .mn-map-box path.lvl-3 { fill: #5E7DFF; } [data-dash-theme="light"] .mn-map-box path.lvl-4 { fill: #2E5BFF; } [data-dash-theme="light"] .mn-map-box path.lvl-5 { fill: #10069F; }
.mn-map-box path.active { cursor: pointer; }
.mn-map-box path.active:hover { stroke: var(--accent); stroke-width: 2; filter: brightness(1.15); }
.map-tip { position: absolute; pointer-events: none; background: #0D1240; color: #fff; padding: 8px 12px; border-radius: 8px; font-size: 12px; box-shadow: 0 8px 20px rgba(0,0,0,.4); white-space: nowrap; z-index: 5; transform: translate(-50%, -110%); display: none; }
.map-tip b { color: var(--accent); }
.map-legend { position: absolute; left: 6px; bottom: 6px; display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); }
.map-legend i { width: 14px; height: 8px; border-radius: 2px; display: inline-block; }
.map-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.map-list div { background: var(--bg-2); border-radius: 10px; padding: 8px 10px; font-size: 11.5px; color: var(--muted); }
.map-list b { display: block; color: var(--ink); font-family: var(--font-head); font-size: 17px; }
.map-list small { color: var(--accent); font-weight: 700; }
[data-dash-theme="light"] .map-list small { color: var(--blue); }

/* Heatmap */
.heat-wrap { overflow-x: auto; }
.heat { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: 11.5px; }
.heat th { font-weight: 600; color: var(--muted); text-align: left; padding: 4px 6px; white-space: nowrap; font-size: 11px; }
.heat th.col { text-align: center; }
.heat td { text-align: center; padding: 6px 4px; border-radius: 6px; font-weight: 700; color: #fff; min-width: 46px; }
.heat td.q { text-align: left; color: var(--ink-2); font-weight: 500; background: none; padding-left: 6px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heat tr.grp td.q { color: var(--ink); font-weight: 800; padding-top: 10px; }
.glegend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.glegend span { display: inline-flex; align-items: center; gap: 6px; }
.glegend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* Widgets (program indicators) */
.wtile .val { font-family: var(--font-head); font-size: 28px; font-weight: 800; color: var(--ink); }
.wtile .lbl { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.wtile .sub { font-size: 11.5px; color: var(--muted); }
.wtile .spark { height: 40px; margin-top: 8px; }
details.tbl { margin-top: 10px; font-size: 12px; color: var(--muted); }
details.tbl summary { cursor: pointer; font-weight: 600; }
details.tbl table { width: 100%; border-collapse: collapse; margin-top: 8px; }
details.tbl th, details.tbl td { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: left; }

/* Wishes */
.wish-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.wish { background: var(--bg-2); border-left: 3px solid var(--teal); border-radius: 0 10px 10px 0; padding: 10px 14px; font-size: 13px; color: var(--ink-2); }
.wish small { display: block; color: var(--muted); margin-top: 6px; font-size: 11px; }
.dash-note { color: var(--muted); font-size: 12px; text-align: center; padding-top: 8px; }
.empty-note { color: var(--muted); font-size: 13px; text-align: center; padding: 30px; }

@media (max-width: 1200px) { .kpi-row { grid-template-columns: 1fr 1fr; } .span-3, .span-4, .span-5 { grid-column: span 6; } .span-7, .span-8 { grid-column: span 12; } .wish-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .dash-shell { grid-template-columns: 1fr; }
  .dash-side { position: fixed; left: 0; top: 0; width: var(--side-w); z-index: 50; transform: translateX(-100%); transition: .25s; }
  .dash-side.open { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.6); }
  .ds-burger { display: inline-flex; }
  .dash-head, .dash-body { padding-left: 16px; padding-right: 16px; }
  .dash-head h1 { font-size: 16px; }
  .kpi-row, .grid-3 { grid-template-columns: 1fr; }
  .span-3, .span-4, .span-5, .span-6, .span-7, .span-8, .span-12 { grid-column: span 1; }
  .wish-grid { grid-template-columns: 1fr; }
  .map-list { grid-template-columns: 1fr 1fr; }
  #genAt { display: none; }
  .chip-live { font-size: 0; gap: 4px; padding: 6px 8px; }
  .chip-live .chip-q { font-size: 10.5px; }
  .src-map { grid-template-columns: 1fr; }
}
@media print { .dash-side, .dash-head-right, .ds-burger, .src-actions { display: none !important; } .dash-shell { grid-template-columns: 1fr; } .tile { break-inside: avoid; } }

/* ── Өгөгдлийн эх үүсвэр (v2.7.0) ── */
.src-panel { background: var(--tile); border: 1px solid var(--line-2); border-left: 4px solid var(--green); border-radius: 16px; padding: 18px 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.src-panel[hidden] { display: none; }
.src-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.src-head h2 { font-family: var(--font-head); font-size: 16px; color: var(--ink); margin-bottom: 4px; }
.src-head p { color: var(--ink-2); font-size: 13px; max-width: 820px; }
.src-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 12px; }
.src-stats span { background: var(--tile-2); border: 1px solid var(--line); border-radius: 20px; padding: 5px 12px; font-size: 12px; color: var(--ink-2); }
.src-stats b { color: var(--ink); }
.src-map { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.src-map div { background: var(--tile-2); border-radius: 10px; padding: 10px 12px; display: grid; gap: 3px; }
.src-map b { font-size: 12.5px; color: var(--ink); }
.src-map span { font-size: 12px; color: var(--muted); }
.src-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.src-btn { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line-2); color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.src-btn:hover { border-color: var(--accent); color: var(--accent); }
.src-btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.src-btn.primary:hover { filter: brightness(1.1); color: #fff; }
.dash-note a { color: var(--ink-2); text-decoration: underline; cursor: pointer; }

/* ── Оноор харьцуулалт, сайжруулах хүсэлт (v3.0.0) ── */
.h-200 { height: 200px; }
.ytable { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.ytable th { font-size: 12px; color: var(--ink); text-align: center; padding: 8px 6px; border-bottom: 1px solid var(--line); font-weight: 700; }
.ytable th small { display: block; font-weight: 500; color: var(--muted); font-size: 10.5px; margin-top: 2px; }
.ytable th:first-child, .ytable td:first-child { text-align: left; color: var(--ink-2); }
.ytable td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--line); color: var(--ink); white-space: nowrap; }
.ytable td small { display: block; font-size: 10.5px; margin-top: 1px; color: var(--muted); }
.ytable td small.up { color: var(--green); } .ytable td small.down { color: var(--red, #FF4D6D); }
.ytable tr.tot td { font-size: 14px; }
.ytable .cur { background: rgba(255,213,0,.12); }
.ytable td:first-child i { font-style: normal; margin-right: 4px; }
.mode-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.mode-row span { background: var(--tile-2); border-radius: 20px; padding: 5px 12px; font-size: 12px; color: var(--ink-2); }
.mode-row b { color: var(--ink); }
#chYears { cursor: pointer; }

/* ═══ v3.1.0 ═══ */
/* Шүүлтүүрийн сонголтууд: сонголтын жагсаалт цагаан дэвсгэр дээр цагаан бичигтэй харагдахгүй байсныг засав (Windows/Chrome) */
.ds-filters select option, .ds-filters select optgroup { background-color: #0D1240; color: #F2F4FF; }
.ds-filters select option:checked { background-color: #2E5BFF; color: #fff; }
.ds-filters select option[value=""] { color: #B7C0E8; }
.ds-filters select:focus, .ds-filters input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,213,0,.18); }

/* KPI тайлбар (томьёо) */
.k-info { position: relative; display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 6px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--muted); font: 600 10px/1 var(--font); font-style: italic; cursor: help; flex: none; }
.k-info:hover, .k-info:focus { color: var(--ink); border-color: var(--ink-2); outline: none; }
.k-info::after { content: attr(data-tip); position: absolute; right: -6px; top: calc(100% + 8px); width: 250px; padding: 10px 12px; border-radius: 10px; background: #0D1240; color: #E9ECFF; font: 400 11.5px/1.5 var(--font); font-style: normal; text-align: left; box-shadow: 0 12px 28px -10px rgba(0,0,0,.55); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .15s; z-index: 20; white-space: normal; pointer-events: none; }
.k-info:hover::after, .k-info:focus::after { opacity: 1; visibility: visible; transform: none; }
.k-top { display: flex; align-items: center; }
.k-top .k-tag { margin-left: auto; }
.k-top .k-tag + .k-info { margin-left: 6px; }
.k-top .k-lbl + .k-info { margin-left: auto; }
.live-dot { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--green); }
.live-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(46,212,122,.2); }

/* Хариултын шинжилгээ — хэмжигч */
#insights { margin-top: 8px; }
.gauges { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 6px; }
.gauge { text-align: center; padding: 10px 6px 4px; border-radius: 14px; background: var(--tile-2); border: 1px solid var(--line); }
.gauge svg { width: 100%; max-width: 160px; height: auto; aspect-ratio: 120 / 70; display: block; margin: 0 auto -34px; }
.gauge .g-val { position: relative; }
.gauge .g-bg { fill: none; stroke: var(--grid); stroke-width: 10; stroke-linecap: round; }
.gauge .g-fg { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dasharray .8s ease; }
.gauge .g-val { font: 700 22px/1.1 var(--font-head); }
.gauge .g-lbl { font-size: 12.5px; font-weight: 600; color: var(--ink); margin-top: 4px; }
.gauge .g-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.g-groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.gg-h { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); }
.gg-h i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.gg-h b { color: var(--ink); }
.gg-bar { display: flex; height: 7px; border-radius: 6px; background: var(--grid); overflow: hidden; margin: 6px 0 4px; }
.gg-bar .ok { display: block; } .gg-bar .bad { display: block; margin-left: auto; background: #FF4D6D; }
.gg small { font-size: 10.5px; color: var(--muted); }

/* Сэдвийн ангилал */
.theme-tile .t-head h3 { font-size: 14px; line-height: 1.35; }
.th-top { display: flex; gap: 12px; align-items: center; margin: 4px 0 10px; }
.th-donut { width: 78px; height: 78px; flex: none; position: relative; }
.th-meta { flex: 1; min-width: 0; }
.th-tri { display: grid; gap: 3px; font-size: 12px; color: var(--ink-2); }
.th-tri i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.th-tri b { color: var(--ink); } .th-tri small { color: var(--muted); margin-left: 3px; }
.th-n { font-size: 12px; color: var(--ink-2); margin-top: 6px; } .th-n b { color: var(--ink); } .th-n small { color: var(--muted); }
.th-list { display: grid; gap: 2px; }
.th-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: baseline; padding: 6px 8px; border-radius: 8px; text-align: left; background: none; border: 1px solid transparent; color: inherit; font: inherit; width: 100%; }
button.th-row { cursor: pointer; } button.th-row:hover, button.th-row.on { background: var(--tile-2); border-color: var(--line-2); }
.th-row.other { opacity: .7; }
.th-name { font-size: 12.5px; color: var(--ink); line-height: 1.35; }
.th-v { text-align: right; white-space: nowrap; } .th-v b { font-size: 13px; color: var(--ink); } .th-v small { font-size: 10.5px; color: var(--muted); margin-left: 5px; }
.th-bar { grid-column: 1 / -1; height: 5px; border-radius: 4px; background: var(--grid); overflow: hidden; }
.th-bar i { display: block; height: 100%; border-radius: 4px; }
.th-quotes { max-height: 320px; overflow: auto; padding: 10px; border-radius: 10px; background: var(--tile-2); border: 1px solid var(--line); }
.th-quotes .q-head { font-size: 12px; font-weight: 600; color: var(--ink); margin-bottom: 8px; } .th-quotes .q-head small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.th-quotes blockquote { margin: 0 0 8px; padding: 8px 10px; border-left: 3px solid var(--blue); background: var(--tile); border-radius: 0 8px 8px 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.th-quotes cite { display: block; font-style: normal; font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.th-note { display: flex; gap: 8px; align-items: flex-start; font-size: 11.5px; color: var(--muted); margin: 10px 2px 0; line-height: 1.5; }
.th-note svg { width: 15px; height: 15px; flex: none; color: var(--accent); margin-top: 1px; }
@media (max-width: 1100px) { .gauges { grid-template-columns: repeat(3, 1fr); } .g-groups { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .gauges { grid-template-columns: repeat(2, 1fr); } .g-groups { grid-template-columns: 1fr; } }
@media print { .k-info { display: none; } .th-quotes { display: none; } }

.k-tag { white-space: nowrap; }
@media (max-width: 640px) {
  .heat-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .dash-head { flex-wrap: wrap; }
  .dash-head-right { flex-wrap: wrap; gap: 8px; }
  .dash-main, .dash-body { min-width: 0; overflow-x: clip; }
}
.plot.h-220 { height: 220px; }
.radar-list { display: grid; gap: 3px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 11.5px; }
.radar-list span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radar-list div { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: baseline; color: var(--ink-2); }
.radar-list i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.radar-list b { color: var(--ink); } .radar-list small { font-size: 10.5px; min-width: 44px; text-align: right; }
.radar-list .up, .ytable .up { color: var(--green); } .radar-list .down { color: var(--red); }
.age-gender { margin-top: 8px; }
.ag-bar { display: flex; height: 8px; border-radius: 6px; overflow: hidden; background: var(--grid); }
.ag-bar i { display: block; height: 100%; }
.ag-leg { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 11.5px; color: var(--ink-2); }
.ag-leg i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.ag-leg b { color: var(--ink); } .ag-leg small { color: var(--muted); }
