/* Styles for the chart itself. Used by the editor preview AND the public viewer. */
.dp-chart {
  --dp-text: #1d1d1d;
  --dp-muted: #6b6b6b;
  --dp-bg: #ffffff;
  --dp-line: #e6e6e6;
  font-family: Roboto, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--dp-text);
  background: var(--dp-bg);
  padding: 16px;
  box-sizing: border-box;
  line-height: 1.35;
}
.dp-chart.dp-dark { --dp-text: #f1f1f1; --dp-muted: #b4b4b4; --dp-bg: #1e1f22; --dp-line: #3a3b3f; }
.dp-chart svg { color: var(--dp-text); }
.dp-title { font-size: 20px; font-weight: 700; margin: 0 0 6px; }
.dp-desc { font-size: 14px; color: var(--dp-text); margin: 0 0 10px; }
.dp-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; margin: 4px 0 10px; }
.dp-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.dp-legend-item i { width: 12px; height: 12px; display: inline-block; border-radius: 2px; }
.dp-body { width: 100%; overflow: hidden; }
.dp-panels { display: grid; }
.dp-panel-title { font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.dp-pie-wrap { display: flex; justify-content: center; }
.dp-notes { font-size: 11.5px; color: var(--dp-muted); font-style: italic; margin: 10px 0 0; }
.dp-footer { font-size: 11px; color: var(--dp-muted); margin-top: 8px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.dp-footer-left { flex: 1; }
.dp-logo { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1; white-space: nowrap; }
.dp-logo b { color: #1d4f9c; font-size: 15px; font-weight: 800; letter-spacing: -0.3px; }
.dp-logo small { color: #d32f2f; font-size: 7.5px; font-weight: 700; letter-spacing: 2.2px; margin-top: 1px; }
.dp-dark .dp-logo b { color: #8fb5f0; }
.dp-logo-img { max-height: 30px; max-width: 140px; object-fit: contain; }
.dp-footer a { color: #1d81a2; text-decoration: none; }
.dp-dark .dp-footer a { color: #6cc4e6; }
.dp-footer a:hover { text-decoration: underline; }
.dp-empty { padding: 40px 10px; text-align: center; color: var(--dp-muted); border: 1px dashed var(--dp-line); border-radius: 6px; font-size: 14px; }
.dp-table-wrap { overflow-x: auto; }
.dp-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.dp-table th { text-align: left; border-bottom: 2px solid var(--dp-text); padding: 6px 8px; cursor: pointer; user-select: none; white-space: nowrap; }
.dp-table td { border-bottom: 1px solid var(--dp-line); padding: 6px 8px; }
.dp-table .num { text-align: right; position: relative; min-width: 80px; }
.dp-cellbar { position: absolute; left: 4px; top: 6px; bottom: 6px; opacity: 0.25; border-radius: 2px; max-width: calc(100% - 8px); }
.dp-cellval { position: relative; }

/* Hover tooltips */
.dp-body { position: relative; }
.dp-chart svg text { pointer-events: none; }
.dp-tip { position: absolute; display: none; z-index: 20; pointer-events: none; background: #fff; color: #1d1d1d; border: 1px solid #d6d6d6; border-radius: 4px; box-shadow: 0 3px 12px rgba(0,0,0,.14); padding: 7px 10px; font-size: 12px; min-width: 120px; max-width: 280px; }
.dp-tip-head { font-weight: 700; margin-bottom: 4px; }
.dp-tip-row { display: flex; align-items: center; gap: 6px; line-height: 1.5; }
.dp-tip-row i { width: 10px; height: 10px; border-radius: 2px; flex: 0 0 auto; }
.dp-tip-row span { flex: 1; color: #555; }
.dp-tip-row b { font-weight: 700; }
.dp-tip-row.b span { color: #1d1d1d; font-weight: 700; }
.dp-hovering [data-dp] { transition: opacity .08s; }
.dp-hovering rect[data-dp]:not(.dp-on), .dp-hovering path[data-dp]:not(.dp-on) { opacity: .35; }
.dp-ghost circle.dp-on { fill-opacity: 1; stroke: #fff; stroke-width: 1.5px; }
.dp-linklabel { position: absolute; transform: translate(-50%, -100%); margin-top: -3px; font-size: 10.5px; color: var(--dp-text); background: rgba(255,255,255,.85); padding: 0 2px; border-radius: 2px; pointer-events: none; white-space: nowrap; z-index: 15; }
.dp-dark .dp-linklabel { background: rgba(30,31,34,.85); }
.dp-linklabel.b { font-weight: 700; }
.dp-hovering[data-linked="1"] g[aria-label="text"] { opacity: .12; }

/* Maps */
.dp-map figure { margin: 0; }
.dp-map svg[class*="-ramp"], .dp-map div[class*="-swatches"] { margin-bottom: 6px; }
.dp-map-legend { font-size: 11px; margin-bottom: 4px; }
.dp-map-legend-title { font-weight: 700; margin-bottom: 2px; }
.dp-body[data-map="1"].dp-hovering path[data-dp]:not(.dp-on) { opacity: 1; }
.dp-body[data-map="1"] path.dp-on { stroke: #1d1d1d; stroke-width: 1.5px; }
.dp-body[data-map="1"].dp-hovering circle[data-dp]:not(.dp-on) { opacity: .5; }
.dp-map-nodata { font-size: 11px; color: var(--dp-muted); display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.dp-map-nodata i { width: 12px; height: 12px; background: #cfcfcf; border-radius: 2px; display: inline-block; }

/* Text annotations */
.dp-anno { position: absolute; z-index: 10; font-size: 12.5px; line-height: 1.3; max-width: 45%; white-space: pre-line; pointer-events: none; color: var(--dp-text); }
.dp-anno-s { font-size: 11px; } .dp-anno-l { font-size: 15px; } .dp-anno-xl { font-size: 19px; line-height: 1.2; }
.dp-anno.b { font-weight: 700; } .dp-anno.i { font-style: italic; }
.dp-anno.bg-halo { text-shadow: 0 0 3px var(--dp-bg), 0 0 3px var(--dp-bg), 0 0 3px var(--dp-bg); }
.dp-anno.bg-box { background: var(--dp-bg); opacity: .96; padding: 3px 7px; border-left: 3px solid currentColor; border-radius: 0; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.dp-anno.bg-white { background: var(--dp-bg); padding: 3px 7px; border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.10); }
.dp-anno.bg-tint { background: color-mix(in srgb, currentColor 12%, var(--dp-bg)); padding: 3px 7px; border-radius: 4px; }
.dp-anno.bg-none { }
.dp-anno-arrows { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; z-index: 9; }
.dp-anno-edit .dp-anno { pointer-events: auto; cursor: move; outline: 1px dashed rgba(0,74,173,.45); outline-offset: 2px; user-select: none; touch-action: none; }
.dp-anno-handle.pinned { background: #ce360e; border-color: #fff; box-shadow: 0 0 0 2px #ce360e, 0 1px 4px rgba(0,0,0,.25); }
.dp-anno-edit .dp-anno.sel { outline: 2px solid #004aad; }
.dp-anno-edit .dp-anno.dragging { outline: 2px solid #004aad; opacity: .9; }
.dp-anno-edit .dp-anno.editing { cursor: text; user-select: text; outline: 2px solid #ce360e; background: var(--dp-bg); }
.dp-anno-handle { position: absolute; z-index: 12; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; border: 2.5px solid #ce360e; cursor: crosshair; box-shadow: 0 1px 4px rgba(0,0,0,.25); touch-action: none; }
.dp-share { display: inline-flex; gap: 4px; margin-left: auto; margin-right: 10px; }
.dp-share a { width: 22px; height: 22px; border-radius: 50%; background: #eef1f5; color: #3b4452; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; text-decoration: none !important; }
.dp-share a:hover { background: #004aad; color: #fff; }
.dp-embedbox { margin-top: 8px; font-size: 11.5px; color: var(--dp-muted); }
.dp-embedbox textarea { width: 100%; box-sizing: border-box; font-family: Consolas, monospace; font-size: 11px; margin-top: 4px; }

/* election seats */
.dp-parl { text-align: center; }
.dp-seat-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-top: 8px; font-size: 13px; }
.dp-seat-list span { display: inline-flex; align-items: center; gap: 5px; }
.dp-seat-list i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
