/* Exercises: toolbar, "saved" state, switch, numbered cards (ol.ulohy), answer field, solution under <details>,
   "done" checkbox and the sidebar progress card/ring. Numbering is driven by the counter "u" reset on article.content,
   so it continues across all exercise lists in one lesson. */

.lista { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; margin: var(--s-4) 0 10px; font-size: 13.5px; color: var(--muted); font-family: var(--sans); }
.stav { font-family: var(--mono); font-size: 12.5px; display: inline-flex; gap: 6px; align-items: center; }
.stav.ok { color: var(--ok); }
.stav .ikona { font-family: var(--sans); } /* JetBrains Mono has no ☁ */
.switch { display: inline-flex; align-items: center; gap: var(--s-2); cursor: pointer; user-select: none; color: var(--text); min-height: 44px; }
.switch input { appearance: none; width: 36px; height: 22px; border-radius: var(--r-pill); background: var(--border); position: relative; cursor: pointer; margin: 0; transition: background .15s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--knob); transition: left .15s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { left: 16px; }

ol.ulohy { list-style: none; padding: 0; margin: 10px 0 0; }
ol.ulohy > li { position: relative; margin: var(--s-4) 0; padding: var(--s-4) 18px 14px 58px; border: 1px solid var(--border); border-radius: var(--r-l); background: var(--surface); counter-increment: u; }
ol.ulohy > li::before {
  content: counter(u); position: absolute; left: 16px; top: 15px;
  width: 28px; height: 28px; border-radius: var(--r); background: var(--accent-soft); color: var(--accent);
  font-family: var(--mono); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center;
}
ol.ulohy > li.du { border-color: var(--du-line); }
ol.ulohy > li.hotova { border-color: color-mix(in srgb, var(--ok) 55%, var(--border)); }
ol.ulohy > li.hotova::before { background: color-mix(in srgb, var(--ok) 18%, var(--surface)); color: var(--ok); content: "✓"; }
ol.ulohy > li > p:first-child { margin-top: 2px; }
.tag { display: inline-block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; padding: 2px var(--s-2); border-radius: var(--r-pill); vertical-align: middle; margin-left: 6px; }
.tag.du { background: var(--du-bg); color: var(--du-ink); border: 1px solid var(--du-line); }
textarea.odp { width: 100%; min-height: 84px; margin-top: var(--s-2); padding: 10px; border: 1px solid var(--border); border-radius: var(--r); background: var(--bg); color: var(--text); font-family: var(--mono); font-size: 13.5px; resize: vertical; display: block; }
textarea.odp:focus { outline: 2px solid var(--accent); border-color: transparent; background: var(--surface); }

/* closed: one row "▸ Show solution … done"; open: solution at full width, "done" below it */
.uloha-foot { display: flex; align-items: center; gap: var(--s-2) var(--s-4); margin-top: 6px; font-family: var(--sans); font-size: 13.5px; flex-wrap: wrap; }
details { font-family: var(--sans); }
.uloha-foot summary { cursor: pointer; color: var(--accent); font-weight: 500; font-size: 13.5px; user-select: none; list-style: none; display: inline-flex; gap: 6px; align-items: center; min-height: 44px; }
.uloha-foot summary::-webkit-details-marker { display: none; }
.uloha-foot summary::before { content: "▸"; font-size: 12px; transition: transform .15s; }
.uloha-foot details[open] summary::before { transform: rotate(90deg); }
.uloha-foot details { flex: 1 1 auto; min-width: 0; }
.uloha-foot details[open] { flex-basis: 100%; }
.uloha-foot .check { margin-left: auto; }
.ries { margin-top: var(--s-1); padding: 10px 14px; border-radius: var(--r); background: var(--def-bg); border-left: 4px solid var(--def-line); font-family: var(--serif); font-size: 16px; }
.ries p { margin: 5px 0; }
.check { display: inline-flex; align-items: center; gap: var(--s-2); cursor: pointer; color: var(--muted); min-height: 44px; padding: 0 var(--s-1); }
.check input { width: 18px; height: 18px; accent-color: var(--ok); margin: 0; }
.check input:checked + span { color: var(--ok); font-weight: 600; }

.sidecard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-l); padding: 14px; margin-bottom: 14px; }
.sidecard .side-h { margin-left: 0; }
.sidecard p { margin: 0; font-size: 13px; color: var(--muted); }
.ring { --p: 0; display: grid; place-items: center; width: 92px; height: 92px; margin: var(--s-2) auto; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--border) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--surface); }
.ring b { position: relative; font-size: 18px; text-align: center; }
.ring b small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
