/* Heronov vzorec: zameranie pozemku – vstupy ako zvinovacie metre, výsledok ako katastrálna mapa so šachovnicovým rámom,
   vrstevnicami, šrafovanou parcelou, kolíkmi vo vrcholoch a kružidlovými oblúkmi; legenda mapy nesie výsledky */
body.mk-heron{--hr-paper:#f4eedc;--hr-paper2:#ebe2c8;--hr-ink:#2f2a1f;--hr-mut:#6b604a;--hr-topo:#cdb98f;--hr-field:#5f8a43;--hr-a:#b5452a;--hr-b:#1f6f8b;--hr-c:#7a4a91;--hr-flag:#d62828;--hr-tape:#f2c230;--hr-tape-d:#a8820e;--hr-bad:#b42318}
@media(prefers-color-scheme:dark){body.mk-heron{--hr-paper:#232b25;--hr-paper2:#2b352e;--hr-ink:#ece3cc;--hr-mut:#c3b89c;--hr-topo:#43513f;--hr-field:#9ccc7a;--hr-a:#f08a6c;--hr-b:#6cc3e0;--hr-c:#c9a0e0;--hr-flag:#ff6b6b;--hr-tape:#e9b824;--hr-tape-d:#8a6a08;--hr-bad:#ff8a80}}

body.mk-heron .calc2{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:1.2rem}
@media(min-width:1100px){body.mk-heron .calc2{grid-template-columns:minmax(0,1fr) minmax(0,1.75fr)}body.mk-heron .calc2>.cform{position:sticky;top:76px}}

/* vstupy: zvinovacie metre */
.mk-heron .cform{background:linear-gradient(160deg,color-mix(in srgb,var(--hr-field) 12%,var(--card)),var(--card));border-radius:20px}
.mk-heron .cform .fields{gap:.3rem}
.mk-heron .cform .field>label{display:flex;align-items:center;gap:.55rem;font-weight:700;color:var(--fg)}
.mk-heron .cform .field>label::before{content:"";width:26px;height:6px;border-radius:3px;background:var(--hr-a);box-shadow:0 0 0 2px color-mix(in srgb,var(--hr-a) 25%,transparent)}
.mk-heron .cform .field:nth-child(2)>label::before{background:var(--hr-b);box-shadow:0 0 0 2px color-mix(in srgb,var(--hr-b) 25%,transparent)}
.mk-heron .cform .field:nth-child(3)>label::before{background:var(--hr-c);box-shadow:0 0 0 2px color-mix(in srgb,var(--hr-c) 25%,transparent)}
body.mk-heron.lay-shape .cform input{position:relative;padding:.55rem .9rem 1.05rem 3.2rem;border:2px solid var(--hr-tape-d);border-radius:6px 22px 22px 6px;color:#1d1a12;font:800 1.35rem/1.1 ui-monospace,"Cascadia Mono",Consolas,monospace;
  background:linear-gradient(90deg,#2c2c2c 0 2.3rem,transparent 2.3rem),
    repeating-linear-gradient(90deg,#1d1a12 0 1px,transparent 1px 8px) 2.3rem 100%/100% 7px no-repeat,
    repeating-linear-gradient(90deg,#1d1a12 0 1.5px,transparent 1.5px 40px) 2.3rem 100%/100% 12px no-repeat,
    var(--hr-tape)}
body.mk-heron.lay-shape .cform input::placeholder{color:#5c4d1d;font-weight:600;font-size:1.05rem}
body.mk-heron.lay-shape .cform input:focus{border-color:#1d1a12;box-shadow:0 0 0 3px color-mix(in srgb,var(--hr-tape) 55%,transparent)}
.mk-heron .cform .field{position:relative}
.mk-heron .cform .field::after{content:"";position:absolute;left:.75rem;bottom:1.05rem;width:.85rem;height:.85rem;border-radius:50%;background:radial-gradient(circle,#8a8a8a 0 25%,#d8d8d8 30% 60%,#8a8a8a 65%);pointer-events:none}
.mk-heron .cform .field:has(.err:not([hidden]))::after{bottom:2.6rem}
.mk-heron .chip[data-fill]{color:var(--hr-field);border-color:color-mix(in srgb,var(--hr-field) 40%,var(--line))}

/* mapa */
body.mk-heron .cres{border:7px solid transparent;border-radius:3px;padding:1rem 1.1rem 1.1rem;color:var(--hr-ink);
  background:linear-gradient(var(--hr-paper),var(--hr-paper)) padding-box,repeating-conic-gradient(var(--hr-ink) 0 25%,var(--hr-paper) 0 50%) 0 0/28px 28px border-box;
  box-shadow:inset 0 0 0 1px var(--hr-ink),0 10px 28px -14px rgba(40,30,10,.45)}
.mk-heron .cres-head h2{color:var(--hr-mut);font-family:Georgia,"Times New Roman",serif;letter-spacing:.25em}
body.mk-heron.lay-shape .figure{position:relative;padding:0;margin:.6rem 0 .8rem;border:1px solid color-mix(in srgb,var(--hr-ink) 45%,transparent);border-radius:0;background:var(--hr-paper2);overflow:hidden}
body.mk-heron.lay-shape .figure svg{max-width:none;width:100%}
.mk-heron .figure .topo path{fill:none;stroke:var(--hr-topo);stroke-width:1.1}
.mk-heron .figure .topo path.idx{stroke-width:2}
body.mk-heron.lay-shape .figure .shape{fill:url(#hr-hatch);stroke:none;transition:d .5s}
.mk-heron .figure .parcel{fill:color-mix(in srgb,var(--hr-field) 16%,transparent)}
.mk-heron .figure .sd{fill:none;stroke-width:3.5;stroke-linecap:round}
.mk-heron .figure .sa{stroke:var(--hr-a)}.mk-heron .figure .sb{stroke:var(--hr-b)}.mk-heron .figure .sc{stroke:var(--hr-c)}
.mk-heron .figure .arc{fill:none;stroke-width:1.4;stroke-dasharray:5 4;opacity:.85}
.mk-heron .figure .pivot{fill:none;stroke:var(--hr-mut);stroke-width:1}
.mk-heron .figure .pole{stroke:var(--hr-ink);stroke-width:2}
.mk-heron .figure .flag{fill:var(--hr-flag)}
.mk-heron .figure .foot{fill:var(--hr-paper);stroke:var(--hr-ink);stroke-width:1.5}
.mk-heron .figure .needle{fill:var(--hr-ink)}.mk-heron .figure .needle2{fill:var(--hr-paper);stroke:var(--hr-ink);stroke-width:1}
.mk-heron .figure .bar1{fill:var(--hr-ink)}.mk-heron .figure .bar2{fill:var(--hr-paper);stroke:var(--hr-ink);stroke-width:1}
body.mk-heron.lay-shape .figure text{font:italic 700 14px Georgia,"Palatino Linotype",serif;paint-order:stroke;stroke:var(--hr-paper2);stroke-width:5px;stroke-linejoin:round}
body.mk-heron.lay-shape .figure text[data-name="a"]{fill:var(--hr-a)}
body.mk-heron.lay-shape .figure text[data-name="b"]{fill:var(--hr-b)}
body.mk-heron.lay-shape .figure text[data-name="c"]{fill:var(--hr-c)}
body.mk-heron.lay-shape .figure text.main{fill:var(--hr-ink);font-size:17px;font-style:normal;letter-spacing:.02em}
.mk-heron .figure.bad .main{opacity:.6}

/* legenda mapy = výsledok */
body.mk-heron dl#out{display:block;margin:.2rem 0 .4rem;padding:.55rem .8rem;border:1.5px solid var(--hr-ink);background:var(--hr-paper);box-shadow:3px 3px 0 color-mix(in srgb,var(--hr-ink) 25%,transparent)}
body.mk-heron #out .tile,body.mk-heron #out .tile:first-child{display:flex;align-items:center;gap:.7rem;padding:.45rem 0;background:none;border:0;border-radius:0;border-bottom:1px dotted color-mix(in srgb,var(--hr-ink) 40%,transparent)}
body.mk-heron #out .tile:last-child{border-bottom:0}
body.mk-heron #out .tile::before{content:"";flex:0 0 34px;height:20px;border:1.5px solid var(--hr-ink)}
body.mk-heron #out .tile:nth-child(1)::before{border:0;background:linear-gradient(var(--hr-ink),var(--hr-ink)) 9px 0/2px 100% no-repeat}
body.mk-heron #out .tile:nth-child(1){position:relative}
body.mk-heron #out .tile:nth-child(1)::after{content:"";position:absolute;left:11px;top:calc(50% - 10px);width:0;height:0;border-style:solid;border-width:6px 0 6px 16px;border-color:transparent transparent transparent var(--hr-field)}
body.mk-heron #out.bad .tile:nth-child(1)::after{border-left-color:var(--hr-bad)}
body.mk-heron #out .tile:nth-child(2)::before{background:repeating-linear-gradient(45deg,var(--hr-field) 0 1.5px,transparent 1.5px 5px),color-mix(in srgb,var(--hr-field) 16%,transparent)}
body.mk-heron #out .tile:nth-child(3)::before{border:0;height:4px;background:linear-gradient(90deg,var(--hr-a) 0 33%,var(--hr-b) 33% 66%,var(--hr-c) 66%)}
body.mk-heron #out .tile dt{flex:1;margin:0;color:var(--hr-ink);font:600 .92rem/1.3 Georgia,"Times New Roman",serif}
body.mk-heron #out .tile:first-child dt{font-weight:600;font-size:.92rem;color:var(--hr-ink)}
body.mk-heron #out .tile dd,body.mk-heron #out .tile:first-child dd{margin:0;text-align:right;font:700 1.3rem/1.2 ui-monospace,"Cascadia Mono",Consolas,monospace;letter-spacing:0;color:var(--hr-ink);background:none;-webkit-text-fill-color:currentColor}
body.mk-heron #out .tile:nth-child(2) dd{font-size:1.65rem;color:var(--hr-field)}
body.mk-heron #out.bad .tile:first-child dd{color:var(--hr-bad)}
.mk-heron .cres .priv{color:var(--hr-mut)}
.mk-heron .cres-actions .btn-ghost{border-color:color-mix(in srgb,var(--hr-ink) 35%,transparent);color:var(--hr-ink);border-radius:4px}
.mk-heron .cres .dec select{background:var(--hr-paper);border-color:color-mix(in srgb,var(--hr-ink) 35%,transparent);color:var(--hr-ink)}
.mk-heron .cres .dec label{color:var(--hr-mut)}

@media(max-width:520px){
  body.mk-heron .cres{padding:.8rem .7rem .9rem;border-width:6px}
  body.mk-heron #out .tile dd{font-size:1.15rem}
  body.mk-heron #out .tile:nth-child(2) dd{font-size:1.4rem}
  body.mk-heron.lay-shape .figure text{font-size:17px}
  body.mk-heron.lay-shape .figure text.main{font-size:20px}
}
.mk-heron .figure.ghost .sd,.mk-heron .figure.ghost .shape,.mk-heron .figure.ghost .arc{opacity:.5}
