/* Razdelek Tekmovanja */
.comp-pickers { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.comp-intro { margin: 0 0 16px; }
.contest-card { display: flex; flex-direction: column; gap: 12px; }
.contest-head { display: flex; gap: 14px; align-items: flex-start; }
.contest-head h2 { margin: 0; font-size: 1.15rem; }
.contest-head p { margin: 4px 0 0; }
.contest-card > button.primary { align-self: flex-start; }
.contest-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.contest-history li { display: grid; grid-template-columns: 7.5em 4.5em 1fr; align-items: center; gap: 10px; font-weight: 700; font-size: 0.92rem; }
.contest-history .bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.contest-history .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #ffd166); border-radius: 99px; }
.comp-topics-title { margin: 22px 0 4px; font-size: 1.2rem; }

/* med tekmovanjem */
.contest-bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 8px 0; margin-top: -6px; background: var(--bg); font-size: 0.86rem; font-weight: 700; }
.comp-hero .hero-icon svg.i { fill: none; }
.contest-timer { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 900; font-variant-numeric: tabular-nums; font-size: 1.05rem; flex: none; }
.contest-timer.warn { background: var(--danger-bg); color: var(--danger); }
.pts { font-size: 0.8rem; font-weight: 800; color: #8a5a00; background: color-mix(in srgb, var(--gold) 22%, transparent); padding: 3px 10px; border-radius: 999px; }
.dark .pts { color: #ffd27a; }
.contest-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }

/* pregled po tekmovanju */
.review-item { padding: 0; margin-top: 10px; overflow: hidden; }
.review-item summary { display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; font-weight: 800; list-style: none; }
.review-item summary::-webkit-details-marker { display: none; }
.review-item[open] summary { border-bottom: 1px solid var(--border); }
.review-item > :not(summary) { margin-left: 16px; margin-right: 16px; }
.review-item > :last-child { margin-bottom: 16px; }
.ri-name { flex: 1; min-width: 0; }
.ri-pts { font-variant-numeric: tabular-nums; color: var(--muted); }
.review-item.ok .ri-icon { color: var(--ok); }
.review-item.bad .ri-icon { color: var(--danger); }
.review-item.skip .ri-icon { color: var(--muted); }
.choices.static .choice { cursor: default; }

/* Rezultat tekmovanja: točke se preštejejo, vrstica se napolni, naloge pridrsijo ena za drugo. */
.score-line .count-up { display: inline-block; min-width: 1.2em; font-variant-numeric: tabular-nums; color: var(--accent); }
.score-bar { height: 12px; max-width: 360px; margin: 6px auto 12px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.score-bar > div { height: 100%; width: var(--pct); border-radius: inherit; background: linear-gradient(90deg, var(--hero-a), var(--hero-b)); transform-origin: left; animation: bar-fill 1s cubic-bezier(.2, .8, .2, 1) 0.15s both; }
@keyframes bar-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.result .result-icon { animation: pop 0.5s ease, wiggle 0.8s ease 0.5s; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-10deg); } 50% { transform: rotate(8deg); } 75% { transform: rotate(-4deg); } }
.review-item { animation: slide-in 0.4s ease both; animation-delay: calc(0.35s + var(--i, 0) * 0.08s); }
@keyframes slide-in { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
.review-item .ri-icon { display: inline-flex; animation: pop 0.4s ease both; animation-delay: calc(0.6s + var(--i, 0) * 0.08s); }
.review-item.bad .ri-icon { animation-name: pop, shake; animation-duration: 0.4s, 0.4s; animation-delay: calc(0.6s + var(--i, 0) * 0.08s), calc(1s + var(--i, 0) * 0.08s); }
.review-item summary { transition: background 0.15s; }
.review-item summary:hover { background: var(--surface-2); }
/* Ob odprtju se vsebina pokaže po delih: naloga, odgovor, podatki, formula, rešitev. */
.review-item[open] > :not(summary) { animation: fade-up 0.35s ease both; }
.review-item[open] > :nth-child(2) { animation-delay: 0.02s; }
.review-item[open] > :nth-child(3) { animation-delay: 0.1s; }
.review-item[open] > :nth-child(4) { animation-delay: 0.18s; }
.review-item[open] > :nth-child(5) { animation-delay: 0.26s; }
.review-item[open] > :nth-child(6) { animation-delay: 0.34s; }
.review-item[open] .solution > * { animation: fade-up 0.35s ease both; }
.review-item[open] .solution > :nth-child(2) { animation-delay: 0.3s; }
.review-item[open] .solution > :nth-child(3) { animation-delay: 0.42s; }
.review-item[open] .solution > :nth-child(n+4) { animation-delay: 0.54s; }
.choices.static .choice.right { border-color: var(--ok); background: var(--ok-bg); }
.choices.static .choice.picked:not(.right) { border-color: var(--danger); background: var(--danger-bg); }

@media (max-width: 480px) {
  .contest-history li { grid-template-columns: 6.5em 4em 1fr; font-size: 0.86rem; }
}

/* Izpiti: negativne točke, opis izpita, izbira drugih izpitov */
.pts.neg { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); }
.dark .pts.neg { color: var(--danger); }
.exam-about summary { cursor: pointer; display: flex; align-items: flex-start; gap: 10px; list-style: none; }
.exam-about summary::-webkit-details-marker { display: none; }
.exam-about summary svg.i { flex: none; margin-top: 2px; color: var(--accent); }
.exam-about p { margin: 10px 0 0; color: var(--muted); line-height: 1.5; }
.exam-official h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.exam-official h2 svg.i { flex: none; color: var(--accent); }
.exam-official p { margin: 0 0 12px; line-height: 1.5; }
.exam-other { max-width: 360px; }
.exam-other select { width: 100%; }
.task-top:has(.pts.neg) .task-topic { flex-basis: 100%; }
.prep-switch { margin: 0 0 12px; }
