/* Grafice (grafice.js). Independent de panou: culoarea vine din `--c` mostenit (clasele
   `wr-f-*` din war.css), textul din tokenii displayului negru, cu valori de rezerva ca sa
   mearga si pe o gazda care nu-i defineste. */
.gr { color: var(--dispink, #EDEEEA); --gr-c: var(--c, #43C7D6); }
.gr-cap { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap;
          gap: var(--p2, 8px) var(--p3, 12px); margin-bottom: var(--p2, 8px); }
.gr-sumar { display: grid; gap: 2px; min-width: 0; }
.gr-cifra { font-family: var(--mono, monospace); font-size: 28px; line-height: 1; font-weight: 600;
            letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--gr-c); }
.gr-sub { font-family: var(--mono, monospace); font-size: 11px; letter-spacing: .12em;
          text-transform: uppercase; color: var(--dispink2, #9AA0A2); }
.gr-comut { display: inline-flex; border: 1px solid var(--disprule, #25282C);
            border-radius: var(--r0, 4px); overflow: hidden; }
.gr-mod { appearance: none; margin: 0; border: 0; background: transparent; cursor: pointer;
          color: var(--dispink2, #9AA0A2); font-family: var(--mono, monospace); font-size: 11px;
          letter-spacing: .1em; text-transform: uppercase; padding: 0 12px; min-height: 32px;
          box-shadow: none; border-radius: 0; }
.gr-mod + .gr-mod { border-left: 1px solid var(--disprule, #25282C); }
.gr-mod:hover { color: var(--dispink, #EDEEEA); background: rgba(255, 255, 255, .04); }
.gr-mod[aria-pressed="true"] { color: var(--dispink, #EDEEEA); background: rgba(255, 255, 255, .09);
                               box-shadow: inset 0 -2px 0 var(--gr-c); }
.gr-mod:focus-visible, .gr-svg:focus-visible { outline: 2px solid var(--gr-c); outline-offset: 2px; }

.gr-ctrl { display: flex; align-items: flex-end; flex-wrap: wrap; gap: var(--p2, 8px); min-width: 0; }
.gr-ctrl [hidden] { display: none; }
.gr-sel { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.gr-sel-et { font-family: var(--mono, monospace); font-size: 10px; letter-spacing: .12em;
             text-transform: uppercase; color: var(--dispink2, #9AA0A2); }
.gr-select { appearance: none; -webkit-appearance: none; margin: 0; max-width: 180px; min-height: 32px;
             padding: 0 26px 0 10px; color: var(--dispink, #EDEEEA); background-color: transparent;
             background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                               linear-gradient(135deg, currentColor 50%, transparent 50%);
             background-position: calc(100% - 14px) 14px, calc(100% - 9px) 14px;
             background-size: 5px 5px; background-repeat: no-repeat;
             border: 1px solid var(--disprule, #25282C); border-radius: var(--r0, 4px);
             font-family: var(--mono, monospace); font-size: 11px; letter-spacing: .06em;
             text-overflow: ellipsis; cursor: pointer; box-shadow: none; }
.gr-select:hover { background-color: rgba(255, 255, 255, .04); }
.gr-select:focus-visible { outline: 2px solid var(--gr-c); outline-offset: 2px; }
.gr-select option { color: #0B0C0D; background: #EDEEEA; }
.gr-nuse { stroke: var(--dispink2, #9AA0A2); stroke-width: 2; stroke-dasharray: 2 2; opacity: .8; }
.gr-pct { opacity: .85; }
@media (max-width: 520px) {
  .gr-ctrl { width: 100%; }
  .gr-sel { flex: 1 1 100%; }
  .gr-sel-et { min-width: 3.2em; }
  .gr-select { flex: 1; }
  .gr-select { width: 100%; max-width: none; }
}

.gr-poz { position: relative; }
.gr-zona { width: 100%; min-height: 120px; }
.gr-svg { display: block; width: 100%; max-width: 100%; touch-action: pan-y; overflow: visible;
          -webkit-tap-highlight-color: transparent; }
.gr-grila { stroke: var(--disprule, #25282C); stroke-width: 1; stroke-dasharray: 2 4; }
.gr-axa { font-family: var(--mono, monospace); font-size: 10px; fill: var(--dispink2, #9AA0A2); }
.gr-s1 { stop-color: var(--gr-c); stop-opacity: .55; }
.gr-s2 { stop-color: var(--gr-c); stop-opacity: 0; }
.gr-linie { stroke: var(--gr-c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round;
            filter: drop-shadow(0 0 4px var(--gr-c)); vector-effect: non-scaling-stroke; }
.gr-punct { fill: var(--disp, #0B0C0D); stroke: var(--gr-c); stroke-width: 1.5; }
.gr-capat { fill: var(--gr-c); }
.gr-bara { fill: var(--gr-c); opacity: .85; }
.gr-bara-ales { opacity: 1; filter: drop-shadow(0 0 5px var(--gr-c)); }
.gr-ghid { stroke: var(--dispink2, #9AA0A2); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.gr-bila { fill: var(--disp, #0B0C0D); stroke: var(--gr-c); stroke-width: 2; pointer-events: none; }
.gr-prins { cursor: crosshair; }

.gr-tip { position: absolute; z-index: 2; pointer-events: none; display: grid; gap: 1px;
          padding: 6px 10px; background: var(--dispink, #EDEEEA); color: var(--disp, #0B0C0D);
          border-radius: var(--r0, 4px); font-family: var(--mono, monospace); white-space: nowrap;
          box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.gr-tip[hidden] { display: none; }
.gr-tip b { font-size: 14px; font-variant-numeric: tabular-nums; }
.gr-tip span { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }

.gr-gol { margin: 0; padding: var(--p3, 12px) 0; font-family: var(--mono, monospace); font-size: 12px;
          line-height: 1.5; color: var(--dispink2, #9AA0A2); }

@media (prefers-reduced-motion: no-preference) {
  .gr-anim .gr-arie { animation: gr-aratare 700ms ease-out both; }
  .gr-anim .gr-linie { animation: gr-aratare 500ms ease-out both; }
  .gr-anim .gr-bara { transform-box: fill-box; transform-origin: bottom; animation: gr-bara-in 520ms ease-out both; }
}
@keyframes gr-aratare { from { opacity: 0; } to { opacity: 1; } }
@keyframes gr-bara-in { from { transform: scaleY(0); } to { transform: scaleY(1); } }
