/* Elipsa – konštrukcia dvoma špendlíkmi a niťou: list papiera prilepený páskou na oceľovom rysovacom stole,
   špendlíky v ohniskách, napnutá niť a ceruzka, ktorá elipsu obkreslí (dá sa ťahať po obvode). Výsledok ako
   popisové pole výkresu. Na širokej obrazovke je výkres vľavo a zadávanie vpravo. */
body.mk-ell{--el-table:#7d8e9c;--el-table2:#64757f;--el-paper:#fdfcf8;--el-graph:#3b3f45;--el-mut:#7a7f86;--el-pin1:#d62839;--el-pin2:#f6c026;--el-string:#c0392b;--el-tape:#f0e3b8;--el-pencil:#2e6b4f}
@media(prefers-color-scheme:dark){body.mk-ell{--el-table:#2f3a43;--el-table2:#252e35;--el-paper:#e4e1d8;--el-graph:#2b2e33;--el-mut:#5f646b;--el-pin1:#e5383b;--el-pin2:#f6c026;--el-string:#b3261e;--el-tape:#cfc296;--el-pencil:#3f8a66}}

body.mk-ell .calc2{display:grid;grid-template-columns:minmax(0,1fr);gap:1rem}
@media(min-width:1000px){
  body.mk-ell .calc2{grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);max-width:1040px;align-items:start}
  body.mk-ell .calc2>.cres{order:-1}
  body.mk-ell .calc2>.cform{position:sticky;top:76px}
}

/* zadávanie: dve karty so špendlíkom */
.mk-ell .cform{border-radius:4px;background:var(--card)}
.mk-ell .cform .fields{gap:.8rem}
.mk-ell .cform .field{position:relative;padding:.7rem .8rem .8rem 2.2rem;border:1px solid var(--line);border-radius:3px;background:linear-gradient(90deg,color-mix(in srgb,var(--el-pin1) 9%,transparent),transparent 40%)}
.mk-ell .cform .field:nth-child(2){background:linear-gradient(90deg,color-mix(in srgb,var(--el-pin2) 14%,transparent),transparent 40%)}
.mk-ell .cform .field::before{content:"";position:absolute;left:.7rem;top:.95rem;width:.85rem;height:.85rem;border-radius:50%;background:radial-gradient(circle at 35% 35%,rgba(255,255,255,.75) 0 18%,var(--el-pin1) 22%);box-shadow:2px 2px 2px rgba(0,0,0,.25)}
.mk-ell .cform .field:nth-child(2)::before{background:radial-gradient(circle at 35% 35%,rgba(255,255,255,.75) 0 18%,var(--el-pin2) 22%)}
.mk-ell .cform .field>label{font:italic 600 .98rem/1.3 "Segoe UI",system-ui,sans-serif;color:var(--fg)}
body.mk-ell.lay-shape .cform input{border:1.5px solid color-mix(in srgb,var(--el-graph) 40%,transparent);border-radius:2px;font:600 1.3rem/1.2 "Segoe UI",system-ui,sans-serif;font-style:italic;letter-spacing:.02em}
@media(prefers-color-scheme:dark){body.mk-ell.lay-shape .cform input{border-color:var(--line)}}
.mk-ell .chip[data-fill]{background:var(--el-pencil);border-color:var(--el-pencil);color:#fff}

/* rysovací stôl s papierom */
body.mk-ell .cres{border-top:0;border-radius:6px;background:linear-gradient(135deg,var(--el-table),var(--el-table2));border:0;color:#fff}
.mk-ell .cres-head h2{color:#fff;font:italic 700 1.1rem "Segoe UI",system-ui,sans-serif;letter-spacing:.04em}
.mk-ell .cres .empty{color:rgba(255,255,255,.8)}
body.mk-ell.lay-shape .figure.el-board{position:relative;margin:.6rem 0 .8rem;padding:0;border-radius:0;background:none}
body.mk-ell.lay-shape .figure.el-board svg{max-width:none;width:100%;filter:drop-shadow(0 6px 10px rgba(0,0,0,.3))}
.mk-ell .el-ex{position:absolute;right:2.2rem;top:1.4rem;z-index:1;display:none;padding:.05rem .5rem;border:1.5px solid var(--el-graph);border-radius:2px;color:var(--el-graph);background:var(--el-paper);font:italic 700 .8rem/1.3 "Segoe UI",sans-serif}
.mk-ell .figure.ghost .el-ex{display:block}
.mk-ell .figure.ghost .el-trace,.mk-ell .figure.ghost .el-string,.mk-ell .figure.ghost .el-pencil,.mk-ell .figure.ghost .el-semi{opacity:.5}
.mk-ell .figure .el-paper{fill:var(--el-paper)}
.mk-ell .figure .el-tape{fill:var(--el-tape);opacity:.85}
.mk-ell .figure .el-axis{fill:none;stroke:var(--el-mut);stroke-width:.7;stroke-dasharray:12 3 2 3}
.mk-ell .figure .el-semi{fill:none;stroke:var(--el-graph);stroke-width:1.1;stroke-dasharray:4 3}
.mk-ell .figure .el-trace{fill:none;stroke:var(--el-graph);stroke-width:2.2;stroke-linecap:round;stroke-dasharray:1;stroke-dashoffset:0}
.mk-ell .figure .el-string{fill:none;stroke:var(--el-string);stroke-width:1.3;stroke-linejoin:round;opacity:.9}
.mk-ell .figure .el-shadow{fill:rgba(0,0,0,.25)}
.mk-ell .figure .el-pin1{fill:var(--el-pin1);stroke:rgba(0,0,0,.3)}
.mk-ell .figure .el-pin2{fill:var(--el-pin2);stroke:rgba(0,0,0,.3)}
.mk-ell .figure .el-shine{fill:rgba(255,255,255,.8)}
.mk-ell .figure .el-fl{font:italic 700 11px Cambria,Georgia,serif;fill:var(--el-graph)}
.mk-ell .figure .el-wood{fill:#e9c48f}
.mk-ell .figure .el-lead{fill:#2b2b2b}
.mk-ell .figure .el-body{fill:var(--el-pencil)}
.mk-ell .figure .el-band{fill:#b9bec4}
.mk-ell .figure .el-grip{fill:transparent;cursor:grab;touch-action:none}
.mk-ell .figure.drag .el-grip{cursor:grabbing}
.mk-ell .figure .el-law{font:italic 600 10.5px "Segoe UI",system-ui,sans-serif;fill:var(--el-mut)}
.mk-ell .figure .el-sum{font:600 11.5px ui-monospace,Consolas,monospace;fill:var(--el-string)}
body.mk-ell.lay-shape .figure text{stroke:var(--el-paper);stroke-width:3px}
body.mk-ell.lay-shape .figure text[data-name]{font:italic 700 13px "Segoe UI",system-ui,sans-serif;fill:var(--el-graph);paint-order:stroke;stroke:var(--el-paper);stroke-width:4px}
body.mk-ell.lay-shape .figure text.main{font-size:15px;font-style:normal;font-weight:800;fill:var(--el-graph)}

/* popisové pole výkresu */
body.mk-ell dl#out{grid-template-columns:repeat(2,minmax(0,1fr));gap:0;margin:.3rem 0 .6rem;border:2px solid var(--el-graph);background:var(--el-paper)}
body.mk-ell #out .tile,body.mk-ell #out .tile:first-child{grid-column:auto;border:0;border-radius:0;background:none;padding:.55rem .8rem .65rem}
body.mk-ell #out .tile+.tile{border-left:1px solid var(--el-graph)}
body.mk-ell #out .tile dt,body.mk-ell #out .tile:first-child dt{color:var(--el-mut);font:700 .7rem/1.2 "Segoe UI",system-ui,sans-serif;text-transform:uppercase;letter-spacing:.14em;border-bottom:1px solid color-mix(in srgb,var(--el-graph) 40%,transparent);padding-bottom:.3rem}
body.mk-ell #out .tile dd,body.mk-ell #out .tile:first-child dd{margin-top:.4rem;font:italic 700 1.65rem/1.15 "Segoe UI",system-ui,sans-serif;color:var(--el-graph);background:none;-webkit-text-fill-color:currentColor;letter-spacing:.01em}
.mk-ell .cres .priv,.mk-ell .cres .dec label{color:rgba(255,255,255,.85)}
.mk-ell .cres-actions .btn-ghost{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.45);color:#fff;border-radius:3px}
.mk-ell .cres details{color:var(--fg)}
@media(max-width:560px){
  body.mk-ell #out .tile dd{font-size:1.3rem}
  body.mk-ell.lay-shape .figure text{stroke:var(--el-paper);stroke-width:3px}
body.mk-ell.lay-shape .figure text[data-name]{font-size:15px}
  body.mk-ell.lay-shape .figure text.main{font-size:16px}
  .mk-ell .figure .el-sum{font-size:13px}
  .mk-ell .figure .el-law{font-size:12px}
}
