/* ==========================================================================
   Priručnik za rad u biračkom odboru – zajednički stil
   ========================================================================== */

:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --text: #1f2430;
  --muted: #5c6370;
  --line: #e2e0d8;
  --accent: #b6323f;
  --accent-soft: #fbe9eb;
  --blue: #2f5d8a;
  --blue-soft: #e6eef7;
  --amber: #9a6a00;
  --amber-soft: #fff4d6;
  --green: #2e7d4f;
  --green-soft: #e4f3ea;
  --sidebar-w: 300px;
  --radius: 10px;
  --font-body: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15171c;
    --surface: #1e2128;
    --text: #e8e8e3;
    --muted: #a3a8b3;
    --line: #2e323b;
    --accent: #e0606d;
    --accent-soft: #3a2226;
    --blue: #7fb0e0;
    --blue-soft: #1f2b3a;
    --amber: #e6b64c;
    --amber-soft: #3a3320;
    --green: #6cc48f;
    --green-soft: #1f3328;
  }
}
:root[data-theme="dark"] {
  --bg: #15171c;
  --surface: #1e2128;
  --text: #e8e8e3;
  --muted: #a3a8b3;
  --line: #2e323b;
  --accent: #e0606d;
  --accent-soft: #3a2226;
  --blue: #7fb0e0;
  --blue-soft: #1f2b3a;
  --amber: #e6b64c;
  --amber-soft: #3a3320;
  --green: #6cc48f;
  --green-soft: #1f3328;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--blue); }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.25;
  margin: 1.6em 0 0.6em;
  font-weight: 600;
}
h1 { font-size: 2.1rem; margin-top: 0.4em; }
h2 { font-size: 1.5rem; padding-bottom: 0.25em; border-bottom: 2px solid var(--line); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: 0.35em; }
strong { font-weight: 700; }

code { font-family: Consolas, Menlo, monospace; font-size: 0.9em; }

/* ---------- Layout ---------- */

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 20px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar .brand {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}
.sidebar .brand a { color: var(--text); text-decoration: none; }
.sidebar .brand small { display: block; color: var(--muted); font-family: var(--font-body); font-weight: 400; font-size: 0.8rem; }
.sidebar ol {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}
.sidebar li { margin: 0; }
.sidebar li a {
  display: block;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.93rem;
}
.sidebar li a:hover { background: var(--blue-soft); }
.sidebar li a.current { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sidebar li a .num { color: var(--muted); display: inline-block; width: 1.8em; }
.sidebar li.quiz a { margin-top: 12px; border: 1px dashed var(--line); text-align: center; font-weight: 600; }

.sidebar .theme-toggle {
  margin-top: 18px;
  width: 100%;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}

.content {
  max-width: 860px;
  padding: 36px 48px 80px;
  width: 100%;
}

.topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  align-items: center;
  gap: 12px;
}
.topbar button {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.95rem;
  cursor: pointer;
}
.topbar .title { font-family: var(--font-head); font-weight: 600; font-size: 1rem; }

