
/* Diseño 2D — versión corta (iframe). Mismo sistema visual que AreaEntreCurvas.html */
:root{
  --bg:#f0ede8; --surface:#ffffff; --ink:#0d1117; --muted:#7a7269; --rule:#d4cfc9;
  --accent:#1a4f8a; --gold:#c8922a; --info-bg:#eef3fb; --mal:#C0392B; --ok:#2a7f52;
  color-scheme:light;
}
*{margin:0;padding:0;box-sizing:border-box}
body{background:var(--bg);color:var(--ink);font-family:'DM Sans',"Segoe UI",system-ui,sans-serif;
  line-height:1.45;padding-block:10px;display:flex;justify-content:center}
.wrap{width:100%;max-width:420px;padding:0 8px;display:flex;flex-direction:column;gap:.5rem}

/* ── widget ── */
.ed-widget{
  /* colores CDI de Mathematica — se conservan, son los de las curvas */
  --col1:#5e81b5;   /* RGBColor[0.368,0.507,0.710] */
  --col2:#e19c24;   /* RGBColor[0.881,0.611,0.142] */
  --col3:#8fb032;   /* RGBColor[0.560,0.692,0.195] */
  background:var(--surface);border:1px solid var(--rule);border-radius:6px;overflow:hidden;
  font-size:12px;color:var(--ink);
}
.ed-header{
  background:#fbfaf8;padding:.45rem .8rem;border-bottom:1px solid var(--rule);
  display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:.3rem;
}
.ed-header h2{font-family:'DM Serif Display',Georgia,serif;font-size:.88rem;font-weight:400;color:var(--ink)}
.ed-header span{font-family:'DM Mono',ui-monospace,monospace;font-size:.5rem;letter-spacing:.1em;
  text-transform:uppercase;color:var(--muted)}

/* ── tira de fórmulas ── */
.formula-strip{
  padding:.32rem .75rem;font-family:'DM Mono',ui-monospace,monospace;font-size:.6rem;
  background:#fbfaf8;color:var(--ink);border-bottom:1px solid var(--rule);
  line-height:1.7;display:flex;flex-direction:column;gap:.05rem;
}
.fs-row{display:flex;align-items:center;gap:.4rem}
.fs-dot{display:inline-block;width:8px;height:8px;border-radius:50%;flex-shrink:0}
.fs-txt{flex:1}

/* ── lienzo ── */
.canvas-wrap{position:relative;width:100%;aspect-ratio:1/1;background:#fff;cursor:crosshair;touch-action:none}
.canvas-wrap canvas{display:block;width:100%;height:100%}
.coords{
  position:absolute;top:5px;right:6px;
  font-family:'DM Mono',ui-monospace,monospace;font-size:.56rem;
  color:var(--accent);background:rgba(255,255,255,.92);border:1px solid var(--rule);
  padding:.08rem .35rem;border-radius:4px;pointer-events:none;opacity:0;transition:opacity .15s;
}
.canvas-wrap:hover .coords{opacity:1}

/* ── panel de controles ── */
.ed-panel{background:#fff;padding:.5rem .7rem .55rem;border-top:1px solid var(--rule);
  display:flex;flex-direction:column;gap:.38rem}
.ctrl-row{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}
.ctrl-row label{font-family:'DM Mono',ui-monospace,monospace;font-size:.64rem;color:var(--muted);
  white-space:nowrap;min-width:3.6rem;display:flex;align-items:center;gap:.3rem}
.lbl-dot{display:inline-block;width:8px;height:8px;border-radius:50%}
.val{font-family:'DM Mono',ui-monospace,monospace;font-size:.66rem;color:var(--accent);
  min-width:2.5rem;text-align:right;font-variant-numeric:tabular-nums}

input[type=range]{-webkit-appearance:none;appearance:none;flex:1;min-width:60px;height:20px;margin:0;
  background:transparent;cursor:pointer}
input[type=range]:focus-visible{outline:2px solid var(--gold);outline-offset:3px;border-radius:5px}
input[type=range]::-webkit-slider-runnable-track{height:3px;border-radius:2px;
  background:linear-gradient(to right,rgba(26,79,138,.18),var(--accent),rgba(26,79,138,.18))}
input[type=range]::-moz-range-track{height:3px;border-radius:2px;
  background:linear-gradient(to right,rgba(26,79,138,.18),var(--accent),rgba(26,79,138,.18))}
input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:15px;height:15px;margin-top:-6px;
  border-radius:50%;background:var(--accent);border:2px solid #fff;box-shadow:0 0 0 1px var(--rule);
  transition:transform .12s,box-shadow .12s}
input[type=range]::-moz-range-thumb{width:15px;height:15px;border-radius:50%;background:var(--accent);
  border:2px solid #fff;box-shadow:0 0 0 1px var(--rule);transition:transform .12s,box-shadow .12s}
input[type=range]:hover::-webkit-slider-thumb{transform:scale(1.2);box-shadow:0 0 0 5px rgba(26,79,138,.16)}
input[type=range]:hover::-moz-range-thumb{transform:scale(1.2);box-shadow:0 0 0 5px rgba(26,79,138,.16)}

.btn-reset{border:1px solid var(--rule);background:#fff;border-radius:20px;padding:.2rem .65rem;
  cursor:pointer;font-family:'DM Sans',sans-serif;font-size:.7rem;color:var(--accent);
  white-space:nowrap;transition:background .15s,border-color .15s}
.btn-reset:hover{background:var(--info-bg);border-color:var(--accent)}
.btn-reset:focus-visible{outline:2px solid var(--gold);outline-offset:1px}
.btn-reset:active{transform:scale(.97)}

/* ── caja de estado ── */
.status-box{
  padding:.32rem .55rem;background:var(--info-bg);border-radius:5px;
  font-family:'DM Mono',ui-monospace,monospace;font-size:.58rem;
  color:var(--ink);border-left:3px solid var(--accent);line-height:1.65;
}
.status-box.ok  {border-color:var(--ok); background:#eaf4ee}
.status-box.warn{border-color:var(--gold);background:#fdf6e8}
.status-box.bad {border-color:var(--mal);background:#fbeceb}

footer{font-family:Helvetica,Arial,sans-serif;font-size:11px;color:#9a938c;text-align:center;
  line-height:1.6;padding:2px 0 4px}
footer a{color:var(--accent);text-decoration:none}
footer a:hover{text-decoration:underline}

@media(max-width:440px){.wrap{padding:0 6px}}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}

