/* ==========================================================================
   Blok „Wykres do historii z danych” (.viz) + wygląd sekcji „Co widać w danych”.
   Źródło (prototyp): assets/css/podstrona.css (Data stories .viz*, Responsive)
   + assets/css/podstrony/monitoring.css (.mo-tabs, .viz w wersji B).
   Sekcja to blok „Zakładki” z dodatkową klasą CSS „mo-data” (w prototypie
   .mo-sect.mo-data + .tabs.mo-tabs): tu reguły .p-monitoring .mo-tabs → .mo-data .tabs.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Wykres (podstrona.css)
   -------------------------------------------------------------------------- */

.viz { background: var(--paper-2); border-radius: var(--radius-lg); padding: clamp(1.25rem, 3vw, 2rem); }
.viz__cap { margin: 0 0 1rem; font-family: var(--font-ui); font-weight: 500; font-size: .8125rem; color: var(--muted); }
.viz__row { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .5rem 1rem; align-items: center; padding: .55rem 0; }
.viz__row + .viz__row { border-top: 1px solid var(--line); }
.viz__label { font-size: .875rem; color: var(--muted); }
.viz__label b { display: block; font-family: var(--font-ui); font-weight: 600; font-size: 1.125rem; color: var(--navy-900); font-variant-numeric: tabular-nums; }
.viz__pics { display: flex; flex-wrap: wrap; gap: 8px; }
.viz__pics svg { width: 40px; height: 26px; fill: var(--navy-900); }
.viz__pics .is-extra { fill: var(--orange-600); }
.viz__half { position: relative; display: inline-block; width: 40px; height: 26px; }
.viz__half svg { position: absolute; inset: 0; }
.viz__half .viz__ghost { fill: var(--orange-100); }
/* --used: wykorzystana część ostatniego piktogramu (pole bloku; prototyp: 45%) */
.viz__half .viz__used { fill: var(--navy-900); clip-path: inset(0 calc(100% - var(--used, 45%)) 0 0); }
.viz__key { margin: 1rem 0 0; font-size: .8125rem; color: var(--muted); }
.viz__load { position: relative; height: 16px; border-radius: 2px; background: #fff; box-shadow: inset 0 0 0 1px var(--line-strong); }
.viz__load i { position: absolute; inset: 3px auto 3px 3px; width: var(--v); max-width: calc(100% - 6px); background: var(--navy-900); border-radius: 2px; }
.viz__load--over i { max-width: none; width: calc(100% - 6px); }
.viz__load--over::after { content: ""; position: absolute; top: 3px; bottom: 3px; left: 100%; width: var(--over, 30%); margin-left: 4px; border-radius: 2px; background: repeating-linear-gradient(135deg, var(--orange-600) 0 2px, transparent 2px 5px); }
.viz__load-wrap { padding-right: 30%; }
.viz__odo { display: grid; gap: .9rem; }
.viz__odo-num { margin: 0; font-weight: 300; font-size: clamp(2.5rem, 1.9rem + 2vw, 3.25rem); line-height: 1; letter-spacing: -.035em; color: var(--navy-900); font-variant-numeric: tabular-nums; }
.viz__odo-num small { font-size: 1rem; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-left: .35rem; }
.viz__scale { position: relative; height: 16px; border-radius: 2px; background: #fff; box-shadow: inset 0 0 0 1px var(--line-strong); }
/* --fill i --zone z pól bloku (prototyp: 82% i 75%) */
.viz__scale i { position: absolute; inset: 3px auto 3px 3px; width: calc(var(--fill, 82%) - 3px); border-radius: 2px; background: var(--navy-900); }
.viz__scale em { position: absolute; top: 3px; bottom: 3px; left: var(--zone, 75%); right: 3px; border-radius: 0 2px 2px 0; background: repeating-linear-gradient(135deg, var(--orange-600) 0 2px, transparent 2px 5px); opacity: .55; }
.viz__ticks { display: flex; justify-content: space-between; font-family: var(--font-ui); font-size: .75rem; color: var(--muted); }
.viz__ticks .is-hl { color: var(--navy-900); font-weight: 600; }

/* --------------------------------------------------------------------------
   Sekcja „Co widać w danych” (blok Zakładki z klasą mo-data): nagłówek jak
   .mo-head, wiersze jak w eksploratorze pytań, wykres na białej karcie
   -------------------------------------------------------------------------- */

.zakladki.mo-data { --mo-y: clamp(3.75rem, 7vw, 6.5rem); padding: var(--mo-y) 0; border-top: 0; }
/* the head in two columns: prefix on its own row, title left, lead right (.mo-head) */
.zakladki.mo-data .shead { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 1.25rem clamp(2rem, 6vw, 6rem); margin-bottom: clamp(2rem, 4vw, 3rem); }
.zakladki.mo-data .shead h2 { max-width: 21ch; }
.zakladki.mo-data .shead > p:not(.eyebrow) { padding-top: .4rem; max-width: 56ch; }
/* licznik „01 / 04” nie występuje w tym wyglądzie */
.mo-data .os-count { display: none !important; }

.mo-data .tabs .tabs__h,
.mo-data .tabs .tabs__item:first-child .tabs__h { border: 0; }
.mo-data .tabs .tabs__tab {
  gap: .9rem; padding: .8rem .9rem .8rem .75rem; border-radius: 18px;
  font-weight: 600; font-size: 1.0625rem; line-height: 1.3; letter-spacing: -.01em; color: var(--navy-900);
  transition: background-color .25s, box-shadow .4s var(--ease);
}
.mo-data .tabs .tabs__tab:hover { background: var(--paper-2); }
.mo-data .tabs .tabs__icon { width: 44px; height: 44px; border-radius: 14px; }
.mo-data .tabs .tabs__icon .icon { width: 1.25rem; height: 1.25rem; }
.mo-data .tabs .tabs__ring { width: 32px; height: 32px; border: 0; color: var(--navy); }
.mo-data .tabs .tabs__item.is-open .tabs__tab { background: #fff; box-shadow: inset 0 0 0 1px var(--line), var(--shadow-float); }
.mo-data .tabs .tabs__item.is-open .tabs__label { transform: none; }
.mo-data .tabs .tabs__item.is-open .tabs__icon { background: var(--orange); color: #fff; box-shadow: 0 8px 18px -8px rgba(236, 110, 40, .9); }
.mo-data .tabs .tabs__item.is-open .tabs__ring { background: var(--navy-900); color: #fff; transform: none; }
.mo-data .tabs .tabs__copy p {
  margin: 0; max-width: 34ch; color: var(--navy-900);
  font-size: clamp(1.1875rem, 1rem + .6vw, 1.5rem); font-weight: 600; line-height: 1.3; letter-spacing: -.02em; text-wrap: pretty;
}
.mo-data .tabs .viz { border-radius: 18px; padding: clamp(1.1rem, 2.4vw, 1.6rem); box-shadow: inset 0 0 0 1px var(--line); }
.mo-data .tabs .viz__cap { font-size: .875rem; color: var(--navy-900); }
.mo-data .tabs .viz__key { font-size: .875rem; line-height: 1.45; }
.mo-data .tabs .viz__pics { gap: 10px; }
.mo-data .tabs .viz__pics svg,
.mo-data .tabs .viz__half { width: 48px; height: 31px; }
.mo-data .tabs .viz__label { font-size: .9375rem; }
.mo-data .tabs .viz__label b { font-size: 1.375rem; }
.mo-data .tabs .viz__row { grid-template-columns: 8.5rem minmax(0, 1fr); padding: .55rem 0; }
.mo-data .tabs .viz__load, .mo-data .tabs .viz__scale { height: 22px; }
.mo-data .tabs .viz__odo-num { font-size: clamp(2.75rem, 2rem + 2.4vw, 3.75rem); }
.mo-data .tabs .viz__ticks { font-size: .8125rem; }

@media (min-width: 901px) {
  .mo-data .tabs { column-gap: clamp(1.25rem, 3vw, 2.5rem); row-gap: 6px; }
  .mo-data .tabs .tabs__panel { align-self: stretch; }
  /* the open finding: one white sheet in a thin frame, a quiet orange light in its corner */
  .mo-data .tabs .tabs__inner {
    height: 100%; display: flex; flex-direction: column; gap: 1.5rem;
    padding: clamp(1.5rem, 3vw, 2.5rem); border-radius: var(--radius-xl);
    background: radial-gradient(55% 50% at 100% 0%, rgba(248, 120, 49, .07), rgba(248, 120, 49, 0) 70%), #fff;
    box-shadow: inset 0 0 0 1px var(--line-strong);
  }
  .mo-data .tabs .tabs__inner > * + * { margin-top: 0; }
  .mo-data .tabs .viz { margin-top: auto; }
}

/* with reduced motion the open finding is simply there: no fade, no rise */
@media (prefers-reduced-motion: reduce) {
  .mo-data .tabs .tabs__panel,
  .mo-data .tabs .tabs__item.is-open .tabs__panel { transition: none; transform: none; }
}

@media (max-width: 900px) {
  .zakladki.mo-data .shead { grid-template-columns: minmax(0, 1fr); }
  .zakladki.mo-data .shead > p:not(.eyebrow) { padding-top: 0; }
}

@media (max-width: 767px) {
  .viz__row { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  .mo-data .tabs .viz__pics svg,
  .mo-data .tabs .viz__half { width: 36px; height: 23px; }
  .mo-data .tabs .viz__pics { gap: 7px; }
  .mo-data .tabs .viz__row { grid-template-columns: minmax(0, 1fr); }
}