.chapter-kicker {
  color: var(--accent);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.lead { font-size: 1.1rem; color: var(--muted); }

/* ---------- Callouts ---------- */

.callout {
  border-left: 5px solid var(--blue);
  background: var(--blue-soft);
  padding: 14px 18px;
  margin: 1.2em 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.callout > :last-child { margin-bottom: 0; }
.callout .label {
  display: block;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.callout.vazno { border-color: var(--accent); background: var(--accent-soft); }
.callout.vazno .label { color: var(--accent); }
.callout.paznja { border-color: var(--amber); background: var(--amber-soft); }
.callout.paznja .label { color: var(--amber); }
.callout.napomena .label { color: var(--blue); }
.callout.nepravilnost { border-color: var(--text); background: var(--surface); border: 1px solid var(--line); border-left-width: 5px; }
.callout.nepravilnost .label { color: var(--text); }

/* ---------- Tables ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0 1.5em;
  font-size: 0.95rem;
  background: var(--surface);
}
th, td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  vertical-align: top;
  text-align: left;
}
th { background: var(--blue-soft); font-weight: 700; }

/* ---------- Steps / checklists ---------- */

ol.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}
ol.steps > li {
  position: relative;
  padding: 10px 14px 10px 56px;
  margin: 0 0 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
ol.steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

ul.check { list-style: none; padding: 0; }
ul.check li { padding-left: 1.7em; position: relative; }
ul.check li::before { content: "☐"; position: absolute; left: 0; color: var(--muted); }

.formula {
  font-family: Consolas, Menlo, monospace;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  margin: 0.6em 0;
  font-size: 0.95rem;
  overflow-x: auto;
}

/* ---------- Pager ---------- */

.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.pager a {
  flex: 1;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--surface);
  color: var(--text);
}
.pager a small { display: block; color: var(--muted); font-size: 0.8rem; }
.pager a.next { text-align: right; }
.pager a:hover { border-color: var(--blue); }

/* ---------- Naslovna ---------- */

.hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 40px;
  margin-bottom: 30px;
}
.hero h1 { margin-top: 0; }
.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.toc-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.toc-card:hover { border-color: var(--accent); }
.toc-card .num { color: var(--accent); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.08em; }
.toc-card .t { display: block; font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; margin: 2px 0 4px; }
.toc-card .d { color: var(--muted); font-size: 0.88rem; }
.toc-card.quiz { border-style: dashed; }

/* ---------- Kviz ---------- */

.quiz-intro { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 11px 20px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
}
.progress .bar { flex: 1; height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.progress .bar span { display: block; height: 100%; background: var(--accent); width: 0; transition: width 0.25s; }

.qcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-top: 12px;
}
.qcard .qtext { font-size: 1.15rem; font-weight: 600; margin: 0 0 16px; }
.qcard .qtopic { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }

.options { list-style: none; padding: 0; margin: 0; }
.options li { margin-bottom: 8px; }
.options label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.options label:hover { border-color: var(--blue); }
.options input { margin-top: 5px; }
.options label.correct { border-color: var(--green); background: var(--green-soft); }
.options label.wrong { border-color: var(--accent); background: var(--accent-soft); }
.options label.locked { cursor: default; }

.feedback {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  display: none;
}
.feedback.ok { display: block; background: var(--green-soft); border-left: 4px solid var(--green); }
.feedback.bad { display: block; background: var(--accent-soft); border-left: 4px solid var(--accent); }
.feedback strong { display: block; margin-bottom: 4px; }
.chlink { display: inline-block; margin-top: 6px; font-weight: 600; }

.qactions { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.result {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 30px;
  text-align: center;
}
.result .score { font-family: var(--font-head); font-size: 3rem; font-weight: 700; margin: 6px 0; }
.result .score.pass { color: var(--green); }
.result .score.fail { color: var(--accent); }
.result .verdict { font-size: 1.1rem; margin-bottom: 18px; }

.review { margin-top: 26px; }
.review .item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 10px;
}
.review .item.wrong { border-left-color: var(--accent); }
.review .item .q { font-weight: 600; margin-bottom: 6px; }
.review .item .a { font-size: 0.95rem; }
.review .item .a span { color: var(--muted); }
.review .item .e { font-size: 0.9rem; color: var(--muted); margin-top: 6px; }

.hidden { display: none !important; }

/* ---------- Anchor-i (linkovi iz provere znanja) ---------- */

.content [id] { scroll-margin-top: 16px; }
.content :target {
  outline: 3px solid var(--amber);
  outline-offset: 4px;
  animation: cilj-blede 3s ease-out forwards;
}
/* .table-wrap seče sve van tabele, pa se okvir reda crta unutra */
.content tr:target { outline-offset: -3px; }
@keyframes cilj-blede {
  0%, 50% { outline-color: var(--amber); }
  100% { outline-color: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .content :target { animation: none; }
}
@media (max-width: 900px) {
  /* lepljiva .topbar (do ~75px kad se naslov prelomi) ne sme da prekrije cilj ni njegov okvir */
  .content [id] { scroll-margin-top: 92px; }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(320px, 85vw);
    transform: translateX(-100%);
    transition: transform 0.2s;
    z-index: 30;
    box-shadow: 4px 0 24px rgba(0,0,0,0.2);
  }
  body.nav-open .sidebar { transform: none; }
  .topbar { display: flex; }
  .content { padding: 20px 16px 60px; }
  .hero { padding: 24px 20px; }
  h1 { font-size: 1.7rem; }
  .qcard, .quiz-intro, .result { padding: 18px 16px; }
}

@media print {
  .sidebar, .topbar, .pager, .theme-toggle { display: none !important; }
  .layout { display: block; }
  .content { max-width: none; padding: 0; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .callout { break-inside: avoid; }
}

/* ---------- Linkovi ka slikama i popup ---------- */

a.fig {
  display: inline-block;
  margin: 2px 6px 2px 0;
  padding: 3px 10px 3px 8px;
  border: 1px solid var(--blue);
  border-radius: 999px;
  color: var(--blue);
  background: var(--surface);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}
a.fig::before { content: "🖼 "; }
a.fig:hover { background: var(--blue-soft); }
.figs { margin: 0.4em 0 1em; }

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.82);
  padding: 20px;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
body.lb-open { overflow: hidden; }
.lb-inner {
  position: relative;
  max-width: 96vw;
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lb-img {
  max-width: 96vw;
  max-height: calc(96vh - 60px);
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.lb-caption {
  color: #fff;
  margin-top: 12px;
  font-size: 0.95rem;
  text-align: center;
  max-width: 90vw;
}
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  border: 0;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.lb-close { top: -14px; right: -14px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: -20px; }
.lb-next { right: -20px; }
@media (max-width: 900px) {
  .lb-close { top: 6px; right: 6px; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
}
@media print {
  .lightbox { display: none !important; }
  a.fig { border: 0; padding: 0; }
  a.fig::after { content: " (" attr(href) ")"; font-weight: 400; }
}

/* ---------- Izbor pisma ---------- */

.pismo-toggle {
  margin-top: 18px;
  width: 100%;
  display: flex;
  padding: 3px;
  gap: 3px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.pismo-toggle span {
  flex: 1;
  padding: 5px 4px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--muted);
}
.pismo-toggle span:first-child { background: var(--surface); color: var(--text); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.pismo-toggle.cir-active span:first-child { background: transparent; color: var(--muted); font-weight: 400; box-shadow: none; }
.pismo-toggle.cir-active span:last-child { background: var(--surface); color: var(--text); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.sidebar .theme-toggle { margin-top: 8px; }
@media print { .pismo-toggle { display: none !important; } }

/* ---------- Mobilna širina: ništa ne sme da razvlači stranicu ---------- */

body { overflow-wrap: break-word; }

/* grid kolone podrazumevano ne mogu da se skupe ispod sadržaja (min-width:auto),
   pa bi dugačak neprelomljiv element razvukao celu stranicu */
.layout, .sidebar, .content { min-width: 0; }
.content { max-width: min(860px, 100%); }

/* tabele se skroluju unutar svog okvira umesto da guraju stranicu */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1em 0 1.5em; }
.table-wrap > table { margin: 0; }

@media (max-width: 900px) {
  a.fig { display: block; border-radius: 8px; text-align: left; }
  .figs a.fig + a.fig { margin-top: 6px; }
  .qactions { flex-direction: column; align-items: stretch; }
  .qactions .btn { width: 100%; }
  .pager { flex-direction: column; }
  .pager a.next { text-align: left; }
  table { font-size: 0.9rem; }
  th, td { padding: 6px 8px; }
}

/* ---------- Pretraga ---------- */

.pr-dugme {
  margin-top: 14px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
}
.pr-dugme:hover { border-color: var(--blue); color: var(--text); }
.pr-dugme .pr-natpis { flex: 1; }
.pr-dugme kbd, .pr-napomena kbd {
  font-family: inherit;
  font-size: 0.75rem;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}
/* veliko polje na naslovnoj */
.hero-pretraga { margin-top: 22px; }
.pr-dugme.pr-veliko { margin-top: 0; padding: 12px 16px; border-radius: 8px; font-size: 1rem; }
.pr-dugme.pr-veliko .pr-natpis { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-napomena { margin: 8px 0 0; font-size: 0.88rem; color: var(--muted); }
.pr-napomena kbd { background: var(--bg); }
.pr-ikona { flex-shrink: 0; }

.topbar .pr-topbar {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  padding: 7px 9px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.pr-prozor {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.45);
  padding: 10vh 16px 16px;
  justify-content: center;
  align-items: flex-start;
}
.pr-prozor.open { display: flex; }
body.pr-open { overflow: hidden; }
.pr-panel {
  width: 100%;
  max-width: 680px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}
.pr-polje {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.pr-polje input {
  flex: 1;
  min-width: 0;
  padding: 4px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
}
/* Chrome dodaje svoje "×" za brisanje, pored našeg dugmeta za zatvaranje */
.pr-polje input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.pr-zatvori {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.pr-zatvori:hover { color: var(--text); }
.pr-status { margin: 0; padding: 8px 16px; font-size: 0.85rem; color: var(--muted); }
.pr-lista { list-style: none; margin: 0; padding: 0 8px 8px; overflow-y: auto; }
.pr-lista li { margin: 0; }
.pr-lista a {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}
.pr-lista li.aktivan a, .pr-lista a:hover { background: var(--blue-soft); }
.pr-gde { display: block; margin-bottom: 2px; font-size: 0.78rem; color: var(--muted); }
.pr-tekst { display: block; font-size: 0.93rem; line-height: 1.45; }
.pr-tekst.pr-naslov { font-family: var(--font-head); font-weight: 600; font-size: 1rem; }
.pr-lista mark {
  background: var(--amber-soft);
  color: inherit;
  box-shadow: inset 0 -2px 0 var(--amber);
  border-radius: 2px;
}
/* pogoci na stranici do koje je vodio rezultat (?q=) – posebno pravilo, jer pregledač
   bez podrške za ::highlight odbacuje celo pravilo */
::highlight(pretraga) {
  background-color: var(--amber-soft);
  color: var(--text);
  text-decoration: underline 2px var(--amber);
}

@media (max-width: 900px) {
  .pr-dugme kbd { display: none; }
  .pr-prozor { padding: 0; }
  .pr-panel { max-width: none; max-height: none; height: 100%; border: 0; border-radius: 0; }
}
@media print {
  .pr-dugme, .pr-topbar, .pr-prozor, .hero-pretraga { display: none !important; }
}

/* ---------- Vežbe (poglavlje 12) ---------- */

.vezba {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2px 22px 18px;
  margin: 1.4em 0;
}
.vezba > h3 { margin-top: 0.9em; }

table.formular .rub { width: 1%; white-space: nowrap; color: var(--muted); }
table.formular .broj { width: 1%; text-align: right; white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; }
table.formular tr.podnaslov td { background: var(--bg); }
table.formular td.prazno { background: var(--amber-soft); outline: 2px dashed var(--amber); outline-offset: -5px; }

.vz-naslov { font-weight: 700; margin-bottom: 0.4em; }
ol.vz-provere { list-style: none; counter-reset: vz; padding: 0; margin: 0 0 12px; }
ol.vz-provere > li {
  counter-increment: vz;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px 12px;
  padding: 8px 12px;
  margin-bottom: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
ol.vz-provere > li::before { content: counter(vz) "."; color: var(--muted); font-weight: 700; }
ol.vz-provere > li.tacno { border-color: var(--green); background: var(--green-soft); }
ol.vz-provere > li.netacno { border-color: var(--accent); background: var(--accent-soft); }
.vz-izbor { display: flex; gap: 6px; }
.vz-izbor label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  font-size: 0.93rem;
}
.vz-izbor label:hover { border-color: var(--blue); }
.vz-izbor label:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); font-weight: 600; }
.vz-izbor label:has(input:disabled) { cursor: default; }
.vz-akcije { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.vz-rezultat { font-weight: 700; }

details.resenje { margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--line); }
details.resenje > summary { cursor: pointer; font-weight: 700; color: var(--blue); }
details.resenje[open] > summary { margin-bottom: 10px; }
ul.analiza { list-style: none; padding: 0; }
ul.analiza li { position: relative; padding-left: 1.7em; }
ul.analiza li::before { position: absolute; left: 0; font-weight: 700; }
ul.analiza li[data-ok="1"]::before { content: "✓"; color: var(--green); }
ul.analiza li[data-ok="0"]::before { content: "✗"; color: var(--accent); }
ul.analiza .racun { display: block; font-family: Consolas, Menlo, monospace; font-size: 0.88rem; color: var(--muted); }
ul.analiza .oba-odgovora { display: block; margin-top: 2px; font-size: 0.88rem; font-style: italic; color: var(--muted); }

@media (max-width: 900px) {
  .vezba { padding: 2px 14px 14px; }
}
@media (max-width: 600px) {
  /* Da/Ne ispod izjave, poravnato sa tekstom (ne sa rednim brojem) */
  ol.vz-provere > li { grid-template-columns: auto 1fr; }
  .vz-izbor { grid-column: 2; }
}
@media print {
  .vezba-zadatak { display: none !important; }
  .vezba { break-inside: avoid; }
}
