/* Mockup: Rovnica priamky cez dva body – piesková mapa s bodkovanou sieťou, priamka ako asfaltová cesta so žltou
   stredovou čiarou, body A/B ako mapové špendlíky, oranžový trojuholník stúpania (Δx, Δy), krúžok q na osi y
   a žltá výstražná značka "stúpanie" so smernicou k. Tmavý režim = mapa za súmraku. */
body.mk-sl{--sl-sand:#f6eedb;--sl-sand2:#eadcbc;--sl-dot:#bba57c;--sl-ink:#4a3a22;--sl-axis:#6b5434;--sl-sh:#d9c69d;--sl-road:#3b3f46;--sl-line:#ffd23f;
  --sl-tri:#f97316;--sl-a:#15803d;--sl-b:#c81e1e;--sl-q:#2563eb;--sl-sign:#ffcc00;--sl-halo:#f6eedb}
@media(prefers-color-scheme:dark){body.mk-sl{--sl-sand:#26211a;--sl-sand2:#1c1813;--sl-dot:#6a5a40;--sl-ink:#eadcbc;--sl-axis:#cdb88e;--sl-sh:#4a4031;--sl-road:#60656e;--sl-line:#ffd84d;
  --sl-tri:#fb923c;--sl-a:#22c55e;--sl-b:#f05252;--sl-q:#60a5fa;--sl-sign:#f5c400;--sl-halo:#26211a}}

/* formulár: dva body ako dve dvojice súradníc */
.mk-sl .cform{border-top:4px solid var(--sl-tri)}
.mk-sl .cform .fields{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(min-width:700px){.mk-sl .cform .fields{grid-template-columns:repeat(4,minmax(0,1fr))}}
.mk-sl .cform .field>label{font-style:italic;font-weight:700}
.mk-sl .cform .field:nth-child(-n+2)>label::before,.mk-sl .cform .field:nth-child(n+3)>label::before{content:"";display:inline-block;width:.62em;height:.62em;border-radius:50% 50% 50% 0;transform:rotate(-45deg);margin-right:.45em;vertical-align:.02em}
.mk-sl .cform .field:nth-child(-n+2)>label::before{background:var(--sl-a)}
.mk-sl .cform .field:nth-child(n+3)>label::before{background:var(--sl-b)}
.mk-sl .cform input:focus{border-color:var(--sl-tri);box-shadow:0 0 0 3px color-mix(in srgb,var(--sl-tri) 20%,transparent)}
.mk-sl .cres{border-top-color:var(--sl-line)}

/* obrázok */
.sl-fig{position:relative;margin:.35rem 0 1rem;padding:0}
.sl-svg{display:block;width:100%;height:auto}
.sl-ex{position:absolute;top:10px;left:50%;transform:translateX(-50%);z-index:1;display:none;font:800 .7rem/1 system-ui,sans-serif;letter-spacing:.08em;text-transform:uppercase;color:#1a1a1a;background:var(--sl-sign);border:2px solid #1a1a1a;padding:.25rem .6rem;border-radius:4px}
.sl-fig.is-ex .sl-ex{display:block}

.sl-bg{fill:url(#sl-sandg);stroke:color-mix(in srgb,var(--sl-axis) 40%,transparent);stroke-width:1}
.sl-dots circle{fill:var(--sl-dot)}
.sl-dots .sl-dot2{opacity:.55}
.sl-tl{font:600 11.5px ui-monospace,"Cascadia Mono",Consolas,monospace;fill:var(--sl-ink);opacity:.85}
.sl-edge{stroke:var(--sl-axis);stroke-width:1}
.sl-axis{stroke:var(--sl-axis);stroke-width:1.6}
.sl-shoulder{stroke:var(--sl-sh);stroke-width:20;fill:none;stroke-linecap:butt}
.sl-road{stroke:var(--sl-road);stroke-width:14;fill:none}
.sl-center{stroke:var(--sl-line);stroke-width:1.8;stroke-dasharray:9 7;fill:none}
.sl-tri{fill:var(--sl-tri);fill-opacity:.24;stroke:var(--sl-tri);stroke-width:2;stroke-dasharray:6 4;stroke-linejoin:round}
.sl-dl{font:700 13px ui-monospace,"Cascadia Mono",Consolas,monospace;fill:var(--sl-tri);paint-order:stroke;stroke:var(--sl-halo);stroke-width:4px;stroke-linejoin:round}
@media(prefers-color-scheme:light){.sl-dl{fill:#c2410c}}
.sl-q{fill:var(--sl-halo);stroke:var(--sl-q);stroke-width:3}
.sl-ql{font:700 12.5px ui-monospace,"Cascadia Mono",Consolas,monospace;fill:var(--sl-q);paint-order:stroke;stroke:var(--sl-halo);stroke-width:4px;stroke-linejoin:round}
.sl-pin path{stroke:rgba(0,0,0,.35);stroke-width:1}
.sl-pa path{fill:var(--sl-a)}.sl-pb path{fill:var(--sl-b)}
.sl-phole{fill:#fff}
.sl-pshadow{fill:rgba(0,0,0,.28)}
.sl-pl{font:800 13px system-ui,sans-serif;fill:var(--sl-ink);paint-order:stroke;stroke:var(--sl-halo);stroke-width:4px;stroke-linejoin:round}
.sl-sign{filter:drop-shadow(0 3px 3px rgba(0,0,0,.3))}
.sl-sgo{fill:var(--sl-sign);stroke:#1a1a1a;stroke-width:1}
.sl-sgi{fill:none;stroke:#1a1a1a;stroke-width:2.2}
.sl-sgp{fill:#1a1a1a}
.sl-sgk{font:italic 900 14px Georgia,serif;fill:#1a1a1a}
.sl-sgt{font-weight:900;font-family:system-ui,"Segoe UI",sans-serif;fill:#1a1a1a}
.sl-fig.is-ex .sl-art{opacity:.9}

/* dlaždice = smerové tabule */
.mk-sl #out .tile{border-radius:10px;border:2px solid color-mix(in srgb,var(--sl-road) 70%,transparent);background:var(--sl-sand)}
.mk-sl #out .tile:nth-child(1){background:var(--sl-sign);border-color:#1a1a1a}
.mk-sl #out .tile:nth-child(1) dt,.mk-sl #out .tile:nth-child(1) dd{color:#1a1a1a}
.mk-sl #out .tile dd{font-family:ui-monospace,"Cascadia Mono",Consolas,monospace}
