/* Kalkulačka Performance Level (PL) — ČSN EN ISO 13849-1
   Vše je skopováno přes #tool-kalkulacka-pl, aby se styl nesrážel se zbytkem webu. */

#tool-kalkulacka-pl{
  --yellow:#FFC400;
  --yellow-dark:#e8b200;
  --ink:#0C0E10;
  --ink-3:#4b5054;
  --line:#e4e4e0;
  --paper:#ffffff;
  --sand:#f7f7f4;
  --ok:#1f6b45;      --ok-bg:#e8f4ec;
  --todo:#8a5a00;    --todo-bg:#fff4d6;
  --expert:#8d2f22;  --expert-bg:#fbeae6;
  --pl-a:#8fbda3; --pl-b:#b9c96e; --pl-c:#efc75e; --pl-d:#ee9a55; --pl-e:#dd6a5b;
  --dim:#c9cac5;
  color:var(--ink);
  background:var(--paper);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  font-size:15px;
  line-height:1.5;
  -webkit-text-size-adjust:100%;
}
#tool-kalkulacka-pl *{box-sizing:border-box}

#tool-kalkulacka-pl .te-wrap{max-width:1240px;margin:0 auto;padding:24px 28px 36px}
@media (max-width:640px){#tool-kalkulacka-pl .te-wrap{padding:20px 16px 28px}}

#tool-kalkulacka-pl h2,
#tool-kalkulacka-pl h3,
#tool-kalkulacka-pl h4{margin:0;font-weight:700;letter-spacing:-.01em}
#tool-kalkulacka-pl p{margin:0}

#tool-kalkulacka-pl .te-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
#tool-kalkulacka-pl .te-hidden{display:none}

/* hlavička */
#tool-kalkulacka-pl .te-head{border-bottom:2px solid var(--ink);padding-bottom:14px;margin-bottom:22px}
#tool-kalkulacka-pl .te-kicker{font-size:12px;text-transform:uppercase;letter-spacing:.09em;color:var(--ink-3);margin-bottom:4px}
#tool-kalkulacka-pl .te-title{font-size:28px;line-height:1.15}
#tool-kalkulacka-pl .te-lede{color:var(--ink-3);font-size:14px;margin-top:6px;max-width:74ch}

/* kroky */
#tool-kalkulacka-pl .te-step{border:1px solid var(--line);border-radius:12px;background:var(--paper);padding:20px 22px;margin-bottom:16px}
#tool-kalkulacka-pl .te-step-hd{display:flex;align-items:flex-start;gap:12px;margin-bottom:16px}
#tool-kalkulacka-pl .te-no{flex:0 0 28px;height:28px;border-radius:999px;background:var(--yellow);color:var(--ink);font-size:14px;font-weight:700;display:flex;align-items:center;justify-content:center}
#tool-kalkulacka-pl .te-step-hd h3{font-size:19px;padding-top:2px}
#tool-kalkulacka-pl .te-note{color:var(--ink-3);font-size:13px;margin-top:4px;max-width:74ch}
#tool-kalkulacka-pl .te-note-tight{margin-top:8px}

#tool-kalkulacka-pl .te-cols{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:22px;align-items:start}
@media (max-width:900px){#tool-kalkulacka-pl .te-cols{grid-template-columns:1fr;gap:18px}}
#tool-kalkulacka-pl .te-col{min-width:0;display:flex;flex-direction:column;gap:14px}

/* parametry S / F / P */
#tool-kalkulacka-pl .te-param{border:0;margin:0;padding:0;display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;align-items:start}
#tool-kalkulacka-pl .te-sym{font-size:22px;font-weight:700;padding-top:6px}
#tool-kalkulacka-pl .te-opts{display:grid;grid-template-columns:1fr 1fr;gap:8px}
@media (max-width:1100px){#tool-kalkulacka-pl .te-opts{grid-template-columns:1fr}}
#tool-kalkulacka-pl .te-opt{position:relative;display:block;cursor:pointer}
#tool-kalkulacka-pl .te-opt input{position:absolute;width:1px;height:1px;opacity:0}
#tool-kalkulacka-pl .te-opt-body{display:block;height:100%;border:1px solid var(--line);border-radius:10px;background:var(--sand);padding:10px 12px;transition:border-color .15s,background-color .15s,box-shadow .15s}
#tool-kalkulacka-pl .te-opt b{display:block;font-size:14px}
#tool-kalkulacka-pl .te-opt small{display:block;color:var(--ink-3);font-size:13px;line-height:1.35;margin-top:2px}
#tool-kalkulacka-pl .te-opt input:checked + .te-opt-body{background:var(--paper);border-color:var(--ink);box-shadow:inset 4px 0 0 var(--yellow)}
#tool-kalkulacka-pl .te-opt input:focus-visible + .te-opt-body{outline:2px solid var(--ink);outline-offset:2px}

/* formulářová pole */
#tool-kalkulacka-pl .te-row{display:flex;flex-wrap:wrap;gap:12px}
#tool-kalkulacka-pl .te-row-4 .te-fld{flex:1 1 200px}
#tool-kalkulacka-pl .te-fld{display:flex;flex-direction:column;gap:5px;flex:1 1 180px;min-width:0}
#tool-kalkulacka-pl .te-fld label{font-size:13px;color:var(--ink-3)}
#tool-kalkulacka-pl .te-unit{display:flex;border:1px solid var(--line);border-radius:10px;background:var(--sand);overflow:hidden}
#tool-kalkulacka-pl .te-unit:focus-within{outline:2px solid var(--ink);outline-offset:1px}
#tool-kalkulacka-pl input[type="number"],
#tool-kalkulacka-pl select{font:inherit;font-size:14px;color:var(--ink);background:var(--sand);border:0;padding:10px 11px;width:100%;min-width:0;border-radius:10px}
#tool-kalkulacka-pl input[type="number"]:focus{outline:none}
#tool-kalkulacka-pl select{border:1px solid var(--line)}
#tool-kalkulacka-pl select:focus-visible{outline:2px solid var(--ink);outline-offset:1px}
#tool-kalkulacka-pl .te-u{font-size:12px;color:var(--ink-3);display:flex;align-items:center;padding:0 11px;border-left:1px solid var(--line);white-space:nowrap}
#tool-kalkulacka-pl .te-check{display:flex;gap:10px;align-items:flex-start;font-size:14px;cursor:pointer}
#tool-kalkulacka-pl .te-check input{margin:3px 0 0;width:17px;height:17px;accent-color:var(--ink);flex:0 0 auto}

/* tlačítka */
#tool-kalkulacka-pl .te-btns{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
#tool-kalkulacka-pl .te-btns-end{margin-top:18px}
#tool-kalkulacka-pl .te-btn{font:inherit;font-size:14px;font-weight:600;border-radius:999px;padding:9px 20px;cursor:pointer;border:1px solid var(--ink);background:var(--paper);color:var(--ink)}
#tool-kalkulacka-pl .te-btn:hover{background:var(--sand)}
#tool-kalkulacka-pl .te-btn:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
#tool-kalkulacka-pl .te-btn-primary{background:var(--yellow);border-color:var(--yellow);color:var(--ink)}
#tool-kalkulacka-pl .te-btn-primary:hover{background:var(--yellow-dark);border-color:var(--yellow-dark)}

/* výstupní karta */
#tool-kalkulacka-pl .te-out{display:flex;align-items:center;gap:16px;flex-wrap:wrap;background:var(--sand);border:1px solid var(--line);border-radius:12px;padding:16px}
#tool-kalkulacka-pl .te-chip{font-size:22px;font-weight:600;line-height:1;min-width:86px;height:86px;border-radius:10px;display:flex;align-items:baseline;justify-content:center;gap:4px;color:#111;background:var(--line)}
#tool-kalkulacka-pl .te-chip b{font-size:44px;font-weight:700}
#tool-kalkulacka-pl .te-chip small{font-size:16px;font-weight:600}
#tool-kalkulacka-pl .te-chip.te-pl-a{background:var(--pl-a)}
#tool-kalkulacka-pl .te-chip.te-pl-b{background:var(--pl-b)}
#tool-kalkulacka-pl .te-chip.te-pl-c{background:var(--pl-c)}
#tool-kalkulacka-pl .te-chip.te-pl-d{background:var(--pl-d)}
#tool-kalkulacka-pl .te-chip.te-pl-e{background:var(--pl-e)}
#tool-kalkulacka-pl .te-chip.te-chip-empty{background:var(--paper);border:1px dashed var(--line);color:var(--ink-3)}
#tool-kalkulacka-pl .te-chip.te-chip-empty small{display:none}
#tool-kalkulacka-pl .te-chip.te-chip-empty b{font-size:30px;font-weight:600}
#tool-kalkulacka-pl .te-kv{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 14px;font-size:14px;margin:0;min-width:0}
#tool-kalkulacka-pl .te-kv dt{color:var(--ink-3)}
#tool-kalkulacka-pl .te-kv dd{margin:0;font-variant-numeric:tabular-nums}

/* graf rizika */
#tool-kalkulacka-pl .te-graph{overflow-x:auto}
#tool-kalkulacka-pl .te-graph svg{display:block;width:100%;min-width:360px;max-width:520px}
#tool-kalkulacka-pl .te-edge{fill:none;stroke:var(--dim);stroke-width:1.5;stroke-linejoin:round}
#tool-kalkulacka-pl .te-edge.te-on{stroke:var(--ink);stroke-width:3}
#tool-kalkulacka-pl .te-elabel{font-size:11px;fill:var(--ink-3)}
#tool-kalkulacka-pl .te-elabel.te-on{fill:var(--ink);font-weight:700}
#tool-kalkulacka-pl .te-gcap{font-size:10px;fill:var(--ink-3)}
#tool-kalkulacka-pl .te-gcap-end{text-anchor:middle}
#tool-kalkulacka-pl .te-plbox{opacity:.35;stroke:none}
#tool-kalkulacka-pl .te-plbox.te-on{opacity:1;stroke:var(--ink);stroke-width:2}
#tool-kalkulacka-pl .te-plbox.te-pl-a{fill:var(--pl-a)}
#tool-kalkulacka-pl .te-plbox.te-pl-b{fill:var(--pl-b)}
#tool-kalkulacka-pl .te-plbox.te-pl-c{fill:var(--pl-c)}
#tool-kalkulacka-pl .te-plbox.te-pl-d{fill:var(--pl-d)}
#tool-kalkulacka-pl .te-plbox.te-pl-e{fill:var(--pl-e)}
#tool-kalkulacka-pl .te-pltext{font-size:13px;font-weight:700;text-anchor:middle;fill:#111;opacity:.5}
#tool-kalkulacka-pl .te-pltext.te-on{opacity:1}

/* tabulka zjednodušeného postupu */
#tool-kalkulacka-pl .te-tblwrap{overflow-x:auto}
#tool-kalkulacka-pl .te-cols + .te-tblwrap{margin-top:18px}
#tool-kalkulacka-pl .te-table{border-collapse:collapse;width:100%;font-size:13px;font-variant-numeric:tabular-nums}
#tool-kalkulacka-pl .te-table th,
#tool-kalkulacka-pl .te-table td{border:1px solid var(--line);padding:7px;text-align:center;white-space:nowrap}
#tool-kalkulacka-pl .te-table thead th{background:var(--sand);font-size:12px;font-weight:600}
#tool-kalkulacka-pl .te-th-sub{font-weight:400}
#tool-kalkulacka-pl .te-table tbody th{text-align:left;background:var(--sand);font-weight:500}
#tool-kalkulacka-pl .te-table td{font-weight:600}
#tool-kalkulacka-pl .te-table td.te-na{color:var(--ink-3);font-weight:400}
#tool-kalkulacka-pl .te-table td.te-col{background:var(--sand)}
#tool-kalkulacka-pl .te-table td.te-hit{background:var(--yellow);outline:2px solid var(--ink);outline-offset:-2px}

/* pomocný výpočet */
#tool-kalkulacka-pl .te-calc{background:var(--sand);border:1px solid var(--line);border-radius:10px;padding:12px 14px;margin-top:14px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px;line-height:1.75;white-space:pre-wrap;overflow-x:auto}
#tool-kalkulacka-pl .te-calc b{background:var(--yellow);padding:0 4px;border-radius:3px}
#tool-kalkulacka-pl .te-calc i{font-style:normal;color:var(--ink-3)}

/* výsledek */
#tool-kalkulacka-pl .te-verdict{border:1px solid var(--line);border-radius:12px;overflow:hidden;margin-bottom:18px}
#tool-kalkulacka-pl .te-verdict-hd{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;padding:16px 22px}
#tool-kalkulacka-pl .te-verdict-hd h3{font-size:20px;flex:1 1 260px;min-width:0}
#tool-kalkulacka-pl .te-badge{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;border-radius:999px;padding:6px 14px;white-space:nowrap;color:#fff}
#tool-kalkulacka-pl .te-v-ok .te-verdict-hd{background:var(--ok-bg)}
#tool-kalkulacka-pl .te-v-ok .te-badge{background:var(--ok)}
#tool-kalkulacka-pl .te-v-todo .te-verdict-hd{background:var(--todo-bg)}
#tool-kalkulacka-pl .te-v-todo .te-badge{background:var(--todo)}
#tool-kalkulacka-pl .te-v-expert .te-verdict-hd{background:var(--expert-bg)}
#tool-kalkulacka-pl .te-v-expert .te-badge{background:var(--expert)}
#tool-kalkulacka-pl .te-verdict-bd{padding:18px 22px 22px}
#tool-kalkulacka-pl .te-vtext{font-size:14px;max-width:80ch}
#tool-kalkulacka-pl .te-vsub{font-size:13px;text-transform:uppercase;letter-spacing:.07em;color:var(--ink-3);margin:16px 0 8px}
#tool-kalkulacka-pl .te-steps{margin:0;padding-left:20px;font-size:14px}
#tool-kalkulacka-pl .te-steps li{margin-bottom:7px;max-width:80ch}
#tool-kalkulacka-pl .te-flags{list-style:none;margin:14px 0 0;padding:0;display:flex;flex-direction:column;gap:7px}
#tool-kalkulacka-pl .te-flags li{font-size:13px;padding-left:16px;position:relative;max-width:80ch}
#tool-kalkulacka-pl .te-flags li::before{content:"";position:absolute;left:0;top:7px;width:7px;height:7px;border-radius:2px;background:var(--yellow)}
#tool-kalkulacka-pl .te-flags li.te-err::before{background:var(--expert)}

#tool-kalkulacka-pl .te-foot{font-size:12px;color:var(--ink-3);border-top:1px solid var(--line);padding-top:12px;max-width:90ch}

@media (prefers-reduced-motion:reduce){
  #tool-kalkulacka-pl .te-opt-body{transition:none}
}
