.graph-card{margin:14px 0;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);min-width:0}
.graph-card figcaption{font-weight:650;margin-bottom:8px}
.graph-canvas{display:block;width:100%;height:250px;background:var(--surface);color:var(--fg);border-radius:8px;touch-action:pan-y}
.graph-details{font-size:12px!important;color:var(--fg-2);line-height:1.5;overflow-wrap:anywhere;word-break:normal;margin:6px 0!important}
.graph-legend{display:flex;flex-wrap:wrap;gap:8px;font-size:12px}
.graph-legend span{border-left:10px solid;padding-left:5px}
.graph-card button,.graph-controls button{min-width:64px;min-height:44px;border:1px solid var(--line);border-radius:8px;background:var(--tint);color:var(--fg);font:inherit;padding:6px 12px;cursor:pointer}
.graph-dialog{position:fixed;inset:0;margin:auto;width:min(94vw,1100px);max-height:94dvh;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--fg);overflow:auto;overscroll-behavior:contain}
.graph-dialog::backdrop{background:rgba(0,0,0,.45)}
.graph-dialog h2{font-size:18px;margin:0 0 8px}
.graph-dialog .graph-canvas{height:clamp(160px,55dvh,650px);touch-action:none}
.graph-canvas:focus-visible{outline:2px solid var(--accent)}
.graph-controls{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
