/* Mapolitic 19.7 — PC adjustable inspector; concise demographic indices; charts full screen. */
:root{--mp197-panel-width:660px}
/* The demographic indicator already has a dated value and a chart headline. Keep only the latter. */
html[data-mapolitic-layer="population"] .v12-metric-panel > :is(.v12-eyebrow,h2,.v12-big-number,p,.v12-callout,.v12-muted,.v12-source),
html[data-mapolitic-layer="populationGrowth"] .v12-metric-panel > :is(.v12-eyebrow,h2,.v12-big-number,p,.v12-callout,.v12-muted,.v12-source){display:none!important}
html[data-mapolitic-layer="population"] .v12-metric-panel > a.v12-source,
html[data-mapolitic-layer="populationGrowth"] .v12-metric-panel > a.v12-source{display:none!important}
html[data-mapolitic-layer="population"] .v12-metric-panel,html[data-mapolitic-layer="populationGrowth"] .v12-metric-panel{padding-top:4px!important}
/* Chart fullscreen: keep the interactive country search and date selectors mounted within React. */
.mp197-chart-actions{display:flex;align-items:center;gap:12px}
.mp197-chart-toggle{border:1px solid var(--border,#d2e3e6);border-radius:8px;min-height:36px;padding:7px 11px;background:var(--panel-soft,#eef5f5);color:var(--foreground,#21414c);font:700 12px/1.2 system-ui,sans-serif;cursor:pointer}
.mp197-chart-toggle:hover{background:var(--panel,#e0eae9)}
.mp197-chart-toggle:focus-visible{outline:3px solid #48a48f;outline-offset:2px}
.territory-sheet:has(.mp197-full-chart),.territory-sheet.metric-sheet:has(.mp197-full-chart),.territory-sheet.inter-index-sheet:has(.mp197-full-chart){position:fixed!important;inset:0!important;top:0!important;right:0!important;bottom:0!important;left:0!important;width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;z-index:2147481000!important;border-radius:0!important;overflow:visible!important}
.territory-sheet:has(.mp197-full-chart)>.territory-header{display:none!important}
.territory-sheet:has(.mp197-full-chart)>.territory-body{height:100dvh!important;max-height:100dvh!important;overflow:visible!important;display:block!important;padding:0!important}
.metric-history.mp197-full-chart{position:fixed!important;inset:0!important;z-index:2147481100!important;display:flex!important;flex-direction:column!important;gap:12px!important;width:100vw!important;height:100dvh!important;min-width:0!important;max-width:100vw!important;max-height:100dvh!important;box-sizing:border-box!important;overflow-y:auto!important;overscroll-behavior:contain!important;padding:clamp(12px,2vw,26px) clamp(14px,4vw,58px) calc(15px + env(safe-area-inset-bottom))!important;margin:0!important;border-radius:0!important;background:var(--panel-surface,#fff)!important;color:var(--foreground,#1b3b46)!important}
.metric-history.mp197-full-chart>.metric-history-heading{order:0!important;flex:0 0 auto!important;margin:0!important;gap:12px}
.metric-history.mp197-full-chart>.metric-history-heading .eyebrow{font-size:clamp(13px,1.5vw,20px)!important;font-weight:800;letter-spacing:0!important}
.metric-history.mp197-full-chart>.comparison-search{order:1!important;flex:0 0 auto!important;min-height:52px!important;margin:0!important;position:relative!important;z-index:8}
.metric-history.mp197-full-chart>.comparison-search input{font-size:16px!important;min-height:50px!important}
.metric-history.mp197-full-chart>.comparison-chips{order:2!important;flex:0 0 auto!important;margin:0!important}
.metric-history.mp197-full-chart>.chart-toolbar{order:3!important;flex:0 0 auto!important;margin:0!important}
.metric-history.mp197-full-chart>.history-chart{order:4!important;flex:1 1 auto!important;min-height:280px!important;height:calc(100dvh - 225px)!important;max-height:none!important;overflow:visible!important;margin:0!important}
.metric-history.mp197-full-chart>.metric-headline,.metric-history.mp197-full-chart>.metric-unit,.metric-history.mp197-full-chart>.chart-data,.metric-history.mp197-full-chart>.chart-sources,.metric-history.mp197-full-chart>.fact-note,.metric-history.mp197-full-chart>.political-history-key,.metric-history.mp197-full-chart>.axis-key{display:none!important}
.metric-history.mp197-full-chart>.inter-index-button,.metric-history.mp197-full-chart>.index-controls{order:2!important;flex:0 0 auto!important}
.metric-history.mp197-full-chart .country-search-results{z-index:60!important;max-height:35vh;overflow:auto}
/* Desktop only: 440 -> 660, metric 520 -> 780 by default, then resize using the left-edge grip. */
@media(min-width:1024px){
  .territory-sheet:not(:has(.mp197-full-chart)),.territory-sheet.metric-sheet:not(:has(.mp197-full-chart)),.territory-sheet.inter-index-sheet:not(:has(.mp197-full-chart)),.territory-sheet.v16-party-expanded:not(:has(.mp197-full-chart)){
    width:min(var(--mp197-panel-width),calc(100vw - 315px))!important;
    max-width:none!important;
  }
  .country-open .atlas-layout,.country-open.metric-mode .atlas-layout,.country-open.inter-index-active .atlas-layout,.country-open.party-open .atlas-layout{
    padding-right:min(var(--mp197-panel-width),calc(100vw - 315px))!important;
  }
  .territory-sheet .territory-header h2{font-size:clamp(25px,2.05vw,36px)!important;line-height:1.2!important}
  .territory-sheet .territory-header .eyebrow{font-size:11px!important}
  .territory-sheet .territory-meta,.territory-sheet .territory-tabs button{font-size:13.5px!important}
  .territory-sheet .metric-history .metric-headline strong{font-size:clamp(44px,3.5vw,57px)!important}
  .territory-sheet .metric-history .metric-unit,.territory-sheet .metric-history .metric-history-heading{font-size:13px!important}
  .territory-sheet .chart-toolbar,.territory-sheet .chart-toolbar label,.territory-sheet .comparison-chips{font-size:13px!important}
  .territory-sheet .v14-seat-legend .v12-seat-group,.territory-sheet .party-family{font-size:12.5px!important}
  .territory-sheet .v14-section h3,.territory-sheet .v14-assembly h3,.territory-sheet .parliament-layout h3{font-size:17px!important}
  .territory-sheet .territory-body{font-size:14px!important}
  .mp197-panel-resizer{position:absolute;z-index:21474800;top:12%;bottom:12%;left:-8px;width:17px;border:0;background:transparent;cursor:ew-resize;touch-action:none;padding:0;display:flex;align-items:center;justify-content:center}
  .mp197-panel-resizer::before{content:"";height:72px;width:5px;border-radius:8px;background:var(--atlas-line,#7b999f);box-shadow:0 0 0 5px var(--panel,#ffffffbb);transition:background .15s}
  .mp197-panel-resizer:hover::before,.mp197-panel-resizer:focus-visible::before{background:#16786b}
  .mp197-panel-resizer:focus-visible{outline:2px solid #16786b;outline-offset:3px}
  body.mp197-is-resizing,body.mp197-is-resizing *{cursor:ew-resize!important;user-select:none!important}
  .territory-sheet:has(.mp197-full-chart) .mp197-panel-resizer{display:none!important}
  .country-open:has(.mp197-full-chart) .atlas-layout{padding-right:0!important}
}
@media(max-width:1023px){.mp197-panel-resizer{display:none!important}}
@media(max-width:700px){.metric-history.mp197-full-chart>.history-chart{min-height:250px!important;height:calc(100dvh - 240px)!important}.metric-history.mp197-full-chart>.chart-toolbar{gap:8px!important}.mp197-chart-actions{gap:6px}.mp197-chart-toggle{padding:7px 9px;font-size:12px}}

html[data-mapolitic-layer="population"] .metric-history>.metric-unit,html[data-mapolitic-layer="populationGrowth"] .metric-history>.metric-unit{display:none!important}
