/* Student pages on the public theme: quiz, result, ranks, reading, certificate. */
.ptg-theme-page { }
.ptg-theme-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.ptg-theme-actions--top { margin-top: 0; margin-bottom: 28px; }
.ptg-theme-note { margin: 0; color: var(--text2, #555); }

.ptg-exam { position: relative; padding: 28px 0 10px; }
.ptg-exam__frame { display: flex; flex-direction: column; gap: 16px; }
.ptg-exam__toolbar {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center;
  padding: 18px 20px; background: var(--white, #fff); border: 1px solid var(--border, #e5e5e5); border-radius: 16px;
}
.ptg-exam__toolbar-copy h1 { margin: 4px 0 0; font-size: clamp(1.25rem, 2vw, 1.7rem); color: #14213D; }
.ptg-exam__eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fc8f0c; }
.ptg-exam__toolbar-meta { display: flex; align-items: center; gap: 12px; }
.ptg-exam__save { font-size: 13px; font-weight: 700; color: #64748b; }
.ptg-exam__save.is-ok { color: #047857; }
.ptg-exam__save.is-pending { color: #b45309; }
.ptg-exam__save.is-err { color: #b91c1c; }
.ptg-timer {
  font-weight: 800; font-size: 1.35rem; color: #14213D; background: #F4F1DE;
  border: 1px solid var(--border, #e5e5e5); border-radius: 12px; padding: 8px 14px; min-width: 92px; text-align: center;
}
.ptg-timer.is-urgent { background: #FFF4E0; border-color: #fc8f0c; color: #9a3412; }
.ptg-quiz-progress { height: 8px; background: #e8eef5; border-radius: 99px; overflow: hidden; }
.ptg-quiz-progress__fill { height: 100%; width: 0; background: linear-gradient(90deg, #14213D, #fc8f0c); border-radius: 99px; }
.ptg-exam__shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; }
.ptg-exam__palette, .ptg-exam__card {
  background: var(--white, #fff); border: 1px solid var(--border, #e5e5e5); border-radius: 16px;
}
.ptg-exam__palette { padding: 16px; position: sticky; top: 110px; }
.ptg-exam__palette-head, .ptg-exam__summary-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ptg-exam__palette-head { margin-bottom: 12px; color: #14213D; }
.ptg-exam__palette-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.ptg-exam__qbtn {
  height: 36px; border-radius: 8px; border: 1px solid var(--border, #e5e5e5); background: #fff; color: #14213D; font-weight: 700;
}
.ptg-exam__qbtn.is-current { background: #14213D; color: #fff; border-color: #14213D; }
.ptg-exam__qbtn.is-answered:not(.is-current) { background: #ecfdf5; border-color: #86efac; color: #047857; }
.ptg-exam__legend { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; font-size: 12px; color: #555; }
.ptg-exam__legend span { width: 12px; height: 12px; border-radius: 4px; display: inline-block; margin-right: 4px; border: 1px solid #cbd5e1; vertical-align: -1px; }
.ptg-exam__legend .is-current { background: #14213D; border-color: #14213D; }
.ptg-exam__legend .is-answered { background: #ecfdf5; border-color: #86efac; }
.ptg-exam__summary { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border, #e5e5e5); }
.ptg-exam__summary-row strong { color: #14213D; }
.ptg-exam__notes { margin-top: 14px; }
.ptg-exam__notes h3 { font-size: 14px; margin: 0 0 8px; color: #14213D; }
.ptg-exam__notes ul { margin: 0; padding-left: 18px; color: #555; font-size: 13px; }
.ptg-exam__card { padding: 22px; }
.ptg-exam__qmeta { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.ptg-exam__badge, .ptg-exam__marks {
  font-size: 12px; font-weight: 700; border-radius: 999px; padding: 4px 10px; background: #F4F1DE; color: #14213D;
}
.ptg-exam__card h2 { margin: 0; font-size: clamp(1.15rem, 2vw, 1.45rem); color: #14213D; line-height: 1.4; }
.ptg-exam__note, .ptg-exam__empty { color: #555; margin: 8px 0 0; }
.ptg-quiz-answer { display: grid; gap: 12px; margin-top: 18px; }
.ptg-quiz-option {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center;
  border: 1.5px solid var(--border, #e5e5e5); border-radius: 14px; padding: 14px 16px; cursor: pointer; background: #fff;
}
.ptg-quiz-option:hover { border-color: #fc8f0c; }
.ptg-quiz-option input { position: absolute; opacity: 0; pointer-events: none; }
.ptg-quiz-option__key {
  width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center;
  background: #F4F1DE; color: #14213D; font-weight: 800;
}
.ptg-quiz-option.is-selected { border-color: #14213D; background: #F4F1DE; }
.ptg-quiz-option.is-selected .ptg-quiz-option__key { background: #fc8f0c; color: #fff; }
.ptg-quiz-option__img { max-width: 100%; max-height: 160px; object-fit: contain; border-radius: 8px; }
.ptg-quiz-nav { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.ptg-quiz-nav__spacer { flex: 1; }
.ptg-exam .ptg-btn, .ptg-theme-page .theme-btn, .ptg-theme-page .btn-two {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 8px; padding: 10px 16px;
  background: #14213D; color: #fff; border: 0; font-weight: 700; text-decoration: none; cursor: pointer;
}
.ptg-exam .ptg-btn--ghost, .ptg-theme-page .theme-btn { background: #fc8f0c; }
.ptg-quiz-field { display: grid; gap: 6px; }
.ptg-quiz-field--match { grid-template-columns: 1fr 1fr; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border, #e5e5e5); border-radius: 12px; }
.ptg-quiz-input, .ptg-quiz-order__row {
  width: 100%; border: 1px solid var(--border, #e5e5e5); border-radius: 10px; padding: 10px 12px; background: #fff;
}
.ptg-quiz-order { display: grid; gap: 8px; }
.ptg-quiz-order__row { display: flex; align-items: center; gap: 10px; }
.ptg-quiz-order__actions { margin-left: auto; display: flex; gap: 6px; }
.ptg-quiz-order__btn { border: 1px solid var(--border, #e5e5e5); background: #fff; border-radius: 8px; width: 32px; height: 32px; }
.ptg-passage { margin: 0 0 16px; padding: 14px 16px; border-radius: 12px; background: #F4F1DE; }
.ptg-passage__text { margin: 0; white-space: pre-wrap; }
.ptg-passage audio, .ptg-quiz-media__item audio { width: 100%; }
.ptg-exam__submitting {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
  background: rgba(20, 33, 61, .45); padding: 20px;
}
.ptg-exam__submitting[hidden] { display: none !important; }
.ptg-exam__submitting-card { background: #fff; border-radius: 16px; padding: 24px; text-align: center; max-width: 320px; }
.ptg-exam__spinner {
  display: inline-block; width: 32px; height: 32px; border: 3px solid #e2e8f0; border-top-color: #fc8f0c; border-radius: 50%;
  animation: ptg-quiz-spin .7s linear infinite;
}
#btnSubmit .ptg-exam__spinner { width: 16px; height: 16px; border-width: 2px; }
@keyframes ptg-quiz-spin { to { transform: rotate(360deg); } }
.ptg-exam.is-submitting .ptg-exam__frame { pointer-events: none; }
@media (max-width: 991px) {
  .ptg-exam__shell { grid-template-columns: 1fr; }
  .ptg-exam__palette { position: static; }
  .ptg-quiz-field--match { grid-template-columns: 1fr; }
}

.ptg-result-hero {
  background: #14213D; color: #fff; border-radius: 18px; padding: 28px 24px; margin-bottom: 24px;
}
.ptg-result-hero h1 { color: #fff; margin: 8px 0; }
.ptg-result-hero p { color: rgba(255,255,255,.82); margin: 0; }
.ptg-result-kicker { color: #fc8f0c; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 13px; }
.ptg-result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.ptg-result-stat { background: rgba(255,255,255,.08); border-radius: 12px; padding: 12px 14px; }
.ptg-result-stat span { display: block; font-size: 12px; color: rgba(255,255,255,.7); }
.ptg-result-stat strong { font-size: 1.4rem; }
.ptg-theme-table { width: 100%; border-collapse: collapse; }
.ptg-theme-table th, .ptg-theme-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border, #e5e5e5); }
.ptg-theme-table th { font-size: 13px; color: #14213D; }
.ptg-theme-panel { background: #fff; border: 1px solid var(--border, #e5e5e5); border-radius: 16px; padding: 18px 18px 8px; margin-bottom: 16px; }
.ptg-theme-panel h2 { margin: 0 0 12px; font-size: 1.25rem; color: #14213D; }
@media (max-width: 767px) { .ptg-result-stats { grid-template-columns: 1fr; } }

.ptg-board-filters { display: grid; grid-template-columns: repeat(2, minmax(12rem, 18rem)); gap: 16px; margin-bottom: 18px; }
.ptg-board-filters label { display: grid; gap: 6px; font-weight: 700; color: #14213D; }
.ptg-board__rank { display: inline-flex; min-width: 42px; justify-content: center; border-radius: 999px; padding: 4px 8px; font-weight: 800; background: #F4F1DE; }
.ptg-board__rank.is-1 { background: #FFF4E0; color: #9a3412; }
.ptg-board__rank.is-2 { background: #E8EAF0; color: #14213D; }
.ptg-board__rank.is-3 { background: #fff7ed; color: #9a3412; }
.ptg-board__status { font-size: 12px; font-weight: 700; }
.ptg-board__status.is-pass { color: #047857; }
.ptg-board__empty { padding: 28px 8px 20px; text-align: center; }
.ptg-board__loading { opacity: .55; pointer-events: none; }
@media (max-width: 767px) { .ptg-board-filters { grid-template-columns: 1fr; } }

.ptg-reader__frame, .ptg-reader__image { width: 100%; min-height: 70vh; border: 1px solid var(--border, #e5e5e5); border-radius: 16px; background: #fff; }
.ptg-reader__image { object-fit: contain; min-height: 0; height: auto; }

.ptg-deed { width: min(100%, 52rem); margin: 0 auto 20px; background: #fff; border-radius: 8px; box-shadow: 0 22px 50px rgba(20, 33, 61, .12); }
.ptg-deed__frame { margin: 14px; padding: 22px; border: 2px solid #14213D; outline: 1px solid #fc8f0c; outline-offset: 6px; position: relative; }
.ptg-deed__split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-bottom: 16px; border-bottom: 1px solid #e6e8ee; }
.ptg-deed__side { min-width: 0; padding: 0; background: transparent; border: 0; }
.ptg-deed__side--brand { text-align: right; }
.ptg-deed__kicker { margin: 0 0 8px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #fc8f0c; }
.ptg-deed__mark { display: flex; gap: 12px; align-items: flex-start; }
.ptg-deed__side--brand .ptg-deed__mark { flex-direction: row-reverse; justify-content: flex-end; }
.ptg-deed__mark img { width: 56px; height: 56px; object-fit: contain; background: transparent; flex-shrink: 0; }
.ptg-deed__mark strong { display: block; color: #14213D; font-size: 16px; line-height: 1.3; }
.ptg-deed__mark span { display: block; margin-top: 3px; font-size: 12px; color: #64748b; line-height: 1.35; word-break: break-word; }
.ptg-deed__title { text-align: center; padding: 18px 0 6px; }
.ptg-deed__title h1 { margin: 6px 0; color: #14213D; }
.ptg-deed__eyebrow { letter-spacing: .12em; color: #fc8f0c; font-weight: 800; font-size: 12px; margin: 0; }
.ptg-deed__seal-line { margin: 0; color: #64748b; font-size: 14px; }
.ptg-deed__block { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #e6e8ee; }
.ptg-deed__block h2 { font-size: 12px; margin: 0 0 8px; letter-spacing: .08em; text-transform: uppercase; color: #14213D; }
.ptg-deed__block dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: 0; }
.ptg-deed__block dl > div { display: grid; grid-template-columns: 7.2rem minmax(0, 1fr); gap: 6px; }
.ptg-deed__block dt { font-size: 12px; color: #64748b; margin: 0; }
.ptg-deed__block dd { margin: 0; color: #14213D; font-weight: 700; }
.ptg-deed__name { font-size: 1.15rem; }
.ptg-deed__seals { display: grid; grid-template-columns: 1fr 1fr 1.1fr; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 2px solid #14213D; }
.ptg-deed__seal { text-align: center; }
.ptg-deed__seal-art { height: 78px; display: flex; align-items: flex-end; justify-content: center; margin-bottom: 6px; border-bottom: 1px solid #14213D; }
.ptg-deed__seal-art img { max-width: 120px; max-height: 72px; object-fit: contain; }
.ptg-deed__seal strong { display: block; color: #14213D; font-size: 13px; }
.ptg-deed__seal span { display: block; color: #64748b; font-size: 11px; }
.ptg-deed__qr { width: 88px; height: 88px; object-fit: contain; }
.ptg-deed__qr--svg { width: 88px; height: 88px; margin: 0 auto; }
.ptg-deed__qr--svg svg { width: 100%; height: 100%; }
.ptg-deed__id { word-break: break-all; }
.ptg-deed__motto { margin: 12px 0 0; text-align: center; color: #64748b; font-size: 12px; }
@media (max-width: 720px) {
  .ptg-deed__split, .ptg-deed__seals, .ptg-deed__block dl, .ptg-deed__block dl > div { grid-template-columns: 1fr; }
  .ptg-deed__side--brand, .ptg-deed__side--brand .ptg-deed__mark { text-align: left; flex-direction: row; }
}
.ptg-verify-banner { background: #ecfdf5; color: #047857; border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; font-weight: 700; }
@media print {
  header, footer, .instagram, .ptg-theme-actions, .progress-wrap, .preloader-modern { display: none !important; }
  .ptg-deed { box-shadow: none; }
}
