/* Eudicles · Gràfiques qualitatives. Estils encapsulats, sense dependències. */
.eud-graph-viewer { margin: 1rem 0; padding: .65rem; max-width: 790px; border: 1px solid #d6e2ee; background: #fff; border-radius: 12px; }
.eud-graph-viewer .eud-graph-svg { display:block; width:100%; height:auto; max-height: 520px; }
.eud-graph-viewer figcaption { color:#52657b; font-size:.82rem; text-align:center; padding:.35rem 0 .1rem; }
.eud-graph-svg { display:block; width:100%; height:auto; overflow:visible; }
.eud-graph-overlay[hidden] { display:none !important; }
.eud-graph-overlay { position:fixed; inset:0; z-index:3005; display:flex; align-items:center; justify-content:center; padding:18px; background:rgba(12,28,46,.77); }
.eud-graph-modal { box-sizing:border-box; background:#f9fbfd; color:#182a40; width:min(1160px,100%); max-height:96vh; overflow-y:auto; border-radius:16px; box-shadow:0 20px 70px #0007; padding:18px; font: 15px/1.45 system-ui,sans-serif; }
.eud-graph-head { display:flex; align-items:flex-start; gap:12px; justify-content:space-between; }
.eud-graph-head h2 {font-size:1.3rem;margin:0;color:#15283d;}
.eud-graph-head p {margin:.2rem 0 .55rem;color:#586b81;font-size:.9rem;}
.eud-graph-close {min-width:39px;min-height:39px;font-size:24px !important;line-height:1;}
.eud-graph-tools {display:flex;gap:7px;flex-wrap:wrap;margin-bottom:12px;}
.eud-graph-tools button,.eud-graph-modal button {border-radius:8px;cursor:pointer;padding:9px 12px;border:1px solid #bdcfe0;background:#fff;color:#193c5e;font-weight:600;font:inherit;}
.eud-graph-modal button:focus-visible,.eud-graph-modal input:focus-visible,.eud-graph-modal select:focus-visible {outline:3px solid #88b8e5;outline-offset:2px;}
.eud-graph-modal button:disabled {opacity:.45;cursor:default;}
.eud-graph-tools button.is-active {background:#194e83;color:white;border-color:#194e83;}
.eud-graph-layout {display:grid;grid-template-columns:minmax(0,2.7fr) minmax(225px,1fr);gap:15px;}
.eud-graph-canvas-column{min-width:0;}
.eud-graph-surface {background:#fff;border:1px solid #bbccdb;border-radius:11px;overflow:hidden;touch-action:none;cursor:crosshair;}
.eud-graph-surface svg {width:100%;height:auto;display:block;user-select:none;-webkit-user-select:none;}
.eud-graph-foot {display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:.83rem;color:#5e7184;padding:7px 3px;}
.eud-graph-controls {display:flex;flex-direction:column;gap:11px;max-height:590px;overflow-y:auto;padding:1px 3px;}
.eud-graph-controls label {font-size:.83rem;display:flex;flex-direction:column;gap:3px;color:#40556c;}
.eud-graph-controls strong {font-size:.87rem;display:block;margin-bottom:5px;}
.eud-graph-controls input,.eud-graph-controls select {box-sizing:border-box;max-width:100%;width:100%;border:1px solid #bdcfe0;border-radius:7px;padding:7px;background:#fff;color:#182a40;min-height:35px;}
.eud-graph-exact,.eud-graph-bounds {border:1px solid #d6e2ee;background:#fff;border-radius:9px;padding:9px;}
.eud-graph-exact>div,.eud-graph-bounds>div {display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-bottom:8px;}
.eud-graph-history{display:flex;gap:5px;flex-wrap:wrap;}
.eud-graph-actions {display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:12px;}
.eud-graph-actions .primary {background:#194e83;color:#fff;border-color:#194e83;}
.eud-graph-actions .eud-graph-error {flex:1;color:#a12d27;font-size:.85rem;}
.eud-graph-error{color:#a12d27;}
@media(max-width:780px){
  .eud-graph-overlay{padding:0;align-items:stretch;}
  .eud-graph-modal{width:100%;height:100%;max-height:100%;border-radius:0;padding:11px;}
  .eud-graph-layout{grid-template-columns:1fr;gap:8px;}
  .eud-graph-controls{max-height:none;}
  .eud-graph-tools button{padding:8px;}
  .eud-graph-actions{position:sticky;bottom:0;background:#f9fbfd;padding:8px 0;}
}
@media print { .eud-graph-overlay{display:none!important;} .eud-graph-viewer{break-inside:avoid;} }

/* 7.5.11 — Respostes sobre gràfics cartesians */
.eud-graph-answer{margin:.7rem 0 1rem;max-width:790px;min-width:0}
.eud-graph-answer-canvas{padding:.4rem;border:1px solid #cedeea;background:white;border-radius:12px;}
.eud-graph-answer-canvas svg{width:100%;height:auto;display:block}
.eud-graph-answer-buttons{display:flex;flex-wrap:wrap;gap:10px;margin:.55rem 0}
.eud-graph-answer-buttons button{min-height:42px}
.eud-graph-answer-caption{font-size:.88rem;color:#425a71;margin:.35rem 0}
.eud-graph-bounds[hidden]{display:none!important}
.eud-graph-compare{margin:.75rem 0;max-width:790px}
.eud-graph-compare .eud-graph-viewer{margin:0}
@media(max-width:420px){.eud-graph-answer-buttons button{width:100%}}
