* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #ffffff; }

.embed-wrap {
  --tlo: #f3f1ea;
  --tekst: #1a1a1a;
  --szary: #8a877f;
  --jasny: #b5b1a6;
  --siatka: #dcd8cd;
  width: 100%;
  height: var(--h);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: var(--tlo);
  color: var(--tekst);
  padding: 22px 24px 14px;
  font-family: "Fira Sans", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

h1 {
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 1.15;
  text-align: center;
  text-wrap: balance;
  margin: 0;
}
.wyroznik { background: #e3243b; color: #fff; padding: 0 6px; }
.wyroznik.d { background: #2f78cf; }
.podtytul { text-align: center; text-wrap: balance; color: var(--szary); font-size: 16px; line-height: 1.3; margin: 8px 0 0; }

.legenda { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 16px; margin-top: 12px; font-size: 16px; }
.legenda span::before {
  content: ""; display: inline-block; width: 13px; height: 13px; border-radius: 50%;
  background: var(--k); margin-right: 5px; vertical-align: -1px;
}

.skala-wrap { display: flex; flex-direction: column; align-items: center; gap: 5px; margin-top: 10px; font-size: 12px; }
.skala { display: flex; align-items: center; gap: 7px; font-weight: 700; }
.skala .d { color: #2f78cf; }
.skala .r { color: #d6283c; }
.skala-pola { display: flex; width: 210px; }
.skala-pola i { flex: 1; height: 7px; }
.skala-dodatek { display: flex; align-items: center; gap: 5px; color: var(--szary); }
.skala-dodatek i { display: block; width: 18px; height: 9px; }
.skala-dodatek i.kolko { width: 11px; height: 11px; border-radius: 50%; border: 1px solid #cfcbbf; }

.przelacznik { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
.przelacznik button {
  font: 700 13px "Fira Sans", system-ui, sans-serif; border: 0; padding: 6px 10px;
  background: #e6e3da; color: #aaa69c; cursor: pointer; user-select: none; -webkit-user-select: none;
}
.przelacznik button.aktywny { background: var(--tekst); color: #fff; }

.wykres { flex: 1; position: relative; min-height: 0; margin-top: 12px; }
.wykres > svg { position: absolute; inset: 0; display: block; }

footer { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: 8px; }
.zrodlo { font-size: 13px; color: var(--jasny); text-wrap: balance; }
.logo { height: 26px; display: block; flex-shrink: 0; }

svg text { font-family: "Fira Sans", system-ui, sans-serif; }
.os { fill: #a8a49a; font-size: 12px; }
.os-x { fill: #8f8b82; font-size: 12px; font-weight: 500; }
.siatka { stroke: var(--siatka); stroke-width: 1; }

.dymek {
  position: absolute; z-index: 5; display: none; pointer-events: none; white-space: nowrap;
  background: #fff; border-radius: 4px; box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
  padding: 7px 10px; font-size: 13px; line-height: 1.4;
}
.dymek b { font-weight: 700; }

@media (max-width: 640px) {
  .embed-wrap { height: var(--hm); padding: 16px 14px 10px; }
  h1 { font-size: 22px; }
  .podtytul { font-size: 14px; margin-top: 6px; }
  .legenda { font-size: 14px; gap: 2px 12px; margin-top: 10px; }
  .skala { font-size: 11px; gap: 5px; }
  .skala-pola { width: 140px; }
  .skala-pola i { height: 6px; }
  .skala-dodatek { font-size: 11px; }
  .zrodlo { font-size: 11px; }
  .logo { height: 20px; }
}
