/* Terhelés (control-terheles.js). Uses the page's own tokens (--card, --text, --soft, --line, --accent), so it
   follows the page in light and dark. Series colors are mid-tones that keep 3:1 on both a white and a dark card.
   Status words are in the text color; the level shows in the shape and the border as well. */
.tl{display:flex;flex-direction:column;gap:var(--s4);min-width:0}
.tl-content{display:flex;flex-direction:column;gap:var(--s4);min-width:0}
.tl-loader{display:flex;flex-direction:column;gap:var(--s3)}
.tl-banner{background:var(--card);border-left:4px solid #B8720A;border-radius:var(--radius-small);padding:var(--s3) var(--s4);font-weight:700;box-shadow:var(--shadow)}
.tl-bar{display:flex;flex-wrap:wrap;align-items:center;gap:var(--s2) var(--s4)}
.tl-stamp,.tl-problem{color:var(--soft);font-size:.9rem}
.tl-problem{font-weight:700;color:var(--text)}
.tl-stamp{margin-left:auto}

.tl-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,170px),1fr));gap:var(--s3)}
.tl-tile{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);padding:var(--s3) var(--s4);border-top:5px solid var(--level-unknown);min-width:0}
.tl-tile[data-level="ok"]{border-top-color:var(--level-ok)}
.tl-tile[data-level="warn"]{border-top-color:#B8720A}
.tl-tile[data-level="bad"]{border-top-color:#D6402B}
.tl-tile-title{font-family:'Fredoka','Nunito',system-ui,sans-serif;font-size:.95rem;font-weight:600;margin:0 0 var(--s1);color:var(--soft)}
.tl-tile-value{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 var(--s1);color:var(--text)}
.tl-tile-value strong{font-size:1.7rem;line-height:1.15;font-weight:800;font-variant-numeric:tabular-nums}
.tl-tile-unit{font-size:.85rem;color:var(--soft);font-weight:700}
.tl-tile-level{display:flex;align-items:center;gap:var(--s1);font-weight:800;font-size:.88rem;color:var(--text);margin-top:var(--s1)}
.tl-mark{font-size:.8rem;line-height:1}
.tl-tile[data-level="ok"] .tl-mark{color:var(--level-ok)}
.tl-tile[data-level="warn"] .tl-mark{color:#B8720A}
.tl-tile[data-level="bad"] .tl-mark{color:#D6402B}
.tl-tile[data-level="unknown"] .tl-mark{color:var(--level-unknown)}
.tl-tile-sub{margin-top:var(--s1);font-size:.82rem;color:var(--soft);overflow-wrap:anywhere}

.tl-charts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s4)}
.tl-chart{margin:0;background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);padding:var(--s4);min-width:0}
.tl-chart-head{display:flex;flex-direction:column;gap:var(--s2);margin-bottom:var(--s2)}
.tl-chart-head h3{font-family:'Fredoka','Nunito',system-ui,sans-serif;font-size:1.05rem;font-weight:600;margin:0}
.tl-legend{display:flex;flex-wrap:wrap;gap:var(--s1) var(--s4);font-size:.82rem;color:var(--soft)}
.tl-legend li,.tl-tip li{display:flex;align-items:center;gap:var(--s2)}
.tl-swatch{flex:none;width:16px;height:0;border-top:4px solid var(--c);border-radius:2px}
.tl-swatch--dash{border-top-style:dashed;border-top-width:3px}
.tl-plot{position:relative;min-width:0}
.tl-svg{display:block;width:100%;height:auto;overflow:visible;touch-action:pan-y;border-radius:var(--radius-small)}
.tl-grid{stroke:var(--line);stroke-width:1}
.tl-tick{stroke:var(--soft);stroke-width:1}
.tl-axis{fill:var(--soft);font-size:11px;font-family:inherit;font-variant-numeric:tabular-nums}
.tl-cursor{stroke:var(--soft);stroke-width:1;stroke-dasharray:3 3}
.tl-tip{position:absolute;z-index:2;pointer-events:none;background:var(--card);color:var(--text);border:1px solid var(--line);border-radius:var(--radius-small);box-shadow:var(--shadow);padding:var(--s2) var(--s3);font-size:.82rem;min-width:150px;max-width:100%}
.tl-tip-time{font-weight:800;margin-bottom:var(--s1)}
.tl-tip li{justify-content:flex-start}
.tl-tip-label{flex:1;color:var(--soft)}
.tl-tip strong{font-variant-numeric:tabular-nums}
.tl-tip-note{margin-top:var(--s1);color:var(--soft);font-size:.74rem}

@media (max-width:900px){
  .tl-charts{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:480px){
  .tl-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tl-chart{padding:var(--s3)}
  .tl-stamp{margin-left:0;width:100%}
}
