/* EasyEduManage - pupil quiz pages (mobile first, no external fonts so it loads fast on data) */
:root {
  --navy: #0B2D5C; --blue: #1F5FA8; --green: #1E7D4F; --green2: #2FA37A; --gold: #F5B62D;
  --red: #D64550; --ink: #1B2333; --muted: #6B7487; --line: #E3E8F1; --bg: #F3F6FB; --card: #fff;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.pz-body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.45; }
a { color: var(--blue); }
[hidden] { display: none !important; }

/* ---------- buttons ---------- */
.pz-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 20px; border: 0; border-radius: 12px;
  font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; transition: transform .08s, box-shadow .2s, opacity .2s; }
.pz-btn:active { transform: scale(.97); }
.pz-btn:disabled { opacity: .45; cursor: default; }
.pz-btn-go { background: var(--navy); color: #fff; box-shadow: 0 4px 12px rgba(11,45,92,.25); }
.pz-btn-warn { background: var(--gold); color: #3A2A00; }
.pz-btn-finish { background: var(--green); color: #fff; box-shadow: 0 4px 12px rgba(30,125,79,.3); }
.pz-btn-ghost { background: #fff; color: var(--navy); border: 1.5px solid var(--line); }
.pz-btn-big { width: 100%; min-height: 54px; font-size: 18px; }

/* ---------- login ---------- */
body.pz-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px 16px;
  background: radial-gradient(circle at 15% 10%, #2B6CC4 0, transparent 45%), radial-gradient(circle at 90% 90%, #2FA37A 0, transparent 40%), var(--navy); }
.pz-login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 22px; padding: 28px 22px 20px; box-shadow: 0 20px 50px rgba(0,0,0,.25); text-align: center; }
.pz-badge { width: 76px; height: 76px; margin: -66px auto 10px; border-radius: 50%; background: var(--gold); display: grid; place-items: center; font-size: 36px; border: 5px solid #fff; box-shadow: 0 6px 18px rgba(0,0,0,.15); overflow: hidden; }
.pz-badge img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.pz-login h1 { margin: 6px 0 2px; font-size: 26px; color: var(--navy); }
.pz-sub { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.pz-login form { text-align: left; }
.pz-login label { display: block; font-weight: 700; font-size: 14px; margin: 12px 0 6px; color: var(--navy); }
.pz-login input { width: 100%; height: 52px; padding: 0 14px; border: 2px solid var(--line); border-radius: 12px; font: inherit; font-size: 18px; letter-spacing: .03em; background: #FAFBFD; }
.pz-login input:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(31,95,168,.12); }
.pz-pass { position: relative; }
.pz-pass button { position: absolute; right: 6px; top: 6px; height: 40px; width: 44px; border: 0; background: transparent; font-size: 18px; cursor: pointer; }
.pz-login .pz-btn-go { width: 100%; margin-top: 20px; min-height: 54px; font-size: 18px; }
.pz-help { font-size: 13px; color: var(--muted); margin: 16px 0 6px; }
.pz-foot { font-size: 12px; color: var(--muted); margin: 0; }
.pz-alert { background: #FDECEC; color: #9B1C24; border-radius: 12px; padding: 12px 14px; font-size: 14px; margin: 0 0 6px; text-align: left; }

/* ---------- top bar ---------- */
.pz-top { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--navy); color: #fff; }
.pz-me { display: flex; gap: 10px; align-items: center; }
.pz-me span { display: block; font-size: 12px; opacity: .8; }
.pz-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--gold); color: var(--navy); display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.pz-out { color: #fff; text-decoration: none; font-size: 14px; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.12); }

.pz-wrap { max-width: 680px; margin: 0 auto; padding: 16px 16px 40px; }
.pz-h { font-size: 17px; margin: 22px 0 10px; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.pz-count { background: var(--red); color: #fff; font-size: 12px; border-radius: 999px; padding: 2px 9px; }
.pz-empty { background: #fff; border-radius: 16px; padding: 22px; text-align: center; color: var(--muted); border: 1.5px dashed var(--line); }

/* ---------- cards ---------- */
.pz-card { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 16px; padding: 14px; margin-bottom: 10px;
  text-decoration: none; color: inherit; border: 1.5px solid var(--line); box-shadow: 0 2px 8px rgba(16,32,64,.04); }
.pz-card-go { border-color: #BFD3F0; box-shadow: 0 6px 16px rgba(31,95,168,.10); }
.pz-card-soon { opacity: .75; }
.pz-ico { width: 48px; height: 48px; flex-shrink: 0; border-radius: 14px; background: #EEF4FF; display: grid; place-items: center; font-size: 24px; }
.pz-info { flex: 1; min-width: 0; }
.pz-info strong { display: block; font-size: 15.5px; }
.pz-info span { display: block; font-size: 13px; color: var(--muted); }
.pz-info em { display: block; font-style: normal; font-size: 12.5px; color: #B45309; font-weight: 600; margin-top: 2px; }
.pz-card .pz-btn { min-height: 40px; padding: 0 16px; font-size: 14.5px; }
.pz-score { font-weight: 800; font-size: 16px; padding: 8px 12px; border-radius: 12px; }
.pz-good { color: var(--green); background: #E6F6EE; } .pz-ok { color: #9A6500; background: #FFF4DC; } .pz-low { color: #B42318; background: #FDECEC; }

/* ---------- intro ---------- */
.pz-intro { background: #fff; border-radius: 20px; padding: 26px 20px; text-align: center; margin-top: 10px; box-shadow: 0 8px 24px rgba(16,32,64,.06); }
.pz-intro-ico { font-size: 46px; }
.pz-intro h1 { margin: 6px 0 2px; font-size: 23px; color: var(--navy); }
.pz-rules { list-style: none; padding: 0; margin: 14px 0; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pz-rules li { background: #EEF4FF; border-radius: 12px; padding: 8px 12px; font-size: 14px; }
.pz-tips { text-align: left; font-size: 14px; color: #3B475C; background: #F6FAF7; border: 1px solid #DCEFE3; border-radius: 12px; padding: 12px 14px; margin: 0 0 18px; }

/* ---------- quiz ---------- */
.pz-qbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; background: var(--navy); color: #fff; }
.pz-qtitle { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pz-timer { flex-shrink: 0; font-variant-numeric: tabular-nums; font-weight: 800; font-size: 18px; background: rgba(255,255,255,.14); padding: 6px 12px; border-radius: 10px; }
.pz-timer.low { background: var(--red); animation: pzPulse 1s infinite; }
@keyframes pzPulse { 50% { opacity: .65; } }
.pz-progress { height: 5px; background: #D9E2F0; position: sticky; top: 52px; z-index: 4; }
.pz-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--green2), var(--gold)); transition: width .3s; }
.pz-wrap-quiz { padding-top: 18px; }
.pz-q { background: #fff; border-radius: 20px; padding: 20px 16px; box-shadow: 0 8px 24px rgba(16,32,64,.06); animation: pzIn .25s ease; }
@keyframes pzIn { from { opacity: 0; transform: translateY(8px); } }
.pz-qnum { font-size: 12.5px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .05em; }
.pz-qtext { font-size: 19px; line-height: 1.4; margin: 8px 0 16px; }
.pz-opts { display: grid; gap: 10px; }
.pz-opt { position: relative; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; background: #FAFBFD; transition: border-color .15s, background .15s; }
.pz-opt input { position: absolute; opacity: 0; pointer-events: none; }
.pz-letter { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #E8EEF8; color: var(--navy); }
.pz-otext { font-size: 16.5px; }
.pz-opt:hover { border-color: #BFD3F0; }
/* two separate rules: a browser without :has() drops the whole rule it appears in */
.pz-opt.is-checked { border-color: var(--green); background: #EAF7F0; }
.pz-opt:has(input:checked) { border-color: var(--green); background: #EAF7F0; }
.pz-opt.is-checked .pz-letter { background: var(--green); color: #fff; }
.pz-opt:has(input:checked) .pz-letter { background: var(--green); color: #fff; }
.pz-opt:has(input:focus-visible) { box-shadow: 0 0 0 4px rgba(31,95,168,.2); }
.pz-nav { display: flex; justify-content: space-between; gap: 10px; margin: 16px 0; }
.pz-nav .pz-btn { flex: 1; }
.pz-palette { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 12px; background: #fff; border-radius: 16px; }
.pz-palette button { width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.pz-palette button.done { background: #E6F6EE; border-color: #9ED8BA; color: var(--green); }
.pz-palette button.here { outline: 3px solid var(--blue); outline-offset: 1px; color: var(--navy); }
.pz-saved { text-align: center; font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.pz-saved.ok { color: var(--green); } .pz-saved.bad { color: #B45309; }

/* ---------- result ---------- */
.pz-result { background: #fff; border-radius: 22px; padding: 26px 20px; text-align: center; margin-top: 10px; box-shadow: 0 8px 24px rgba(16,32,64,.06); }
.pz-result.pop { animation: pzPop .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes pzPop { from { transform: scale(.85); opacity: 0; } }
.pz-result-emoji { font-size: 56px; }
.pz-result h1 { margin: 4px 0 2px; font-size: 25px; color: var(--navy); }
.pz-ring { --p: 0; width: 150px; height: 150px; margin: 6px auto 18px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(currentColor calc(var(--p) * 1%), #E8EDF5 0); }
.pz-ring > div { width: 118px; height: 118px; border-radius: 50%; background: #fff; display: grid; place-content: center; }
.pz-ring b { font-size: 28px; color: var(--ink); }
.pz-ring span { font-size: 14px; color: var(--muted); }
.pz-ring.pz-good, .pz-ring.pz-ok, .pz-ring.pz-low { background-color: transparent; }
.pz-rev { background: #fff; border-radius: 16px; padding: 14px; margin-bottom: 10px; border-left: 5px solid var(--green2); }
.pz-rev.r-bad { border-left-color: var(--red); }
.pz-rev-q { font-weight: 600; margin: 6px 0 8px; }
.pz-rev-o { padding: 8px 12px; border-radius: 10px; margin-bottom: 6px; background: #F6F8FB; font-size: 14.5px; }
.pz-rev-o small { float: right; font-size: 11.5px; font-weight: 700; }
.pz-rev-o.is-correct { background: #E6F6EE; color: var(--green); font-weight: 700; }
.pz-rev-o.is-wrong { background: #FDECEC; color: #B42318; text-decoration: line-through; }
.pz-rev-skip { font-size: 13px; color: #B45309; }

@media (min-width: 700px) {
  .pz-opts { grid-template-columns: 1fr 1fr; }
  .pz-qtext { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
