/* Tambahan ME-45 di atas styles.css engine ME-30 */
:root { color-scheme: light; }
html, body { background: #fff; color: var(--text-1); }
body { margin: 0; font-family: var(--font-sans); font-size: 12px; }
button, select, input { font-family: inherit; color: #1f2329; }
.pillnav button, .section-band button { color: #fff; }
.px-loading { padding: 40px; font-size: 14px; color: #3c4146; }
.px-sim { font-size: 11px; font-weight: 600; color: #8a5a00; background: #fcf0d9; border: 1px solid #ecd39b; border-radius: 3px; padding: 3px 8px; margin-right: 8px; }
.px-logo { width: 24px; height: 24px; }

@media (max-width: 760px) { .section-band .right { display: none; } }

/* filter */
.px-dd { position: relative; }
.px-dd .fr-select { min-width: 128px; }
.px-dd.wide .fr-select { min-width: 330px; }
.px-dd .fr-select[disabled] { opacity: .55; cursor: default; }
.px-dd .dropdown { white-space: nowrap; }
.px-check { display: flex; align-items: center; gap: 8px; }
.px-check input { margin: 0; }
.px-dd-tools { display: flex; gap: 6px; padding: 4px 8px 6px; border-bottom: 1px solid var(--divider); }
.px-dd-tools button { background: none; border: 0; padding: 0; font-size: 11px; color: #2e5fb8; cursor: pointer; }

/* tata letak */
.content { padding: 0 12px 24px; }
.px-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; margin: 10px 0; }
.px-row > .tile { margin: 0; }
.px-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 10px 0; }
.px-cards > .tile { margin: 0; grid-column: auto; }
.px-cards > .tile > .tile-head { padding: 5px 10px; min-height: 0; }
.px-cards > .tile > .tile-head .tile-title { font-size: 11.5px; line-height: 1.25; }
.px-cards > .tile > .tile-body { padding: 7px 10px 8px; }
.px-card-body { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; height: 100%; }
.px-card-sub { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.px-cards .px-badge, .px-cards .px-flag { font-size: 9.5px; }
.px-card-value { line-height: 1.15; font-size: 22px; font-weight: 700; letter-spacing: -.01em; color: var(--num-blue); font-variant-numeric: tabular-nums; }
.px-card-value.pos { color: var(--pos); } .px-card-value.neg { color: var(--neg); }
.px-card-sub { font-size: 11px; color: var(--text-3); line-height: 1.4; }
.px-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; color: #5b6470; border: 1px solid var(--divider); border-radius: 10px; padding: 0 7px; line-height: 17px; white-space: nowrap; background: #fff; }
.px-flag { display: inline-block; font-size: 10px; color: #8a5a00; background: #fcf0d9; border-radius: 3px; padding: 0 5px; line-height: 16px; white-space: nowrap; cursor: help; }
.px-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; }
.px-scope { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
/* jumlah sampel: satu baris tipis */
.px-sampleline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0 0 10px; padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-3); background: var(--bg-panel); font-size: 11px; color: var(--text-3); }
.px-sampleline .lbl { font-weight: 600; color: var(--text-1); font-size: 11.5px; }
.px-sampleline .nums { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; }
.px-sampleline .nums b { color: var(--text-1); font-size: 13px; font-variant-numeric: tabular-nums; }
.px-sampleline .scope { margin-left: auto; font-size: 10.5px; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.px-cards .px-badges { margin-top: auto; padding-top: 3px; }

/* chart */
.px-chart { position: relative; width: 100%; }
.px-chart svg { display: block; overflow: visible; font-family: var(--font-sans); }
.px-legend { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 2px 0 8px; font-size: 11px; color: var(--text-2); }
.px-legend button, .px-legend span { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 0; font-size: 11px; }
.px-legend button { cursor: pointer; }
.px-legend button.off { opacity: .4; text-decoration: line-through; }
.px-swatch { width: 11px; height: 11px; border-radius: 2px; display: inline-block; }
.px-line { width: 16px; height: 0; border-top: 3px solid; display: inline-block; }
.px-diamond { width: 8px; height: 8px; transform: rotate(45deg); background: #1f2329; display: inline-block; }
.px-tri { width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 8px solid #7c3aed; display: inline-block; }
.px-swatch.whole { border: 1.5px solid #1f2329; background: #fff; }
.px-tip { position: absolute; pointer-events: none; z-index: 20; background: #fff; border: 1px solid var(--border-strong); border-radius: 4px; box-shadow: 0 4px 14px rgba(0,0,0,.14); padding: 8px 10px; font-size: 11px; line-height: 1.55; min-width: 170px; }
.px-tip b { display: block; margin-bottom: 2px; }
.px-tip table { border-collapse: collapse; width: 100%; }
.px-tip td { padding: 0 0 0 0; white-space: nowrap; }
.px-tip td + td { text-align: right; padding-left: 14px; font-variant-numeric: tabular-nums; }
.px-tip.keys { width: 200px; }
.px-tip.keys td.k { width: 18px; text-align: center; line-height: 0; }
.px-tip.keys td.k i { vertical-align: middle; }
.px-tip.keys td.l { text-align: left; padding-left: 7px; }
.px-ctl { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin-bottom: 8px; }

/* tabel */
.px-scroll { overflow-x: auto; }
table.lk-table td.num, table.lk-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.lk-table tr.px-sep td { border-top: 1.5px solid var(--border-strong); }
table.lk-table td.px-name { white-space: nowrap; }
.px-heat td.num { font-weight: 600; text-align: center; }
.px-pager { display: flex; gap: 10px; align-items: center; justify-content: flex-end; padding: 8px 4px 0; font-size: 11px; color: var(--text-3); }
.px-pager button { border: 1px solid var(--border); background: #fff; border-radius: 3px; padding: 3px 10px; cursor: pointer; font-size: 11px; }
.px-pager button:disabled { opacity: .4; cursor: default; }
.px-bar { height: 6px; border-radius: 3px; background: #2e5fb8; opacity: .75; }

/* peta */
.px-mapbox { position: relative; container-type: inline-size; }
.px-map { height: 560px; border: 1px solid var(--divider); border-radius: 4px; position: relative; z-index: 0; }
.px-map.leaflet-container, .px-map .leaflet-container { background: #cfe3e5; font-family: var(--font-sans); }
.px-gaplabel { background: none; border: 0; }
.px-gaplabel span { display: inline-block; transform: translate(-50%, -50%); font-size: 10px; font-weight: 700; color: #14181d; background: rgba(255,255,255,.88); border-radius: 3px; padding: 0 3px; white-space: nowrap; pointer-events: none; }
.px-place { background: none; border: 0; pointer-events: none; }
.px-place span { position: absolute; white-space: nowrap; transform: translate(-3px, -50%); font-size: 10.5px; font-weight: 600; color: #333d47; text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
.px-place.city span::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: #333d47; margin-right: 3px; vertical-align: middle; }
.px-place.country span { transform: translate(-50%, -50%); font-size: 10px; letter-spacing: .08em; color: #7b7f85; }
.px-pin { background: none; border: 0; }
.px-pin span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; background: #fff; border: 3.5px solid; box-shadow: 0 2px 6px rgba(0,0,0,.35); font-size: 10.5px; font-weight: 700; color: #14181d; }
.px-pin.none span { background: #b7bec8; border: 1.5px solid #fff; }
.px-bench { position: absolute; top: 10px; right: 10px; z-index: 1; display: flex; flex-direction: column; gap: 8px; width: 250px; pointer-events: none; }
.px-bm { background: rgba(255,255,255,.95); border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.2); border-left: 4px solid; padding: 7px 10px; font-size: 11px; line-height: 1.55; display: flex; flex-direction: column; }
.px-bm.ptpl { border-left-color: #ff8c00; } .px-bm.comp { border-left-color: #1e40af; }
.px-bm b { font-size: 11px; } .px-bm strong { font-size: 11px; font-weight: 700; }
.px-ramp { position: absolute; left: 10px; bottom: 10px; z-index: 1; background: rgba(255,255,255,.94); border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.2); padding: 7px 10px; font-size: 10px; }
.px-ramp > b { display: block; font-size: 11px; margin-bottom: 4px; }
.px-ramp .cols { display: flex; gap: 12px; }
.px-ramp .ttl { display: block; font-weight: 700; margin-bottom: 3px; max-width: 68px; line-height: 1.3; }
.px-ramp .scale { display: flex; gap: 5px; height: 62px; }
.px-ramp .scale i { width: 12px; border-radius: 3px; border: 1px solid #ccc; }
.px-ramp .scale span { display: flex; flex-direction: column; justify-content: space-between; }
.px-ramp .scale em { font-style: normal; font-variant-numeric: tabular-nums; }
.px-ramp .keys { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.px-ramp .keys span { display: flex; align-items: center; gap: 5px; }
.px-ramp .keys i { width: 12px; height: 9px; border-radius: 2px; border: 1px solid #b8bdc4; }
.px-ramp .keys i.none { background: #fff; border-style: dashed; }
.px-ramp .keys i.pin { width: 10px; height: 10px; margin: 0 1px; border-radius: 50%; background: #b7bec8; }
@container (max-width: 640px) {
  .px-bench, .px-ramp { position: static; width: auto; margin-top: 8px; }
  .px-map { height: 320px; }
}
.px-zones { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.px-zone { flex: 1 1 180px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--divider); border-radius: 4px; padding: 5px 9px; font-size: 11px; }
.px-zone b { font-size: 15px; margin-left: auto; font-variant-numeric: tabular-nums; }
.px-zone i { width: 12px; height: 12px; border-radius: 2px; border: 1px solid #b8bdc4; flex: none; }
.px-list { overflow: auto; border: 1px solid var(--divider); border-radius: 4px; max-height: 300px; }
.px-list table.lk-table td { white-space: normal; }

.px-placeholder { padding: 46px 20px; text-align: center; color: var(--text-3); font-size: 13px; line-height: 1.7; }
.px-foot { margin-top: 14px; border-top: 1px solid var(--divider); padding: 10px 4px; font-size: 10.5px; color: var(--text-3); display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }
.px-tour-card button { color: inherit; }

/* 5 kartu tetap sejajar sampai 900 px */
@media (max-width: 900px) {
  .px-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .px-row > .tile { grid-column: 1 / -1 !important; }
}
@media (max-width: 600px) { .px-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Tour: area isi yang di-scroll dan glosarium */
.px-tour-body::-webkit-scrollbar { width: 6px; } .px-tour-body::-webkit-scrollbar-thumb { background: #2a4675; border-radius: 3px; }
.px-tour-body { scrollbar-width: thin; scrollbar-color: #2a4675 transparent; }
.px-tour-more { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 0 2px; text-align: center; font-size: 10.5px; color: #8fc3e6; background: linear-gradient(to bottom, rgba(12,26,54,0), #0c1a36 70%); pointer-events: none; }
table.px-gloss { width: 100%; border-collapse: collapse; font-size: 11.5px; line-height: 1.45; color: #c3d3e8; }
table.px-gloss th { text-align: left; font-size: 9.5px; letter-spacing: .5px; text-transform: uppercase; color: #5dbbeb; padding: 4px 6px; border-bottom: 1px solid #1e3566; position: sticky; top: 0; background: #0c1a36; }
table.px-gloss td { padding: 5px 6px; border-bottom: 1px solid #162850; vertical-align: top; }
table.px-gloss td:first-child b { display: block; color: #fff; }
table.px-gloss td:first-child span { font-size: 10.5px; color: #8fa9c8; }
table.px-gloss code { font-family: var(--font-mono, monospace); font-size: 10.5px; color: #ecdca6; white-space: normal; word-break: break-word; }
/* layar sempit: judul dan tombol (Glosarium, Tour) boleh turun baris */
@media (max-width: 560px) { .titlebar { flex-wrap: wrap; row-gap: 4px; } .titlebar-actions { flex-wrap: wrap; } }
