/* ==========================================
   PYQ STYLESHEET (pyq.css)
   ========================================== */

.exam-wrapper{
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto;
  padding: 0 6px !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #111827;
  box-sizing: border-box;
}
.exam-wrapper *, .exam-wrapper *:before, .exam-wrapper *:after {
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .exam-wrapper {
    margin: 0 auto !important;
    padding: 0 6px !important;
  }
}

/* ==========================================
   HEADER LOOK (Like Mock Test)
========================================== */
.sp-page-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
  padding: 0 4px 10px;
  border-bottom: 2px solid #e2e8f0;
}

.sp-page-header-left{
  flex: 1;
  min-width: 0;
}

.sp-page-title{
  font-size: 24px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.1;
}

@media (min-width: 768px) {
  .sp-page-title {
    font-size: 30px;
  }
}

.sp-page-subtitle{
  margin-top: 4px;
  font-size: 13px;
  color: #64748b;
}

.sp-page-header-logo{
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .sp-page-header-logo {
    width: 64px;
    height: 64px;
  }
}

.sp-page-header-logo img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

/* =========================================================
   PYQ HERO — CLEAN RESPONSIVE SYSTEM
   ========================================================= */

.pyq-hero-single-box {

    background:
        radial-gradient(
            circle at 72% 35%,
            rgba(59,130,246,.08),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            #FAFCFF 0%,
            #EEF5FF 55%,
            #F8FBFF 100%
        );

    border: 1px solid rgba(37,99,235,.10);

    box-shadow:
        0 12px 35px rgba(37,99,235,.08);

    border-radius: 20px;
    padding: 20px 16px;
    margin-bottom: 24px;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 110px)
        minmax(0, 180px)
        minmax(0, 280px);

    gap: 20px;
    align-items: center;

    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}


/* =========================================================
   HERO CHILDREN
   ========================================================= */

.pyq-hero-single-box > * {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}


/* =========================================================
   HERO CONTENT
   ========================================================= */

.pyq-hero-content-area {
    min-width: 0;
    max-width: 100%;
}


/* =========================================================
   CENTER ILLUSTRATION
   ========================================================= */

.pyq-hero-center-illustration {
    width: 200px;
    height: 180px;
    min-width: 200px;
    min-height: 180px;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    flex-shrink: 0;
    box-sizing: border-box;
}

.pyq-hero-center-illustration img {
    display: block;

    width: 200px;
    height: 180px;

    max-width: 200px;
    max-height: 180px;

    object-fit: contain;
}


/* =========================================================
   EXTRA ILLUSTRATION
   ========================================================= */

.pyq-hero-extra-illustration {
    width: 110px;
    height: 100px;
    min-width: 110px;
    min-height: 100px;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    flex-shrink: 0;
    box-sizing: border-box;
}

.pyq-hero-extra-illustration img {
    display: block;

    width: 110px;
    height: 100px;

    max-width: 110px;
    max-height: 100px;

    object-fit: contain;
}


/* =========================================================
   LARGE DESKTOP
   ========================================================= */

@media (min-width: 1101px) {

    .pyq-hero-single-box {
        padding: 28px 32px;
        border-radius: 24px;

        grid-template-columns:
            minmax(0, 1.2fr)
            minmax(0, 100px)
            minmax(0, 180px)
            minmax(0, 280px);

        gap: 20px;
    }

}


/* =========================================================
   TABLET / SMALL DESKTOP
   1051px – 1100px
   ========================================================= */

@media (min-width: 1051px) and (max-width: 1100px) {

    .pyq-hero-single-box {
        padding: 20px 18px;

        grid-template-columns:
            minmax(0, 1fr)
            90px
            150px
            240px;

        gap: 14px;
    }

    .pyq-hero-center-illustration {
        width: 150px;
        height: 150px;
        min-width: 150px;
        min-height: 150px;
    }

    .pyq-hero-center-illustration img {
        width: 150px;
        height: 150px;
        max-width: 150px;
        max-height: 150px;
    }

    .pyq-hero-extra-illustration {
        width: 90px;
        height: 90px;
        min-width: 90px;
        min-height: 90px;
    }

    .pyq-hero-extra-illustration img {
        width: 90px;
        height: 90px;
        max-width: 90px;
        max-height: 90px;
    }

}


/* =========================================================
   RESPONSIVE
   1050px AND BELOW
   ========================================================= */

@media (max-width: 1050px) {

    .pyq-hero-single-box {
        display: flex;
        flex-direction: column;
        align-items: stretch;

        text-align: left !important;

        padding: 18px 14px !important;
        gap: 14px !important;

        position: relative;

        width: 100%;
        max-width: 100%;

        box-sizing: border-box;
        overflow: hidden;
    }


    /* MAIN CONTENT */

    .pyq-hero-content-area {
        display: flex;
        flex-direction: column;

        align-items: flex-start !important;
        text-align: left !important;

        width: 100%;
        min-width: 0;
    }


    /* STATS */

    .pyq-stats-grid {
        display: grid !important;

        grid-template-columns:
            repeat(3, minmax(0, 1fr)) !important;

        gap: 6px !important;

        width: 100% !important;
        justify-content: stretch !important;
    }

    .pyq-stats-grid > div {
        width: 100% !important;
        min-width: 0;

        justify-content: flex-start !important;
        padding: 6px 4px !important;

        box-sizing: border-box;
    }


    /* EXTRA ILLUSTRATION */

    .pyq-hero-extra-illustration {
        display: none !important;
    }


    /* MAIN ILLUSTRATION */

    .pyq-hero-center-illustration {
        position: absolute !important;

        top: 42px !important;
        right: 10px !important;

        width: 100px !important;
        height: 100px !important;

        min-width: 100px !important;
        min-height: 100px !important;

        display: flex !important;

        align-items: center;
        justify-content: center;

        z-index: 1;
        pointer-events: none;
    }

    .pyq-hero-center-illustration img {
        display: block;

        width: 100px !important;
        height: 100px !important;

        max-width: 100px !important;
        max-height: 100px !important;

        object-fit: contain;
    }


    /* WHY PRACTICE BOX */

    .pyq-mobile-hide-box {
        display: none !important;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .pyq-hero-single-box {
        padding: 16px 12px !important;
        gap: 12px !important;
        border-radius: 16px;
    }

    .pyq-hero-center-illustration {
        top: 38px !important;
        right: 8px !important;

        width: 82px !important;
        height: 82px !important;

        min-width: 82px !important;
        min-height: 82px !important;
    }

    .pyq-hero-center-illustration img {
        width: 82px !important;
        height: 82px !important;

        max-width: 82px !important;
        max-height: 82px !important;
    }

    .pyq-stats-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr)) !important;

        gap: 5px !important;
    }

    .pyq-stats-grid > div {
        padding: 5px 3px !important;
    }

}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {

    .pyq-hero-single-box {
        padding: 14px 10px !important;
    }

    .pyq-hero-center-illustration {
        width: 70px !important;
        height: 70px !important;

        min-width: 70px !important;
        min-height: 70px !important;

        top: 34px !important;
        right: 6px !important;
    }

    .pyq-hero-center-illustration img {
        width: 70px !important;
        height: 70px !important;

        max-width: 70px !important;
        max-height: 70px !important;
    }

}


/* =========================================================
   PYQ STATS BASE
   ========================================================= */

.pyq-stats-grid {
    display: flex;
    gap: 8px;
    width: 100%;
    flex-wrap: wrap;
}


.sp-folder-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  width: 100%;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .sp-folder-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
  }
}

.exam-card-item {
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  position: relative;
}

@media (min-width: 768px) {
  .exam-card-item {
    border-radius: 20px;
    padding: 20px;
  }
}

.exam-card-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}

.exam-inner-box {
  background: #ffffff;
  padding: 7px 4px;
  border-radius: 8px;
  text-align: center;
}

.pyq-print-wrap{
  max-width:950px;
  margin:0 auto 32px;
}

.print-page{
  position:relative;
  isolation:isolate;
  width:100%;
  background:#fff;
  border:1px solid #d1d5db;
  border-radius:16px;
  padding:28px 22px 26px;
  box-shadow:0 10px 30px rgba(0,0,0,.05);
  overflow:hidden;
}

.download-float{
  position:absolute;
  top:16px;
  right:16px;
  z-index:20;
}

.toolbar-btn{
  appearance:none;
  border:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:10px 16px;
  border-radius:10px;
  font-size:14px;
  font-weight:700;
  background:#111;
  color:#fff;
  cursor:pointer;
  box-shadow:0 8px 20px rgba(0,0,0,.12);
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  white-space:nowrap;
}

.toolbar-btn:hover{
  background:#000;
  transform:translateY(-1px);
  box-shadow:0 10px 24px rgba(0,0,0,.16);
}

.watermark-layer{
  display:none;
}

.print-content{
  position:relative;
  z-index:2;
}

.paper-header{
  text-align:center;
  border-bottom:2px solid #111827;
  padding:0 0 16px;
  margin-bottom:16px;
}

.paper-header-inner{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
}

.paper-logo-wrap{
  display:flex;
  align-items:center;
  justify-content:center;
}

.paper-logo{
  width:50px;
  height:50px;
  object-fit:contain;
  display:block;
}

.paper-header-text{
  text-align:center;
}

.paper-title{
  margin:0;
  font-size:24px;
  line-height:1.25;
  font-weight:800;
  color:#111827;
  letter-spacing:.2px;
}

.paper-brand{
  margin-top:8px;
  font-size:11px;
  font-weight:800;
  color:#111827;
  text-transform:uppercase;
  letter-spacing:6px;
  word-spacing:4px;
  line-height:1.6;
  opacity:.92;
}

.paper-subject{
  margin-top:8px;
  font-size:14px;
  font-weight:700;
  color:#374151;
  letter-spacing:1px;
  line-height:1.4;
}

.paper-set{
  margin-top:10px;
  display:inline-block;
  font-size:12px;
  font-weight:700;
  color:#374151;
  border:1px solid #d1d5db;
  padding:5px 12px;
  border-radius:999px;
  background:#f9fafb;
}

.paper-meta-table{
  width:100%;
  border-collapse:collapse;
  margin-bottom:14px;
  table-layout:fixed;
}

.paper-meta-table td{
  border:1px solid #d1d5db;
  padding:10px 12px;
  font-size:13px;
  line-height:1.5;
  vertical-align:top;
  color:#111827;
}

.paper-instructions{
  border:1px dashed #cbd5e1;
  background:#fcfcfc;
  padding:12px 14px;
  margin-bottom:16px;
  border-radius:8px;
}

.paper-instructions-title{
  font-size:14px;
  font-weight:800;
  margin-bottom:8px;
  color:#111827;
}

.paper-instructions ul{
  margin:0;
  padding-left:18px;
}

.paper-instructions li{
  font-size:13px;
  line-height:1.6;
  margin-bottom:4px;
}

.question-section-divider{
  height:1px;
  width:100%;
  background:#000;
  margin:16px 0 18px;
}

.question-list{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.question-box{
  margin-bottom:0;
  break-inside:avoid;
  page-break-inside:avoid;
  background:#ffffff;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:16px 16px 14px;
  box-shadow:0 2px 8px rgba(0,0,0,.04);
  position:relative;
  overflow:hidden;
}

/* =========================================================
   QUESTION + SOLUTION WATERMARKS
   Each area owns its own watermark, so opening the solution
   never moves the question watermark.
   ========================================================= */

.question-main-content{
  position:relative;
}

.question-watermark,
.solution-watermark{
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%, -50%) rotate(-28deg);
  font-size:28px;
  font-weight:800;
  color:rgba(0,0,0,.05);
  white-space:nowrap;
  pointer-events:none;
  user-select:none;
  z-index:4;
}

.solution-content{
  position:relative;
}

.solution-inner-content{
  position:relative;
  z-index:2;
}

.solution-watermark{
  z-index:1;
}

.score-fx-layer{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:20;
  overflow:visible;
}

.score-fx{
  position:absolute;
  left:0;
  top:0;
  z-index:30;

  padding:7px 12px;
  border-radius:999px;
  font-size:13px;
  font-weight:800;
  line-height:1;

  opacity:0;
  transform:translate(-50%, -50%) translateY(8px) scale(.96);
  will-change:transform,opacity;

  box-shadow:0 10px 24px rgba(0,0,0,.08);
}

.score-fx.is-positive{
  color:#166534;
  background:rgba(34,197,94,.12);
  border:1px solid rgba(34,197,94,.35);
}

.score-fx.is-negative{
  color:#b91c1c;
  background:rgba(239,68,68,.12);
  border:1px solid rgba(239,68,68,.32);
}

.score-fx.show{
  animation:scoreFloatUp 900ms cubic-bezier(.16,1,.3,1) forwards;
}

@keyframes scoreFloatUp{
  0%{ opacity:0; transform:translate(-50%, -50%) translateY(10px) scale(.95); }
  15%{ opacity:1; transform:translate(-50%, -50%) translateY(0) scale(1); }
  75%{ opacity:1; transform:translate(-50%, -50%) translateY(-16px) scale(1); }
  100%{ opacity:0; transform:translate(-50%, -50%) translateY(-24px) scale(1.02); }
}

.q-topline,
.q-text,
.question-image-wrap,
.options-wrap{
  position:relative;
  z-index:2;
}

.q-topline{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-start;
  align-items:center;
  gap:8px;
  margin-bottom:10px;
  padding-left:6px;
}

.q-number{
  font-weight:800;
  margin-right:2px;
}

.q-badge{
  display:inline-flex;
  align-items:center;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid #d1d5db;
  background:#f9fafb;
  color:#374151;
  font-size:12px;
  font-weight:700;
  line-height:1;
}

.q-badge.marks{
  background:#ecfdf5;
  border-color:#86efac;
  color:#166534;
}

.negative-inline{
  color:#dc2626;
  font-weight:800;
}

.q-badge.pyq-badge{
  margin-left:auto;
  background:transparent !important;
  border:none !important;
  white-space:nowrap;
  text-align:right;
  padding:0 !important;
  color:#7f1d1d !important;
  font-size:13px;
  font-weight:800;
  letter-spacing:.3px;
}

.q-text{
  font-size:15px;
  line-height:1.75;
  font-weight:600;
  color:#111827;
  margin-bottom:12px;
  padding-left:6px;
}

.question-image{
  height:auto;
  max-width:100%;
  width:auto;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:6px;
  background:transparent;
  display:block;
  margin:0 auto;
}

.img-small{
  max-width:120px !important;
  width:auto !important;
}

.img-medium{
  max-width:220px !important;
  width:auto !important;
}

.img-large{
  max-width:320px !important;
  width:auto !important;
}

.question-image-wrap{
  margin:12px 0 14px;
  text-align:center;
  max-width:100%;
  overflow:hidden;
  padding-left:6px;
}

.options-wrap{
  padding-left:6px;
}

.options{
  display:grid;
  gap:10px;
}

.option{
  position:relative;
  z-index:2;
  min-height:44px;
  width:100%;
  text-align:left;
  overflow:hidden;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-radius:10px;
  border:1px solid #e5e7eb;
  background:#fff;
  color:#111827;
  cursor:pointer;
  font-size:14px;
  line-height:1.5;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.option:hover{
  background:#f9fafb;
  border-color:#d1d5db;
  box-shadow:0 2px 6px rgba(0,0,0,.05);
  transform:none;
}

.option:focus-visible{
  outline:none;
  border-color:#111;
  box-shadow:0 0 0 3px rgba(0,0,0,.10);
}

.option.selected{
  background:#f5f5f5;
  border-color:#6b7280;
  color:#111827;
}

.opt-indicator{
  width:22px;
  height:22px;
  min-width:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:13px;
  font-weight:700;
  line-height:22px;
  text-align:center;
  border:1.2px solid #cbd5e1;
  border-radius:50%;
  background:#fff;
  color:#374151;
}

.option.is-mcq .opt-indicator{
  border-radius:999px;
}

.option.is-msq .opt-indicator{
  border-radius:6px;
}

.option:hover .opt-indicator{
  border-color:#111;
  color:#111;
}

.option.is-msq.selected .opt-indicator,
.option.selected .opt-indicator{
  background:#6b7280;
  border-color:#6b7280;
  box-shadow:none;
}

.option.selected .opt-indicator,
.option.correct .opt-indicator,
.option.wrong .opt-indicator{
  color:#fff !important;
}

.opt-content{
  flex:1;
  display:block;
}

.opt-content img{
  display:inline-block;
  vertical-align:middle;
  width:auto;
  height:auto;
  margin-left:6px;
  border:none;
  padding:0;
  background:transparent;
}

.opt-content img.img-small{
  max-width:150px;
}

.opt-content img.img-medium{
  max-width:220px;
}

.opt-content img.img-large{
  max-width:320px;
}

.numerical-box{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:10px;
  position:relative;
  z-index:2;
}

.numerical-input{
  flex:1 1 220px;
  min-height:42px;
  padding:10px 12px;
  border:1px solid #d1d5db;
  border-radius:10px;
  font-size:14px;
  outline:none;
  background:#fff;
  color:#111827;
}

.numerical-input:focus{
  border-color:#111;
  box-shadow:0 0 0 3px rgba(0,0,0,.10);
}

.check-numerical-btn,
.check-msq-btn{
  appearance:none;
  border:1px solid #d1d5db;
  min-height:40px;
  padding:9px 16px;
  border-radius:8px;
  background:#f3f4f6;
  color:#111827;
  font-size:13.5px;
  font-weight:600;
  cursor:pointer;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  position:relative;
  z-index:2;
}

.check-numerical-btn:hover,
.check-msq-btn:hover{
  background:#e5e7eb;
}

.check-numerical-btn:active,
.check-msq-btn:active{
  transform:scale(0.97);
}

.numerical-result,
.msq-result{
  width:100%;
  font-size:13px;
  font-weight:700;
  margin-top:6px;
  position:relative;
  z-index:2;
  padding:8px 10px;
  border-radius:10px;
  display:none;
}

.numerical-result.show,
.msq-result.show{
  display:block;
}

.numerical-result.success,
.msq-result.success{
  background:#ecfdf5;
  color:#166534;
  border:1px solid #86efac;
}

.numerical-result.error,
.msq-result.error{
  background:#fef2f2;
  color:#991b1b;
  border:1px solid #fecaca;
}

.answer-box{
  margin-top:36px;
  padding:20px 22px;
  border-radius:16px;
  background:#f8fafc;
  border:1.5px solid #e2e8f0;
  box-shadow:0 12px 28px rgba(0,0,0,.06);
  break-inside:avoid;
  page-break-inside:avoid;
}

.answer-box-title{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-bottom:14px;
  padding:7px 14px;
  border-radius:999px;
  background:#6366f1;
  color:#fff;
  font-size:12px;
  font-weight:800;
  letter-spacing:.4px;
  text-transform:uppercase;
  box-shadow:0 4px 10px rgba(99,102,241,.25);
}

.answer-box-title::before{
  content:"✓";
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  border-radius:999px;
  background:#fff;
  color:#6366f1;
  font-size:11px;
  font-weight:900;
}

.answer-key-list{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.answer-chip{
  display:inline-flex;
  align-items:center;
  padding:7px 12px;
  border-radius:999px;
  background:#ffffff;
  border:1px solid #e2e8f0;
  color:#0f172a;
  font-size:13px;
  font-weight:700;
  line-height:1.2;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.answer-chip:hover{
  background:#eef2ff;
  border-color:#c7d2fe;
  transform:translateY(-1px);
}

.answer-chip strong{
  color:#4338ca;
  margin-right:4px;
}

.correct{
  background:#ecfdf5 !important;
  border-color:#22c55e !important;
  color:#166534 !important;
  box-shadow:0 8px 18px rgba(34,197,94,.10) !important;
}

.correct:hover{
  background:#ecfdf5 !important;
  border-color:#22c55e !important;
  color:#166534 !important;
  transform:none !important;
}

.correct .opt-indicator{
  background:#16a34a !important;
  border:2px solid #fff !important;
  box-shadow:0 0 0 2px #16a34a;
  color:#fff !important;
}

.solution-correct{
  background:#ede9fe !important;
  border-color:#a78bfa !important;
  color:#5b21b6 !important;
  box-shadow:0 8px 18px rgba(124,58,237,.10) !important;
}

.solution-correct:hover{
  background:#ede9fe !important;
  border-color:#a78bfa !important;
  color:#5b21b6 !important;
  transform:none !important;
}

.solution-correct .opt-indicator{
  background:#7c3aed !important;
  border:2px solid #fff !important;
  box-shadow:0 0 0 2px #7c3aed;
  color:#fff !important;
}

.wrong{
  background:#fef2f2 !important;
  border-color:#ef4444 !important;
  color:#991b1b !important;
  box-shadow:0 8px 18px rgba(239,68,68,.08) !important;
}

.wrong:hover{
  background:#fef2f2 !important;
  border-color:#ef4444 !important;
  color:#991b1b !important;
  transform:none !important;
}

.wrong .opt-indicator{
  background:#dc2626 !important;
  border:2px solid #fff !important;
  box-shadow:0 0 0 2px #dc2626;
  color:#fff !important;
}

.option:disabled{
  cursor:not-allowed;
  opacity:1;
}

.option:disabled:hover{
  transform:none;
}

.check-msq-btn:disabled,
.check-numerical-btn:disabled,
.numerical-input:disabled{
  cursor:not-allowed;
  opacity:.95;
}

.question-box.active-solution{
  border-color:#c4b5fd !important;
  background:#f8f7ff;
}

.question-box.active-solution .question-image{
  background:transparent !important;
  border:none !important;
  box-shadow:none !important;
  filter:inherit !important;
}

.question-box.active-solution .option:not(.correct):not(.wrong){
  background:#faf5ff;
  border-color:#ddd6fe;
}

.question-box.active-solution .option.selected{
  background:#ede9fe;
  border-color:#a78bfa;
  color:#111827;
}

.question-box.active-solution .option.selected .opt-indicator{
  background:#7c3aed;
  border-color:#7c3aed;
  color:#fff;
}

.question-box.active-solution .opt-indicator{
  border-color:#c4b5fd;
}

.question-box.active-solution .option:not(.selected):not(.correct):not(.wrong):hover{
  background:#f3e8ff;
  border-color:#c4b5fd;
}

.question-box.active-solution .option:not(.selected):not(.correct):not(.wrong):hover .opt-indicator{
  border-color:#6d28d9;
  color:#6d28d9;
}

.question-box:nth-child(6n+1){ border-color:#bfdbfe; }
.question-box:nth-child(6n+2){ border-color:#bbf7d0; }
.question-box:nth-child(6n+3){ border-color:#fecaca; }
.question-box:nth-child(6n+4){ border-color:#fde68a; }
.question-box:nth-child(6n+5){ border-color:#ddd6fe; }
.question-box:nth-child(6n+6){ border-color:#a5f3fc; }

.solution-wrap{
  margin-top:14px;
  border-top:1px dashed #e5e7eb;
  padding-top:14px;
  display:flex;
  flex-direction:column;
  align-items:center;
}

.view-solution-btn{
  border:none;
  padding:7px 16px;
  border-radius:999px;
  cursor:pointer;
  font-size:13px;
  font-weight:600;
  letter-spacing:.2px;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
  background:#dcfce7;
  color:#166534;
  box-shadow:0 1px 2px rgba(0,0,0,.05);
}

.view-solution-btn:hover{
  background:#bbf7d0;
}

.view-solution-btn.active{
  background:#ede9fe !important;
  color:#5b21b6 !important;
}

.view-solution-btn.active:hover{
  background:#ddd6fe !important;
}

.solution-content{
  display:none;
  width:100%;
  max-width:100%;
  opacity:0;
  transform:translateY(-6px);
  transition: opacity .25s ease, transform .25s ease;
}

.solution-content.open{
  display:block;
  opacity:1;
  transform:translateY(0);
  margin-top:12px;
  padding:14px;
  background:#f0fdf4;
  border:1px solid #bbf7d0;
  border-radius:12px;
  line-height:1.75;
}

.solution-content.open .katex-display{
  overflow-x:auto;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  white-space:normal;
}

.solution-content.open .katex-display::-webkit-scrollbar{
  display:none;
}

.final-answer-line{
  margin-top:14px;
  padding-top:10px;
  border-top:1px dashed #bbf7d0;
  font-size:14px;
  font-weight:800;
  color:#166534;
}

.chapter-weightage-table{
  width:100%;
  border-collapse:collapse;
  margin-top:10px;
  font-size:14px;
}

.chapter-weightage-table th,
.chapter-weightage-table td{
  border:1px solid #d1d5db;
  padding:10px 12px;
  text-align:left;
}

.chapter-weightage-table th{
  background:#f3f4f6;
  font-weight:700;
}

.chapter-weightage-table tfoot td{
  background:#f9fafb;
  font-weight:700;
}

@media (max-width:768px){
  .sp-page-header{ gap:14px; margin-bottom:18px; }
  .sp-page-title{ font-size:26px; }
  .sp-page-subtitle{ font-size:13px; }
  .sp-page-header-logo{ width:58px; height:58px; }
  
  .sp-folder-grid{ grid-template-columns: 1fr; gap:12px; }
  .chapter-weightage-table{
    font-size:13px;
  }
  .chapter-weightage-table th,
  .chapter-weightage-table td{
    padding:8px 10px;
  }
}

@media (prefers-reduced-motion: reduce){
  .score-fx,
  .option,
  .toolbar-btn,
  .check-msq-btn,
  .check-numerical-btn{
    animation:none !important;
    transition:none !important;
  }

  .score-fx.show{
    animation:none !important;
    opacity:1 !important;
    transform:none !important;
  }
}

@media (max-width:768px){
  .print-page{
    padding:72px 2px 18px;
  }

  .download-float{
    top:12px;
    right:12px;
    left:12px;
  }

  .toolbar-btn{
    width:100%;
  }

  .paper-logo{
    width:42px;
    height:42px;
  }

  .paper-title{
    font-size:19px;
  }

  .paper-brand{
    font-size:10px;
    letter-spacing:4px;
    word-spacing:2px;
  }

  .paper-subject{
    font-size:13px;
  }

  .paper-meta-table td{
    display:block;
    width:100%;
  }

  .question-box{
    border-radius:14px;
    padding:14px 6px 12px;
  }

  .question-watermark,
  .solution-watermark{
    font-size:22px;
  }

  /* Score animation on mobile must stay at the click point.
     Do not combine the JS-calculated left position with right:0,
     otherwise the pill stretches across the question width. */
  .score-fx{
    right:auto !important;
    width:max-content !important;
    min-width:0 !important;
    max-width:max-content !important;
    padding:4px 7px !important;
    font-size:11px !important;
    line-height:1 !important;
    white-space:nowrap !important;
    border-radius:999px !important;
  }

  .option{
    padding:11px 10px;
    font-size:13px;
  }

  .numerical-input,
  .check-numerical-btn,
  .check-msq-btn{
    width:100%;
  }

  .answer-box{
    padding:14px 12px;
  }

  .answer-chip{
    font-size:12px;
  }
}

@media print{
  @page{
    size:A4;
    margin:16mm 12mm 18mm 12mm;
  }

  html,
  body{
    margin:0 !important;
    padding:0 !important;
    background:#fff !important;
  }

  body *{
    visibility:hidden;
  }

  .print-page,
  .print-page *{
    visibility:visible;
  }

  .print-page{
    position:relative !important;
    isolation:isolate !important;
    box-shadow:none !important;
    border:none !important;
    border-radius:0 !important;
    padding-top:8mm !important;
    padding-right:0 !important;
    padding-bottom:8mm !important;
    padding-left:0 !important;
    margin:0 !important;
    width:100% !important;
    max-width:none !important;
    overflow:visible !important;
    background:#fff !important;
  }

  .download-float,
  .toolbar-btn,
  .check-numerical-btn,
  .check-msq-btn,
  .numerical-result,
  .msq-result,
  .score-fx-layer{
    display:none !important;
  }

  .solution-content{
    display:none !important;
  }

  .solution-content.print-solution-enabled{
    display:block !important;
    opacity:1 !important;
    transform:none !important;
    margin-top:10px !important;
    padding:12px !important;
    background:#f0fdf4 !important;
    border:1px solid #bbf7d0 !important;
    border-radius:10px !important;
    line-height:1.7 !important;
  }

  .watermark-layer,
  .watermark-layer::before{
    display:none !important;
    content:none !important;
  }

  .print-content{
    position:relative !important;
    z-index:2 !important;
    background:transparent !important;
  }

  .site-header,
  .navbar,
  .top-header,
  .entry-header,
  .page-header,
  .breadcrumb,
  header.site-header,
  nav,
  footer{
    display:none !important;
  }

  .paper-header,
  .paper-meta-table,
  .paper-meta-table tr,
  .paper-meta-table td,
  .paper-instructions,
  .question-box,
  .options,
  .answer-box{
    break-inside:avoid !important;
    page-break-inside:avoid !important;
  }

  .question-section-divider{
    height:1px !important;
    background:#000 !important;
    margin:12px 0 14px !important;
  }

  .question-box{
    margin-bottom:10px !important;
    border:1px solid #cfcfcf !important;
    box-shadow:none !important;
    border-radius:10px !important;
    padding:12px 10px 10px !important;
    background:transparent !important;
  }

  .question-watermark,
  .solution-watermark{
    z-index:3 !important;
    color:rgba(0,0,0,.05) !important;
  }

  .q-topline,
  .q-text,
  .question-image-wrap,
  .options-wrap,
  .option,
  .numerical-box,
  .numerical-result{
    position:relative !important;
    z-index:2 !important;
  }

  .paper-meta-table td,
  .paper-instructions,
  .option,
  .answer-box,
  .numerical-input{
    box-shadow:none !important;
  }

  .answer-box{
    background:#f8fafc !important;
    border:1.5px solid #e2e8f0 !important;
    -webkit-print-color-adjust:exact !important;
    print-color-adjust:exact !important;
  }

  .answer-box-title{
    background:#6366f1 !important;
    color:#ffffff !important;
    border:1px solid #4f46e5 !important;
    -webkit-print-color-adjust:exact !important;
    print-color-adjust:exact !important;
  }

  .answer-box-title::before{
    background:#ffffff !important;
    color:#6366f1 !important;
    -webkit-print-color-adjust:exact !important;
    print-color-adjust:exact !important;
  }

  .answer-chip{
    display:inline-flex !important;
    align-items:center !important;
    padding:7px 12px !important;
    border-radius:999px !important;
    background:#eef2ff !important;
    border:1px solid #c7d2fe !important;
    color:#4338ca !important;
    font-size:13px !important;
    font-weight:700 !important;
    opacity:1 !important;
    box-shadow:none !important;
    -webkit-print-color-adjust:exact !important;
    print-color-adjust:exact !important;
  }

  .answer-chip strong{
    color:#312e81 !important;
    -webkit-print-color-adjust:exact !important;
    print-color-adjust:exact !important;
  }

  .option{
    color:#000 !important;
    border:1px solid #cfcfcf !important;
    transform:none !important;
  }

  .opt-indicator{
    border-color:#9ca3af !important;
    background:#fff !important;
    box-shadow:none !important;
  }

  .correct,
  .wrong{
    color:#000 !important;
    box-shadow:none !important;
  }

  .correct{
    background:rgba(34,197,94,.08) !important;
    border-color:#86efac !important;
    -webkit-print-color-adjust:exact !important;
    print-color-adjust:exact !important;
  }

  .wrong{
    background:rgba(239,68,68,.08) !important;
    border-color:#fca5a5 !important;
    -webkit-print-color-adjust:exact !important;
    print-color-adjust:exact !important;
  }

  .print-header-repeat{
    display:block !important;
    text-align:center !important;
    font-size:18px !important;
    font-weight:800 !important;
    color:#111827 !important;
    margin-bottom:12px !important;
    padding-bottom:10px !important;
    border-bottom:1px solid #111827 !important;
  }

  *{
    -webkit-print-color-adjust:exact !important;
    print-color-adjust:exact !important;
  }
}


























/* =========================================================
   DARK MODE - PYQ & DASHBOARD
   Premium Frosted Glass / Colored Glass Effect
   ========================================================= */

/* =========================================================
   HERO
   ========================================================= */

html.dark-mode .pyq-hero-single-box,
body.dark-mode .pyq-hero-single-box {
    background:
        radial-gradient(
            circle at 72% 35%,
            rgba(59, 130, 246, 0.16),
            transparent 34%
        ),
        linear-gradient(
            135deg,
            rgba(15, 23, 42, 0.92),
            rgba(15, 23, 42, 0.72),
            rgba(2, 6, 23, 0.92)
        ) !important;

    border: 1px solid rgba(255, 255, 255, 0.10) !important;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 18px 45px rgba(0, 0, 0, 0.28) !important;
}


html.dark-mode .pyq-hero-single-box h2 span,
body.dark-mode .pyq-hero-single-box h2 span {
    color: #f8fafc !important;
}


html.dark-mode .pyq-hero-single-box p,
html.dark-mode .pyq-hero-single-box div[style*="color:#475569"],
html.dark-mode .pyq-hero-single-box div[style*="color:#64748b"],
body.dark-mode .pyq-hero-single-box p,
body.dark-mode .pyq-hero-single-box div[style*="color:#475569"],
body.dark-mode .pyq-hero-single-box div[style*="color:#64748b"] {
    color: #94a3b8 !important;
}


/* =========================================================
   HERO - STATS / TRUST BOXES
   ========================================================= */

html.dark-mode .pyq-hero-single-box div[style*="background:#fff"],
html.dark-mode .pyq-mobile-hide-box,
body.dark-mode .pyq-hero-single-box div[style*="background:#fff"],
body.dark-mode .pyq-mobile-hide-box {
    background:
        linear-gradient(
            135deg,
            rgba(30, 41, 59, 0.72),
            rgba(15, 23, 42, 0.58)
        ) !important;

    border: 1px solid rgba(255, 255, 255, 0.09) !important;

    color: #e2e8f0 !important;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 8px 22px rgba(0, 0, 0, 0.16) !important;
}


html.dark-mode .pyq-hero-single-box div[style*="color:#1e293b"],
html.dark-mode .pyq-mobile-hide-box h3,
body.dark-mode .pyq-hero-single-box div[style*="color:#1e293b"],
body.dark-mode .pyq-mobile-hide-box h3 {
    color: #f8fafc !important;
}


html.dark-mode .pyq-mobile-hide-box ul li,
body.dark-mode .pyq-mobile-hide-box ul li {
    color: #cbd5e1 !important;
}


/* =========================================================
   SEARCH BAR - FROSTED GLASS
   ========================================================= */

html.dark-mode #pyqSearchInput,
body.dark-mode #pyqSearchInput {
    background:
        linear-gradient(
            135deg,
            rgba(30, 41, 59, 0.68),
            rgba(15, 23, 42, 0.58)
        ) !important;

    border: 1px solid rgba(255, 255, 255, 0.10) !important;

    color: #f8fafc !important;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 8px 24px rgba(0, 0, 0, 0.16) !important;
}


html.dark-mode #pyqSearchInput::placeholder,
body.dark-mode #pyqSearchInput::placeholder {
    color: #64748b !important;
}


/* =========================================================
   EXAM CARDS - BASE GLASS
   ========================================================= */

html.dark-mode .exam-card-item,
body.dark-mode .exam-card-item {
    background:
        linear-gradient(
            135deg,
            rgba(15, 23, 42, 0.78),
            rgba(2, 6, 23, 0.72)
        ) !important;

    border: 1px solid rgba(255, 255, 255, 0.09) !important;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 14px 32px rgba(0, 0, 0, 0.24) !important;
transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}


/* =========================================================
   JENPAS - GREEN / CYAN GLASS
   ========================================================= */

html.dark-mode .exam-card-item:nth-child(1),
body.dark-mode .exam-card-item:nth-child(1) {
    background:
        radial-gradient(
            circle at 18% 12%,
            rgba(34, 197, 94, 0.12),
            transparent 38%
        ),
        linear-gradient(
            135deg,
            rgba(15, 42, 36, 0.78),
            rgba(2, 15, 23, 0.74)
        ) !important;

    border-color: rgba(34, 197, 94, 0.18) !important;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 14px 32px rgba(0, 0, 0, 0.24),
        0 0 24px rgba(34, 197, 94, 0.06) !important;
}


/* =========================================================
   WBJEE - ORANGE GLASS
   ========================================================= */

html.dark-mode .exam-card-item:nth-child(2),
body.dark-mode .exam-card-item:nth-child(2) {
    background:
        radial-gradient(
            circle at 18% 12%,
            rgba(249, 115, 22, 0.13),
            transparent 38%
        ),
        linear-gradient(
            135deg,
            rgba(55, 35, 20, 0.78),
            rgba(15, 23, 42, 0.74)
        ) !important;

    border-color: rgba(249, 115, 22, 0.18) !important;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 14px 32px rgba(0, 0, 0, 0.24),
        0 0 24px rgba(249, 115, 22, 0.06) !important;
}


/* =========================================================
   NEET - BLUE GLASS
   ========================================================= */

html.dark-mode .exam-card-item:nth-child(3),
body.dark-mode .exam-card-item:nth-child(3) {
    background:
        radial-gradient(
            circle at 18% 12%,
            rgba(59, 130, 246, 0.15),
            transparent 38%
        ),
        linear-gradient(
            135deg,
            rgba(17, 37, 70, 0.78),
            rgba(2, 15, 30, 0.74)
        ) !important;

    border-color: rgba(59, 130, 246, 0.20) !important;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 14px 32px rgba(0, 0, 0, 0.24),
        0 0 24px rgba(59, 130, 246, 0.07) !important;
}


/* =========================================================
   JEE MAIN - PURPLE GLASS
   ========================================================= */

html.dark-mode .exam-card-item:nth-child(4),
body.dark-mode .exam-card-item:nth-child(4) {
    background:
        radial-gradient(
            circle at 18% 12%,
            rgba(139, 92, 246, 0.15),
            transparent 38%
        ),
        linear-gradient(
            135deg,
            rgba(37, 25, 67, 0.78),
            rgba(15, 12, 35, 0.74)
        ) !important;

    border-color: rgba(139, 92, 246, 0.20) !important;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 14px 32px rgba(0, 0, 0, 0.24),
        0 0 24px rgba(139, 92, 246, 0.07) !important;
}


/* =========================================================
   EXAM CARD TEXT
   ========================================================= */

html.dark-mode .exam-card-item h3,
body.dark-mode .exam-card-item h3 {
    color: #f8fafc !important;
}


html.dark-mode .exam-card-item p,
body.dark-mode .exam-card-item p {
    color: #94a3b8 !important;
}


/* =========================================================
   INNER STAT BOXES - GLASS
   ========================================================= */

html.dark-mode .exam-inner-box,
body.dark-mode .exam-inner-box {
    background:
        rgba(30, 41, 59, 0.52) !important;

    border: 1px solid rgba(255, 255, 255, 0.08) !important;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}


html.dark-mode .exam-inner-box div[style*="color:#1e293b"],
body.dark-mode .exam-inner-box div[style*="color:#1e293b"] {
    color: #f8fafc !important;
}


html.dark-mode .exam-inner-box div[style*="color:#64748b"],
body.dark-mode .exam-inner-box div[style*="color:#64748b"] {
    color: #94a3b8 !important;
}


/* =========================================================
   BOTTOM FEATURE / TRUST BAR
   ========================================================= */

html.dark-mode div[style*="background:#f8fafc"],
body.dark-mode div[style*="background:#f8fafc"] {
    background:
        linear-gradient(
            135deg,
            rgba(15, 23, 42, 0.78),
            rgba(30, 41, 59, 0.56)
        ) !important;

    border: 1px solid rgba(255, 255, 255, 0.09) !important;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 10px 26px rgba(0, 0, 0, 0.18) !important;
}


html.dark-mode div[style*="background:#f8fafc"] div[style*="color:#0f172a"],
body.dark-mode div[style*="background:#f8fafc"] div[style*="color:#0f172a"] {
    color: #f8fafc !important;
}


html.dark-mode div[style*="background:#f8fafc"] div[style*="color:#64748b"],
body.dark-mode div[style*="background:#f8fafc"] div[style*="color:#64748b"] {
    color: #94a3b8 !important;
}


/* =========================================================
   SUBTLE HOVER - GLASS DEPTH
   ========================================================= */

html.dark-mode .exam-card-item:hover,
body.dark-mode .exam-card-item:hover {
    transform: translateY(-2px);
}

html.dark-mode .exam-card-item:nth-child(1):hover,
body.dark-mode .exam-card-item:nth-child(1):hover {
    border-color: rgba(34, 197, 94, 0.30) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 18px 38px rgba(0, 0, 0, 0.28),
        0 0 28px rgba(34, 197, 94, 0.09) !important;
}

html.dark-mode .exam-card-item:nth-child(2):hover,
body.dark-mode .exam-card-item:nth-child(2):hover {
    border-color: rgba(249, 115, 22, 0.30) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 18px 38px rgba(0, 0, 0, 0.28),
        0 0 28px rgba(249, 115, 22, 0.09) !important;
}

html.dark-mode .exam-card-item:nth-child(3):hover,
body.dark-mode .exam-card-item:nth-child(3):hover {
    border-color: rgba(59, 130, 246, 0.32) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 18px 38px rgba(0, 0, 0, 0.28),
        0 0 28px rgba(59, 130, 246, 0.10) !important;
}

html.dark-mode .exam-card-item:nth-child(4):hover,
body.dark-mode .exam-card-item:nth-child(4):hover {
    border-color: rgba(139, 92, 246, 0.32) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 18px 38px rgba(0, 0, 0, 0.28),
        0 0 28px rgba(139, 92, 246, 0.10) !important;
}


/* =========================================================
   PYQ QUESTION PAPER - SAME FROSTED GLASS LANGUAGE
   ========================================================= */

html.dark-mode .pyq-print-wrap .print-page,
body.dark-mode .pyq-print-wrap .print-page {
    background:
        linear-gradient(
            135deg,
            rgba(15,23,42,0.92),
            rgba(2,6,23,0.88)
        ) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(255,255,255,0.09) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.04),
        0 18px 45px rgba(0,0,0,0.28) !important;
}

html.dark-mode .pyq-print-wrap .print-content,
body.dark-mode .pyq-print-wrap .print-content {
    background: transparent !important;
    color: #e2e8f0 !important;
}

html.dark-mode .paper-header,
body.dark-mode .paper-header {
    border-bottom-color: rgba(255,255,255,0.14) !important;
}

html.dark-mode .paper-title,
html.dark-mode .paper-brand,
body.dark-mode .paper-title,
body.dark-mode .paper-brand {
    color: #f8fafc !important;
}

html.dark-mode .paper-subject,
body.dark-mode .paper-subject {
    color: #94a3b8 !important;
}

html.dark-mode .paper-set,
body.dark-mode .paper-set {
    background: rgba(30,41,59,0.90) !important;
    color: #cbd5e1 !important;
    border-color: rgba(255,255,255,0.10) !important;
}

html.dark-mode .paper-meta-table td,
body.dark-mode .paper-meta-table td {
    background: rgba(15,23,42,0.90) !important;
    color: #e2e8f0 !important;
    border-color: rgba(255,255,255,0.09) !important;
}

html.dark-mode .paper-instructions,
body.dark-mode .paper-instructions {
    background:
        linear-gradient(
            135deg,
            rgba(30,41,59,0.58),
            rgba(15,23,42,0.88)
        ) !important;
    color: #cbd5e1 !important;
    border-color: rgba(255,255,255,0.09) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04) !important;
}


/* Question cards */
html.dark-mode .question-box,
body.dark-mode .question-box {
    background:
        linear-gradient(
            135deg,
            rgba(17,24,39,0.94),
            rgba(15,23,42,0.90)
        ) !important;
    color: #e2e8f0 !important;
    border-color: rgba(139,92,246,0.20) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.04),
        0 10px 28px rgba(0,0,0,0.20) !important;
}

html.dark-mode .q-text,
html.dark-mode .q-text *,
body.dark-mode .q-text,
body.dark-mode .q-text * {
    color: #f1f5f9 !important;
}


/* Options */
html.dark-mode .option,
body.dark-mode .option {
    background:
        linear-gradient(
            135deg,
            rgba(30,41,59,0.90),
            rgba(15,23,42,0.86)
        ) !important;
    color: #e2e8f0 !important;
    border-color: rgba(255,255,255,0.09) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.035) !important;
}

html.dark-mode .option:hover,
body.dark-mode .option:hover {
    background:
        linear-gradient(
            135deg,
            rgba(51,65,85,0.76),
            rgba(30,41,59,0.60)
        ) !important;
    border-color: rgba(255,255,255,0.17) !important;
}

html.dark-mode .opt-indicator,
body.dark-mode .opt-indicator {
    background: rgba(15,23,42,0.72) !important;
    color: #cbd5e1 !important;
    border-color: rgba(255,255,255,0.14) !important;
}

html.dark-mode .option.selected,
body.dark-mode .option.selected {
    background:
        linear-gradient(
            135deg,
            rgba(139,92,246,0.20),
            rgba(91,33,182,0.10)
        ) !important;
    border-color: rgba(167,139,250,0.42) !important;
}

html.dark-mode .option.correct,
body.dark-mode .option.correct {
    background:
        linear-gradient(
            135deg,
            rgba(34,197,94,0.14),
            rgba(6,78,59,0.10)
        ) !important;
    border-color: rgba(34,197,94,0.32) !important;
}

html.dark-mode .option.wrong,
body.dark-mode .option.wrong {
    background:
        linear-gradient(
            135deg,
            rgba(239,68,68,0.14),
            rgba(127,29,29,0.10)
        ) !important;
    border-color: rgba(248,113,113,0.32) !important;
}


/* Solution */
html.dark-mode .solution-content.open,
body.dark-mode .solution-content.open {
    background:
        linear-gradient(
            135deg,
            rgba(34,197,94,0.11),
            rgba(15,23,42,0.88)
        ) !important;
    color: #d1fae5 !important;
    border-color: rgba(34,197,94,0.25) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03) !important;
}


/* Numerical input */
html.dark-mode .numerical-input,
body.dark-mode .numerical-input {
    background: rgba(15,23,42,0.92) !important;
    color: #f8fafc !important;
    border-color: rgba(255,255,255,0.12) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03) !important;
}


/* Buttons inside PYQ */
html.dark-mode .view-solution-btn,
html.dark-mode .check-numerical-btn,
html.dark-mode .check-msq-btn,
body.dark-mode .view-solution-btn,
body.dark-mode .check-numerical-btn,
body.dark-mode .check-msq-btn {
    background:
        linear-gradient(
            135deg,
            rgba(30,41,59,0.70),
            rgba(15,23,42,0.50)
        ) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(255,255,255,0.10) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        0 6px 18px rgba(0,0,0,0.18) !important;
}

html.dark-mode .view-solution-btn:hover,
html.dark-mode .check-numerical-btn:hover,
html.dark-mode .check-msq-btn:hover,
body.dark-mode .view-solution-btn:hover,
body.dark-mode .check-numerical-btn:hover,
body.dark-mode .check-msq-btn:hover {
    background:
        linear-gradient(
            135deg,
            rgba(51,65,85,0.78),
            rgba(30,41,59,0.60)
        ) !important;
    border-color: rgba(255,255,255,0.18) !important;
}


/* Answer box */
html.dark-mode .answer-box,
body.dark-mode .answer-box {
    background:
        linear-gradient(
            135deg,
            rgba(15,23,42,0.78),
            rgba(30,41,59,0.86)
        ) !important;
    color: #e2e8f0 !important;
    border-color: rgba(255,255,255,0.09) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.04),
        0 10px 26px rgba(0,0,0,0.18) !important;
}

html.dark-mode .answer-chip,
body.dark-mode .answer-chip {
    background: rgba(30,41,59,0.90) !important;
    color: #cbd5e1 !important;
    border-color: rgba(255,255,255,0.09) !important;
}


/* Chapter table */
html.dark-mode .chapter-weightage-table th,
html.dark-mode .chapter-weightage-table td,
body.dark-mode .chapter-weightage-table th,
body.dark-mode .chapter-weightage-table td {
    background: rgba(15,23,42,0.90) !important;
    color: #e2e8f0 !important;
    border-color: rgba(255,255,255,0.09) !important;
}


/* =========================================================
   PDF / PRINT - ALWAYS BRIGHT
   ========================================================= */

@media print {

    html,
    html.dark-mode,
    body,
    body.dark-mode {
        background: #fff !important;
        color: #000 !important;
        color-scheme: light !important;
    }

    html.dark-mode .pyq-print-wrap,
    body.dark-mode .pyq-print-wrap,
    html.dark-mode .pyq-print-wrap .print-page,
    body.dark-mode .pyq-print-wrap .print-page,
    html.dark-mode .pyq-print-wrap .print-content,
    body.dark-mode .pyq-print-wrap .print-content {
        background: #fff !important;
        color: #000 !important;
        box-shadow: none !important;
    }

    html.dark-mode .paper-header,
    html.dark-mode .paper-meta-table td,
    html.dark-mode .paper-instructions,
    html.dark-mode .question-box,
    html.dark-mode .option,
    html.dark-mode .answer-box,
    html.dark-mode .chapter-weightage-table th,
    html.dark-mode .chapter-weightage-table td,
    body.dark-mode .paper-header,
    body.dark-mode .paper-meta-table td,
    body.dark-mode .paper-instructions,
    body.dark-mode .question-box,
    body.dark-mode .option,
    body.dark-mode .answer-box,
    body.dark-mode .chapter-weightage-table th,
    body.dark-mode .chapter-weightage-table td {
        background: #fff !important;
        color: #111827 !important;
        border-color: #d1d5db !important;
        box-shadow: none !important;
    }

    html.dark-mode .q-text,
    html.dark-mode .q-text *,
    html.dark-mode .opt-content,
    html.dark-mode .opt-content *,
    html.dark-mode .katex,
    html.dark-mode .katex *,
    body.dark-mode .q-text,
    body.dark-mode .q-text *,
    body.dark-mode .opt-content,
    body.dark-mode .opt-content *,
    body.dark-mode .katex,
    body.dark-mode .katex * {
        color: #111827 !important;
    }

    html.dark-mode .solution-content.open,
    body.dark-mode .solution-content.open {
        background: #f0fdf4 !important;
        color: #166534 !important;
        border-color: #bbf7d0 !important;
    }

    html.dark-mode .view-solution-btn,
    html.dark-mode .check-numerical-btn,
    html.dark-mode .check-msq-btn,
    body.dark-mode .view-solution-btn,
    body.dark-mode .check-numerical-btn,
    body.dark-mode .check-msq-btn {
        display: none !important;
    }
}


/* =========================================================
   INTRODUCTION & INSTRUCTIONS TEXT BRIGHTNESS FIX
   ========================================================= */

html.dark-mode .paper-instructions,
html.dark-mode .paper-instructions *,
html.dark-mode .paper-instructions-title,
body.dark-mode .paper-instructions,
body.dark-mode .paper-instructions *,
body.dark-mode .paper-instructions-title {
    color: #f8fafc !important;
    opacity: 1 !important;
}


/* =========================================================
   QUESTION IMAGES — DARK MODE
   ---------------------------------------------------------
   Keep transparent PNG line-art visible in dark mode.
   Black line-art becomes white while the PNG background
   remains transparent.
   ========================================================= */

html.dark-mode .question-image,
html.dark-mode .opt-content img,
body.dark-mode .question-image,
body.dark-mode .opt-content img {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    filter: invert(1) hue-rotate(180deg) brightness(1.35) !important;
    opacity: 1 !important;
}

/* =========================================================
   PYQ PERFORMANCE OPTIMIZATION
   Visual design preserved — expensive glass blur removed.
   ========================================================= */

/* Keep the browser from creating unnecessary compositing work. */
html.dark-mode .pyq-hero-single-box,
body.dark-mode .pyq-hero-single-box,
html.dark-mode .exam-card-item,
body.dark-mode .exam-card-item,
html.dark-mode .question-box,
body.dark-mode .question-box {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Respect users/devices that request reduced motion. */
@media (prefers-reduced-motion: reduce) {
    html.dark-mode .exam-card-item,
    body.dark-mode .exam-card-item,
    html.dark-mode .option,
    body.dark-mode .option {
        transition: none !important;
    }
}










































/* =========================================
   SUBJECT CARD WITH MODE BUTTONS
========================================= */

.physics-subject-card {
    cursor: default;
}

.sp-folder-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.sp-mode-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 18px;
    min-width: 120px;

    border-radius: 10px;

    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.sp-topic-btn {
    background: #2563eb;
    color: #fff !important;
}

.sp-full-btn {
    background: #7c3aed;
    color: #fff !important;
}

.sp-mode-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}

/* Mobile */
@media (max-width: 600px) {

    .sp-folder-actions {
        gap: 8px;
    }

    .sp-mode-btn {
        flex: 1;
        min-width: 0;
        padding: 10px 8px;
        font-size: 13px;
    }

}





















/* =========================================================
   FULL LENGTH / PAPER GRID
   Modern Card Design
========================================================= */

.sp-paper-grid {
    width: min(1150px, calc(100% - 40px));
    margin: 24px auto 50px;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;

    box-sizing: border-box;
}


/* =========================================================
   PAPER CARD
========================================================= */

.sp-paper-card {
    --paper-accent: #2563eb;

    position: relative;

    min-height: 145px;

    padding: 30px 40px 25px;

    border-radius: 18px;

    border: 1px solid rgba(148, 163, 184, 0.22);

    background:
        linear-gradient(
            145deg,
            #ffffff 0%,
            #f8fafc 100%
        );

    text-decoration: none !important;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;

    overflow: hidden;

    box-sizing: border-box;

    box-shadow:
        0 7px 20px rgba(15, 23, 42, 0.06);

    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease;
}


/* =========================================================
   TOP ACCENT LINE
========================================================= */

.sp-paper-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;
    right: 0;

    height: 4px;

    background: var(--paper-accent);

    opacity: 0.9;
}


/* =========================================================
   SMALL CIRCLE / ICON
========================================================= */

.sp-paper-card::after {
    content: "▣";

    position: absolute;

    top: 15px;
    left: 16px;

    width: 27px;
    height: 27px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    color: var(--paper-accent);

    background: rgba(255, 255, 255, 0.85);

    border: 1px solid rgba(148, 163, 184, 0.18);

    font-size: 12px;
    font-weight: 800;
}


/* =========================================================
   HOVER
========================================================= */

.sp-paper-card:hover {

    transform: translateY(-5px);

    border-color: var(--paper-accent);

    box-shadow:
        0 14px 32px rgba(15, 23, 42, 0.12);

    text-decoration: none !important;
}


/* =========================================================
   TITLE
========================================================= */

.sp-paper-title {

    margin-top: 4px;
    margin-bottom: 7px;

    color: #0f172a;

    font-size: 18px;
    line-height: 1.35;

    font-weight: 800;

    letter-spacing: -0.2px;
}


/* =========================================================
   SUBTITLE
========================================================= */

.sp-paper-subtitle {

    color: #64748b;

    font-size: 13px;
    line-height: 1.5;

    font-weight: 500;
}


/* =========================================================
   YEAR / PAPER NUMBER LOOK
========================================================= */

.sp-paper-title::after {

    content: "";

    display: block;

    width: 28px;
    height: 3px;

    margin: 8px auto 0;

    border-radius: 10px;

    background: var(--paper-accent);
}


/* =========================================================
   10 AUTOMATIC COLOURS
   No subject/year names are used.
========================================================= */

.sp-paper-card:nth-child(10n + 1) {
    --paper-accent: #2563eb;
    background: linear-gradient(145deg, #ffffff, #eff6ff);
}

.sp-paper-card:nth-child(10n + 2) {
    --paper-accent: #16a34a;
    background: linear-gradient(145deg, #ffffff, #f0fdf4);
}

.sp-paper-card:nth-child(10n + 3) {
    --paper-accent: #7c3aed;
    background: linear-gradient(145deg, #ffffff, #f5f3ff);
}

.sp-paper-card:nth-child(10n + 4) {
    --paper-accent: #f97316;
    background: linear-gradient(145deg, #ffffff, #fff7ed);
}

.sp-paper-card:nth-child(10n + 5) {
    --paper-accent: #ec4899;
    background: linear-gradient(145deg, #ffffff, #fdf2f8);
}

.sp-paper-card:nth-child(10n + 6) {
    --paper-accent: #0891b2;
    background: linear-gradient(145deg, #ffffff, #ecfeff);
}

.sp-paper-card:nth-child(10n + 7) {
    --paper-accent: #ca8a04;
    background: linear-gradient(145deg, #ffffff, #fefce8);
}

.sp-paper-card:nth-child(10n + 8) {
    --paper-accent: #4f46e5;
    background: linear-gradient(145deg, #ffffff, #eef2ff);
}

.sp-paper-card:nth-child(10n + 9) {
    --paper-accent: #059669;
    background: linear-gradient(145deg, #ffffff, #ecfdf5);
}

.sp-paper-card:nth-child(10n) {
    --paper-accent: #e11d48;
    background: linear-gradient(145deg, #ffffff, #fff1f2);
}


/* =========================================================
   DARK MODE
========================================================= */

html.dark-mode .sp-paper-card,
body.dark-mode .sp-paper-card,
html.dark .sp-paper-card,
body.dark .sp-paper-card {

    background: #111827;

    border-color: rgba(148, 163, 184, 0.20);

    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.25);
}


html.dark-mode .sp-paper-title,
body.dark-mode .sp-paper-title,
html.dark .sp-paper-title,
body.dark .sp-paper-title {

    color: #f8fafc;
}


html.dark-mode .sp-paper-subtitle,
body.dark-mode .sp-paper-subtitle,
html.dark .sp-paper-subtitle,
body.dark .sp-paper-subtitle {

    color: #94a3b8;
}


html.dark-mode .sp-paper-card::after,
body.dark-mode .sp-paper-card::after,
html.dark .sp-paper-card::after,
body.dark .sp-paper-card::after {

    background: rgba(30, 41, 59, 0.85);

    border-color: rgba(148, 163, 184, 0.18);
}


/* =========================================================
   DARK MODE - SOFT COLOURED BACKGROUND
========================================================= */

html.dark-mode .sp-paper-card:nth-child(10n + 1),
body.dark-mode .sp-paper-card:nth-child(10n + 1),
html.dark .sp-paper-card:nth-child(10n + 1),
body.dark .sp-paper-card:nth-child(10n + 1) {
    background: linear-gradient(145deg, #111827, #172554);
}

html.dark-mode .sp-paper-card:nth-child(10n + 2),
body.dark-mode .sp-paper-card:nth-child(10n + 2),
html.dark .sp-paper-card:nth-child(10n + 2),
body.dark .sp-paper-card:nth-child(10n + 2) {
    background: linear-gradient(145deg, #111827, #052e16);
}

html.dark-mode .sp-paper-card:nth-child(10n + 3),
body.dark-mode .sp-paper-card:nth-child(10n + 3),
html.dark .sp-paper-card:nth-child(10n + 3),
body.dark .sp-paper-card:nth-child(10n + 3) {
    background: linear-gradient(145deg, #111827, #2e1065);
}

html.dark-mode .sp-paper-card:nth-child(10n + 4),
body.dark-mode .sp-paper-card:nth-child(10n + 4),
html.dark .sp-paper-card:nth-child(10n + 4),
body.dark .sp-paper-card:nth-child(10n + 4) {
    background: linear-gradient(145deg, #111827, #431407);
}

html.dark-mode .sp-paper-card:nth-child(10n + 5),
body.dark-mode .sp-paper-card:nth-child(10n + 5),
html.dark .sp-paper-card:nth-child(10n + 5),
body.dark .sp-paper-card:nth-child(10n + 5) {
    background: linear-gradient(145deg, #111827, #500724);
}

html.dark-mode .sp-paper-card:nth-child(10n + 6),
body.dark-mode .sp-paper-card:nth-child(10n + 6),
html.dark .sp-paper-card:nth-child(10n + 6),
body.dark .sp-paper-card:nth-child(10n + 6) {
    background: linear-gradient(145deg, #111827, #083344);
}

html.dark-mode .sp-paper-card:nth-child(10n + 7),
body.dark-mode .sp-paper-card:nth-child(10n + 7),
html.dark .sp-paper-card:nth-child(10n + 7),
body.dark .sp-paper-card:nth-child(10n + 7) {
    background: linear-gradient(145deg, #111827, #422006);
}

html.dark-mode .sp-paper-card:nth-child(10n + 8),
body.dark-mode .sp-paper-card:nth-child(10n + 8),
html.dark .sp-paper-card:nth-child(10n + 8),
body.dark .sp-paper-card:nth-child(10n + 8) {
    background: linear-gradient(145deg, #111827, #1e1b4b);
}

html.dark-mode .sp-paper-card:nth-child(10n + 9),
body.dark-mode .sp-paper-card:nth-child(10n + 9),
html.dark .sp-paper-card:nth-child(10n + 9),
body.dark .sp-paper-card:nth-child(10n + 9) {
    background: linear-gradient(145deg, #111827, #022c22);
}

html.dark-mode .sp-paper-card:nth-child(10n),
body.dark-mode .sp-paper-card:nth-child(10n),
html.dark .sp-paper-card:nth-child(10n),
body.dark .sp-paper-card:nth-child(10n) {
    background: linear-gradient(145deg, #111827, #4c0519);
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 850px) {

    .sp-paper-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 560px) {

    .sp-paper-grid {

        width: calc(100% - 20px);

        grid-template-columns: 1fr;

        gap: 12px;

        margin-top: 18px;
    }


    .sp-paper-card {

        min-height: 125px;

        padding: 28px 25px 22px;

        border-radius: 16px;
    }


    .sp-paper-card::after {

        top: 13px;
        left: 13px;

        width: 25px;
        height: 25px;
    }


    .sp-paper-title {

        font-size: 16px;
    }


    .sp-paper-subtitle {

        font-size: 12px;
    }

}





































/* =========================================================
   COMMON PYQ GRID
   ---------------------------------------------------------
   Used by:
   - Full Length
   - Topic Wise
   ========================================================= */

.sp-pyq-grid {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;

    width: 100%;

    margin: 25px 0 35px;

    box-sizing: border-box;
}


/* =========================================================
   COMMON PYQ CARD
   ========================================================= */

.sp-pyq-card {

    position: relative;

    display: block;

    width: 100%;

    min-height: 145px;

    padding: 30px 40px 25px;

    box-sizing: border-box;

    border-radius: 16px;

    border: 1px solid #dbe4ef;

    border-top: 4px solid #2563eb;

    background:
        linear-gradient(
            135deg,
            #f8fbff 0%,
            #eef5ff 100%
        );

    text-decoration: none !important;

    overflow: hidden;

    transition:
        transform 0.20s ease,
        box-shadow 0.20s ease,
        border-color 0.20s ease;
}


/* =========================================================
   ALTERNATING CARD ACCENT
   ========================================================= */

.sp-pyq-card:nth-child(2n) {

    border-top-color: #16a34a;

    background:
        linear-gradient(
            135deg,
            #fbfffc 0%,
            #eefbf3 100%
        );
}


.sp-pyq-card:nth-child(3n) {

    border-top-color: #7c3aed;

    background:
        linear-gradient(
            135deg,
            #fcfaff 0%,
            #f3efff 100%
        );
}


.sp-pyq-card:nth-child(4n) {

    border-top-color: #f97316;

    background:
        linear-gradient(
            135deg,
            #fffaf5 0%,
            #fff3e8 100%
        );
}


.sp-pyq-card:nth-child(5n) {

    border-top-color: #ec4899;

    background:
        linear-gradient(
            135deg,
            #fff9fc 0%,
            #fff0f7 100%
        );
}


.sp-pyq-card:nth-child(6n) {

    border-top-color: #0891b2;

    background:
        linear-gradient(
            135deg,
            #f5fdff 0%,
            #eafaff 100%
        );
}


/* =========================================================
   HOVER
   ========================================================= */

.sp-pyq-card:hover {

    transform: translateY(-3px);

    box-shadow:
        0 10px 25px rgba(15, 23, 42, 0.10);

    text-decoration: none !important;
}


/* =========================================================
   SMALL ICON
   ========================================================= */

.sp-pyq-icon {

    position: absolute;

    top: 15px;

    left: 18px;

    width: 30px;

    height: 30px;

    display: flex;

    align-items: center;

    justify-content: center;

    border: 1px solid #dbe4ef;

    border-radius: 9px;

    background: rgba(255,255,255,0.75);

    font-size: 13px;

    color: #2563eb;

    box-sizing: border-box;
}


/* Same accent as card */

.sp-pyq-card:nth-child(2n) .sp-pyq-icon {
    color: #16a34a;
}

.sp-pyq-card:nth-child(3n) .sp-pyq-icon {
    color: #7c3aed;
}

.sp-pyq-card:nth-child(4n) .sp-pyq-icon {
    color: #f97316;
}

.sp-pyq-card:nth-child(5n) .sp-pyq-icon {
    color: #ec4899;
}

.sp-pyq-card:nth-child(6n) .sp-pyq-icon {
    color: #0891b2;
}


/* =========================================================
   CARD CONTENT
   ========================================================= */

.sp-pyq-content {

    width: 100%;

    text-align: center;
}


/* =========================================================
   CARD TITLE
   ========================================================= */

.sp-pyq-title {

    display: block;

    margin: 0;

    font-size: 18px;

    line-height: 1.35;

    font-weight: 800;

    color: #111827 !important;

    text-decoration: none !important;
}


/* =========================================================
   ACCENT LINE
   ========================================================= */

.sp-pyq-line {

    width: 34px;

    height: 3px;

    margin: 12px auto 10px;

    border-radius: 10px;

    background: #2563eb;
}


.sp-pyq-card:nth-child(2n) .sp-pyq-line {
    background: #16a34a;
}

.sp-pyq-card:nth-child(3n) .sp-pyq-line {
    background: #7c3aed;
}

.sp-pyq-card:nth-child(4n) .sp-pyq-line {
    background: #f97316;
}

.sp-pyq-card:nth-child(5n) .sp-pyq-line {
    background: #ec4899;
}

.sp-pyq-card:nth-child(6n) .sp-pyq-line {
    background: #0891b2;
}


/* =========================================================
   CARD SUBTITLE
   ========================================================= */

.sp-pyq-subtitle {

    display: block;

    margin: 0;

    font-size: 13px;

    line-height: 1.5;

    font-weight: 500;

    color: #526b88 !important;

    text-decoration: none !important;
}


/* =========================================================
   REMOVE WORDPRESS / THEME LINK EFFECT
   ========================================================= */

.sp-pyq-card,
.sp-pyq-card:hover,
.sp-pyq-card:focus,
.sp-pyq-card:active,
.sp-pyq-card:visited {

    text-decoration: none !important;
}


.sp-pyq-card:hover .sp-pyq-title,
.sp-pyq-card:focus .sp-pyq-title,
.sp-pyq-card:active .sp-pyq-title {

    color: #111827 !important;
}


.sp-pyq-card:hover .sp-pyq-subtitle,
.sp-pyq-card:focus .sp-pyq-subtitle,
.sp-pyq-card:active .sp-pyq-subtitle {

    color: #526b88 !important;
}


/* =========================================================
   DARK MODE
   ========================================================= */

html.dark-mode .sp-pyq-card,
body.dark-mode .sp-pyq-card,
html.dark .sp-pyq-card,
body.dark .sp-pyq-card {

    background:
        linear-gradient(
            135deg,
            #111827 0%,
            #172033 100%
        );

    border-color: #263247;
}


/* Alternating dark backgrounds */

html.dark-mode .sp-pyq-card:nth-child(2n),
body.dark-mode .sp-pyq-card:nth-child(2n),
html.dark .sp-pyq-card:nth-child(2n),
body.dark .sp-pyq-card:nth-child(2n) {

    background:
        linear-gradient(
            135deg,
            #0f2520 0%,
            #102d25 100%
        );
}


html.dark-mode .sp-pyq-card:nth-child(3n),
body.dark-mode .sp-pyq-card:nth-child(3n),
html.dark .sp-pyq-card:nth-child(3n),
body.dark .sp-pyq-card:nth-child(3n) {

    background:
        linear-gradient(
            135deg,
            #19152b 0%,
            #211b38 100%
        );
}


html.dark-mode .sp-pyq-card:nth-child(4n),
body.dark-mode .sp-pyq-card:nth-child(4n),
html.dark .sp-pyq-card:nth-child(4n),
body.dark .sp-pyq-card:nth-child(4n) {

    background:
        linear-gradient(
            135deg,
            #281b12 0%,
            #322116 100%
        );
}


/* =========================================================
   DARK MODE TEXT
   ========================================================= */

html.dark-mode .sp-pyq-title,
body.dark-mode .sp-pyq-title,
html.dark .sp-pyq-title,
body.dark .sp-pyq-title {

    color: #f8fafc !important;
}


html.dark-mode .sp-pyq-subtitle,
body.dark-mode .sp-pyq-subtitle,
html.dark .sp-pyq-subtitle,
body.dark .sp-pyq-subtitle {

    color: #94a3b8 !important;
}


/* =========================================================
   DARK MODE ICON
   ========================================================= */

html.dark-mode .sp-pyq-icon,
body.dark-mode .sp-pyq-icon,
html.dark .sp-pyq-icon,
body.dark .sp-pyq-icon {

    background: rgba(17,24,39,0.75);

    border-color: #334155;
}


/* =========================================================
   DARK MODE HOVER
   ========================================================= */

html.dark-mode .sp-pyq-card:hover,
body.dark-mode .sp-pyq-card:hover,
html.dark .sp-pyq-card:hover,
body.dark .sp-pyq-card:hover {

    box-shadow:
        0 10px 25px rgba(0,0,0,0.30);
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .sp-pyq-grid {

        grid-template-columns: 1fr;

        gap: 14px;

        margin-top: 20px;
    }


    .sp-pyq-card {

        min-height: 125px;

        padding: 28px 25px 22px;

        border-radius: 14px;
    }


    .sp-pyq-title {

        font-size: 16px;
    }


    .sp-pyq-subtitle {

        font-size: 12px;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {

    .sp-pyq-card {

        padding: 26px 18px 20px;
    }


    .sp-pyq-title {

        font-size: 15px;
    }


    .sp-pyq-subtitle {

        font-size: 11px;
    }
}






































/* =========================================================
   SHARED PYQ NAVIGATION CARDS
   ---------------------------------------------------------
   Topic-wise and Full-length navigation use the same visual
   system. The main exam-selection grid (#examCardsGrid) is
   intentionally excluded so its existing layout is untouched.
========================================================= */

.sp-folder-grid:not(#examCardsGrid) {
    width: min(1150px, calc(100% - 40px));
    margin: 24px auto 50px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    box-sizing: border-box;
}

.sp-folder-card {
    --paper-accent: #2563eb;

    position: relative;
    min-height: 145px;
    padding: 30px 40px 25px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    color: #0f172a !important;
    text-decoration: none !important;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;

    overflow: hidden;
    box-sizing: border-box;
    box-shadow: 0 7px 20px rgba(15, 23, 42, 0.06);

    transition:
        transform .22s ease,
        box-shadow .22s ease,
        border-color .22s ease;
}

.sp-folder-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--paper-accent);
    opacity: .9;
}

.sp-folder-card::after {
    content: "▣";
    position: absolute;
    top: 15px;
    left: 16px;
    width: 27px;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: var(--paper-accent);
    background: rgba(255, 255, 255, .85);
    border: 1px solid rgba(148, 163, 184, .18);
    font-size: 12px;
    font-weight: 800;
}

.sp-folder-card:hover,
.sp-folder-card:focus,
.sp-folder-card:active {
    transform: translateY(-5px);
    border-color: var(--paper-accent);
    box-shadow: 0 14px 32px rgba(15, 23, 42, .12);
    color: #0f172a !important;
    text-decoration: none !important;
}

.sp-folder-title {
    margin: 4px 0 7px;
    color: #0f172a !important;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 800;
    letter-spacing: -.2px;
}

.sp-folder-title::after {
    content: "";
    display: block;
    width: 28px;
    height: 3px;
    margin: 8px auto 0;
    border-radius: 10px;
    background: var(--paper-accent);
}

.sp-folder-subtitle {
    color: #64748b !important;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 500;
}

.sp-folder-card:nth-child(10n + 1) {
    --paper-accent: #2563eb;
    background: linear-gradient(145deg, #ffffff, #eff6ff);
}
.sp-folder-card:nth-child(10n + 2) {
    --paper-accent: #16a34a;
    background: linear-gradient(145deg, #ffffff, #f0fdf4);
}
.sp-folder-card:nth-child(10n + 3) {
    --paper-accent: #7c3aed;
    background: linear-gradient(145deg, #ffffff, #f5f3ff);
}
.sp-folder-card:nth-child(10n + 4) {
    --paper-accent: #f97316;
    background: linear-gradient(145deg, #ffffff, #fff7ed);
}
.sp-folder-card:nth-child(10n + 5) {
    --paper-accent: #ec4899;
    background: linear-gradient(145deg, #ffffff, #fdf2f8);
}
.sp-folder-card:nth-child(10n + 6) {
    --paper-accent: #0891b2;
    background: linear-gradient(145deg, #ffffff, #ecfeff);
}
.sp-folder-card:nth-child(10n + 7) {
    --paper-accent: #ca8a04;
    background: linear-gradient(145deg, #ffffff, #fefce8);
}
.sp-folder-card:nth-child(10n + 8) {
    --paper-accent: #4f46e5;
    background: linear-gradient(145deg, #ffffff, #eef2ff);
}
.sp-folder-card:nth-child(10n + 9) {
    --paper-accent: #059669;
    background: linear-gradient(145deg, #ffffff, #ecfdf5);
}
.sp-folder-card:nth-child(10n) {
    --paper-accent: #e11d48;
    background: linear-gradient(145deg, #ffffff, #fff1f2);
}

html.dark-mode .sp-folder-card,
body.dark-mode .sp-folder-card,
html.dark .sp-folder-card,
body.dark .sp-folder-card {
    background: linear-gradient(145deg, #111827, #172033);
    border-color: rgba(148, 163, 184, .20);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .25);
    color: #f8fafc !important;
}

html.dark-mode .sp-folder-title,
body.dark-mode .sp-folder-title,
html.dark .sp-folder-title,
body.dark .sp-folder-title {
    color: #f8fafc !important;
}

html.dark-mode .sp-folder-subtitle,
body.dark-mode .sp-folder-subtitle,
html.dark .sp-folder-subtitle,
body.dark .sp-folder-subtitle {
    color: #94a3b8 !important;
}

html.dark-mode .sp-folder-card::after,
body.dark-mode .sp-folder-card::after,
html.dark .sp-folder-card::after,
body.dark .sp-folder-card::after {
    background: rgba(30, 41, 59, .85);
    border-color: rgba(148, 163, 184, .18);
}

html.dark-mode .sp-folder-card:nth-child(10n + 1),
body.dark-mode .sp-folder-card:nth-child(10n + 1),
html.dark .sp-folder-card:nth-child(10n + 1),
body.dark .sp-folder-card:nth-child(10n + 1) {
    background: linear-gradient(145deg, #111827, #172554);
}
html.dark-mode .sp-folder-card:nth-child(10n + 2),
body.dark-mode .sp-folder-card:nth-child(10n + 2),
html.dark .sp-folder-card:nth-child(10n + 2),
body.dark .sp-folder-card:nth-child(10n + 2) {
    background: linear-gradient(145deg, #111827, #052e16);
}
html.dark-mode .sp-folder-card:nth-child(10n + 3),
body.dark-mode .sp-folder-card:nth-child(10n + 3),
html.dark .sp-folder-card:nth-child(10n + 3),
body.dark .sp-folder-card:nth-child(10n + 3) {
    background: linear-gradient(145deg, #111827, #2e1065);
}
html.dark-mode .sp-folder-card:nth-child(10n + 4),
body.dark-mode .sp-folder-card:nth-child(10n + 4),
html.dark .sp-folder-card:nth-child(10n + 4),
body.dark .sp-folder-card:nth-child(10n + 4) {
    background: linear-gradient(145deg, #111827, #431407);
}
html.dark-mode .sp-folder-card:nth-child(10n + 5),
body.dark-mode .sp-folder-card:nth-child(10n + 5),
html.dark .sp-folder-card:nth-child(10n + 5),
body.dark .sp-folder-card:nth-child(10n + 5) {
    background: linear-gradient(145deg, #111827, #500724);
}
html.dark-mode .sp-folder-card:nth-child(10n + 6),
body.dark-mode .sp-folder-card:nth-child(10n + 6),
html.dark .sp-folder-card:nth-child(10n + 6),
body.dark .sp-folder-card:nth-child(10n + 6) {
    background: linear-gradient(145deg, #111827, #083344);
}
html.dark-mode .sp-folder-card:nth-child(10n + 7),
body.dark-mode .sp-folder-card:nth-child(10n + 7),
html.dark .sp-folder-card:nth-child(10n + 7),
body.dark .sp-folder-card:nth-child(10n + 7) {
    background: linear-gradient(145deg, #111827, #422006);
}
html.dark-mode .sp-folder-card:nth-child(10n + 8),
body.dark-mode .sp-folder-card:nth-child(10n + 8),
html.dark .sp-folder-card:nth-child(10n + 8),
body.dark .sp-folder-card:nth-child(10n + 8) {
    background: linear-gradient(145deg, #111827, #1e1b4b);
}
html.dark-mode .sp-folder-card:nth-child(10n + 9),
body.dark-mode .sp-folder-card:nth-child(10n + 9),
html.dark .sp-folder-card:nth-child(10n + 9),
body.dark .sp-folder-card:nth-child(10n + 9) {
    background: linear-gradient(145deg, #111827, #022c22);
}
html.dark-mode .sp-folder-card:nth-child(10n),
body.dark-mode .sp-folder-card:nth-child(10n),
html.dark .sp-folder-card:nth-child(10n),
body.dark .sp-folder-card:nth-child(10n) {
    background: linear-gradient(145deg, #111827, #4c0519);
}

@media (max-width: 850px) {
    .sp-folder-grid:not(#examCardsGrid) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }
}

@media (max-width: 560px) {
    .sp-folder-grid:not(#examCardsGrid) {
        width: calc(100% - 20px);
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 18px;
    }

    .sp-folder-card {
        min-height: 125px;
        padding: 28px 25px 22px;
        border-radius: 16px;
    }

    .sp-folder-card::after {
        top: 13px;
        left: 13px;
        width: 25px;
        height: 25px;
    }

    .sp-folder-title {
        font-size: 16px;
    }

    .sp-folder-subtitle {
        font-size: 12px;
    }
}

/* =========================================================
   PYQ READER — FINAL STABLE DESKTOP / MOBILE LAYOUT
   ---------------------------------------------------------
   Goals:
   • The reader always starts BELOW the real site header.
   • No extra sub-header is used.
   • Left PYQ Files and right Question Palette remain fixed.
   • Only #pyqQuestionScroll scrolls vertically.
   • The left sidebar contains both file-search and question-search.
   • The browser/page itself never becomes the question scroller.
   ========================================================= */

html.pyq-reader-active,
body.pyq-reader-active{
    width:100%;
    height:100%;
    min-height:100vh;
    margin:0 !important;
    overflow:hidden !important;
    overscroll-behavior:none !important;
}

html.pyq-reader-active{
    max-height:100vh !important;
}

body.pyq-reader-active{
    max-height:100vh !important;
}

.exam-wrapper.pyq-reader-page{
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 !important;
    overflow:visible !important;
}

/* -------------------- READER ROOT -------------------- */
.pyq-reader-shell{
    --pyq-blue:#2563eb;
    --pyq-blue-dark:#1d4ed8;
    --pyq-ink:#0f172a;
    --pyq-muted:#64748b;
    --pyq-line:#e2e8f0;
    --pyq-soft:#f8fafc;
    --pyq-panel:#ffffff;
    --pyq-success:#16a34a;
    --pyq-warning:#f59e0b;
    --pyq-purple:#7c3aed;
    --pyq-red:#dc2626;

    /* JS replaces this with the actual visible header bottom. */
    --pyq-header-height:72px;
    --pyq-reader-gap:10px;

    position:fixed !important;
    left:0 !important;
    right:0 !important;
    top:var(--pyq-header-height) !important;
    bottom:0 !important;

    width:100vw !important;
    max-width:none !important;
    height:auto !important;
    min-height:0 !important;
    margin:0 !important;
    padding:var(--pyq-reader-gap) 12px 10px !important;

    display:block !important;
    overflow:hidden !important;
    overscroll-behavior:none !important;

    /* Deliberately below the website header. */
    z-index:900 !important;

    background:var(--pyq-soft) !important;
    color:var(--pyq-ink);
    box-sizing:border-box !important;
}

.pyq-reader-shell:not(.pyq-header-measured){
    visibility:hidden !important;
}

.pyq-reader-shell.pyq-header-measured{
    visibility:visible !important;
}

.pyq-reader-shell,
.pyq-reader-shell *,
.pyq-reader-shell *::before,
.pyq-reader-shell *::after{
    box-sizing:border-box;
}

.pyq-reader-shell a{
    text-decoration:none !important;
}

.pyq-reader-shell button,
.pyq-reader-shell input{
    font:inherit;
}

.pyq-reader-shell button{
    -webkit-tap-highlight-color:transparent;
}

/* -------------------- 3 COLUMNS -------------------- */
.pyq-reader-body{
    width:100% !important;
    height:100% !important;
    min-height:0 !important;

    display:grid !important;
    grid-template-columns:minmax(210px,235px) minmax(0,1fr) minmax(235px,270px) !important;
    gap:14px !important;
    align-items:stretch !important;

    overflow:hidden !important;
    overscroll-behavior:none !important;
}

.pyq-reader-left,
.pyq-reader-main,
.pyq-reader-right{
    min-width:0 !important;
    min-height:0 !important;
    height:100% !important;
    overflow:hidden !important;
}

.pyq-reader-left,
.pyq-reader-right{
    position:relative !important;
    z-index:2 !important;
}

.pyq-reader-main{
    position:relative !important;
    display:flex !important;
    flex-direction:column !important;
    overflow:hidden !important;
    z-index:1 !important;
}

/* -------------------- LEFT SIDEBAR -------------------- */
.pyq-sidebar-stack{
    width:100%;
    height:100%;
    min-height:0;
    display:flex;
    flex-direction:column;
    gap:10px;
    overflow:hidden;
}

.pyq-sidebar-card{
    width:100%;
    min-width:0;
    min-height:0;
    background:#fff;
    border:1px solid #dbe3ed;
    border-radius:14px;
    box-shadow:0 4px 16px rgba(15,23,42,.055);
    padding:12px;
    overflow:hidden;
}

.pyq-file-nav-card{
    height:100%;
    display:flex;
    flex-direction:column;
}

.pyq-palette-card{
    flex:1 1 auto;
    display:flex;
    flex-direction:column;
}

.pyq-quick-nav-card,
.pyq-study-tip-card{
    flex:0 0 auto;
}

.pyq-sidebar-heading{
    flex:0 0 auto;
    display:flex;
    align-items:center;
    gap:9px;
    min-width:0;
    margin-bottom:10px;
}

.pyq-sidebar-heading-icon{
    width:34px;
    height:34px;
    min-width:34px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:10px;
    background:#eff6ff;
    border:1px solid #dbeafe;
    font-size:16px;
}

.pyq-sidebar-title{
    color:#0f172a;
    font-size:13px;
    line-height:1.2;
    font-weight:900;
}

.pyq-sidebar-subtitle{
    margin-top:2px;
    color:#94a3b8;
    font-size:9px;
    line-height:1.3;
    font-weight:600;
}

/* file search + question search */
.pyq-file-search-wrap,
.pyq-left-question-search-wrap{
    position:relative;
    flex:0 0 auto;
    margin-bottom:8px;
}

.pyq-file-search-icon,
.pyq-left-question-search-icon{
    position:absolute;
    left:10px;
    top:50%;
    transform:translateY(-50%);
    color:#94a3b8;
    font-size:14px;
    line-height:1;
    pointer-events:none;
    z-index:2;
}

.pyq-file-search,
.pyq-left-question-search{
    width:100% !important;
    min-height:38px !important;
    height:38px !important;
    padding:8px 10px 8px 29px !important;
    border:1px solid #dbe3ed !important;
    border-radius:9px !important;
    background:#f8fafc !important;
    color:#0f172a !important;
    outline:none !important;
    font-size:10px !important;
    line-height:1.2 !important;
}

.pyq-file-search:focus,
.pyq-left-question-search:focus{
    background:#fff !important;
    border-color:#93c5fd !important;
    box-shadow:0 0 0 3px rgba(37,99,235,.08) !important;
}

.pyq-left-question-search-wrap{
    margin-bottom:10px;
}

.pyq-file-nav{
    scroll-behavior:auto !important;
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    overscroll-behavior:contain !important;
    scrollbar-width:thin;
    scrollbar-color:#cbd5e1 transparent;
    padding-right:2px;
}

.pyq-file-nav::-webkit-scrollbar{
    width:5px;
}

.pyq-file-nav::-webkit-scrollbar-track{
    background:transparent;
}

.pyq-file-nav::-webkit-scrollbar-thumb{
    background:#cbd5e1;
    border-radius:999px;
}

.pyq-nav-section-label{
    margin:10px 5px 5px;
    color:#94a3b8;
    font-size:8px;
    line-height:1.2;
    font-weight:900;
    letter-spacing:.10em;
}

.pyq-nav-link,
.pyq-nav-file{
    width:100%;
    min-width:0;
    display:flex;
    align-items:center;
    gap:8px;
    border-radius:8px;
    border:1px solid transparent;
    color:#334155 !important;
    background:transparent;
}

.pyq-nav-link{
    min-height:32px;
    padding:6px 8px;
    margin-bottom:3px;
    font-size:10px;
    font-weight:800;
}

.pyq-nav-link:hover,
.pyq-nav-link:focus-visible{
    background:#f8fafc;
    border-color:#e2e8f0;
}

.pyq-nav-link.is-active{
    color:#1d4ed8 !important;
    background:#eff6ff;
    border-color:#bfdbfe;
}

.pyq-nav-link-icon{
    width:17px;
    min-width:17px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.pyq-nav-file-list{
    display:flex;
    flex-direction:column;
    gap:2px;
}

.pyq-nav-file{
    min-height:30px;
    padding:6px 7px 6px 8px;
    font-size:9.5px;
    font-weight:650;
}

.pyq-nav-file:hover,
.pyq-nav-file:focus-visible{
    background:#f8fafc;
    border-color:#e2e8f0;
    color:#0f172a !important;
}

.pyq-nav-file.is-active{
    color:#0f172a !important;
    background:#f1f5f9;
    border-color:#cbd5e1;
    box-shadow:inset 3px 0 0 #2563eb;
}

.pyq-file-dot{
    width:6px;
    height:6px;
    min-width:6px;
    border-radius:50%;
    background:#cbd5e1;
}

.pyq-nav-file.is-active .pyq-file-dot{
    background:#2563eb;
}

.pyq-nav-file-text{
    flex:1 1 auto;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.pyq-nav-current{
    width:16px;
    height:16px;
    min-width:16px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:#dcfce7;
    color:#15803d;
    font-size:9px;
    font-weight:900;
}

.pyq-nav-empty{
    padding:10px 8px;
    text-align:center;
    color:#94a3b8;
    background:#f8fafc;
    border:1px dashed #dbe3ed;
    border-radius:8px;
    font-size:9px;
}

/* -------------------- CENTER: ONLY THIS SCROLLS -------------------- */
.pyq-reader-main .pyq-reader-question-scroll{
    scroll-behavior:auto !important;
    width:100% !important;
    height:100% !important;
    min-height:0 !important;
    flex:1 1 auto !important;

    overflow-y:auto !important;
    overflow-x:hidden !important;
    overscroll-behavior:contain !important;
    -webkit-overflow-scrolling:touch !important;
    scrollbar-gutter:stable !important;
    scrollbar-width:thin !important;

    background:transparent;
    padding:0 5px 18px 0 !important;
    margin:0 !important;
    scroll-behavior:auto !important;
}

.pyq-reader-main .pyq-reader-question-scroll::-webkit-scrollbar{
    width:9px;
}

.pyq-reader-main .pyq-reader-question-scroll::-webkit-scrollbar-track{
    background:#edf1f5;
    border-radius:999px;
}

.pyq-reader-main .pyq-reader-question-scroll::-webkit-scrollbar-thumb{
    background:#b7c2cf;
    border-radius:999px;
    border:2px solid #edf1f5;
}

.pyq-reader-main .pyq-reader-question-scroll:hover::-webkit-scrollbar-thumb{
    background:#94a3b8;
}

/* No duplicate top/title/meta/search bars. */
.pyq-reader-title-card,
.pyq-reader-meta-grid,
.pyq-reader-search-row,
.pyq-reader-topbar,
.pyq-reader-subbar{
    display:none !important;
}

.pyq-reader-main .pyq-print-wrap{
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 !important;
}

.pyq-reader-main .print-page{
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    border-radius:14px !important;
    padding:20px 24px 30px !important;
    box-shadow:0 6px 20px rgba(15,23,42,.05) !important;
    overflow:visible !important;
}

.pyq-reader-main .download-float{
    display:none !important;
}

.pyq-reader-main .paper-header{
    margin-bottom:14px;
}

.pyq-reader-main .paper-title{
    font-size:22px;
}

.pyq-reader-main .question-list{
    gap:14px;
    padding-bottom:42vh;
}

.pyq-reader-main .question-box[data-question-number]{
    scroll-margin-top:12px !important;
    transition:box-shadow .2s ease,border-color .2s ease,background-color .2s ease;
}

.pyq-reader-main .question-box.pyq-question-active{
    border-color:#60a5fa !important;
    box-shadow:0 0 0 2px rgba(37,99,235,.10),0 8px 20px rgba(37,99,235,.07) !important;
}

.pyq-reader-main .question-box[hidden],
.pyq-reader-main .question-box.pyq-search-hidden{
    display:none !important;
}

/* -------------------- RIGHT PALETTE -------------------- */
.pyq-palette-progress{
    flex:0 0 auto;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    margin-bottom:8px;
    padding:7px 8px;
    border:1px solid #e2e8f0;
    border-radius:8px;
    background:#f8fafc;
    color:#64748b;
    font-size:9px;
    font-weight:800;
}

.pyq-palette-current-label{
    color:#2563eb;
}

.pyq-question-palette{
    scroll-behavior:auto !important;
    flex:1 1 auto;
    min-height:0;
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    align-content:start;
    gap:6px;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    padding:2px 2px 4px 0;
    overscroll-behavior:contain !important;
    scrollbar-width:thin;
    scrollbar-color:#cbd5e1 transparent;
}

.pyq-question-palette::-webkit-scrollbar{
    width:5px;
}

.pyq-question-palette::-webkit-scrollbar-track{
    background:transparent;
}

.pyq-question-palette::-webkit-scrollbar-thumb{
    background:#cbd5e1;
    border-radius:999px;
}

.pyq-palette-btn{
    appearance:none;
    width:100%;
    min-height:34px;
    padding:5px 3px;
    border:1px solid #d9e1ea;
    border-radius:8px;
    background:#fff;
    color:#475569;
    font-size:10px;
    line-height:1;
    font-weight:800;
    cursor:pointer;
    user-select:none;
    transition:background-color .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease;
}

.pyq-palette-btn:hover{
    background:#f8fafc;
    border-color:#93c5fd;
    color:#1d4ed8;
}

.pyq-palette-btn:focus-visible{
    outline:none;
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,.12);
}

.pyq-palette-btn.is-current,
.pyq-palette-btn.active{
    background:#2563eb !important;
    border-color:#2563eb !important;
    color:#fff !important;
    box-shadow:0 3px 9px rgba(37,99,235,.18);
}

.pyq-palette-btn.is-answered:not(.is-current):not(.active){
    background:#ecfdf5;
    border-color:#86efac;
    color:#166534;
}

/* Final answer result states for the question palette. */
.pyq-palette-btn.is-correct{
    background:#ecfdf5 !important;
    border-color:#86efac !important;
    color:#166534 !important;
    box-shadow:none !important;
}

.pyq-palette-btn.is-wrong{
    background:#fef2f2 !important;
    border-color:#fca5a5 !important;
    color:#b91c1c !important;
    box-shadow:none !important;
}

.pyq-palette-btn.is-current.is-correct,
.pyq-palette-btn.active.is-correct{
    box-shadow:0 0 0 2px rgba(34,197,94,.22) !important;
}

.pyq-palette-btn.is-current.is-wrong,
.pyq-palette-btn.active.is-wrong{
    box-shadow:0 0 0 2px rgba(239,68,68,.22) !important;
}

.pyq-palette-btn.pyq-search-hidden{
    display:none !important;
}

.pyq-palette-legend{
    flex:0 0 auto;
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:5px;
    margin-top:8px;
    padding-top:8px;
    border-top:1px solid #eef2f7;
}

.pyq-palette-legend > div{
    display:flex;
    align-items:center;
    gap:4px;
    min-width:0;
    color:#64748b;
    font-size:7.5px;
    line-height:1.2;
    font-weight:700;
}

.legend-dot{
    width:7px;
    height:7px;
    min-width:7px;
    border-radius:2px;
    border:1px solid #cbd5e1;
    background:#fff;
}

.legend-current{
    background:#2563eb;
    border-color:#2563eb;
}

.legend-solved{
    background:#ecfdf5;
    border-color:#86efac;
}

.pyq-jump-row{
    margin-bottom:7px;
}

.pyq-jump-row > label{
    display:block;
    margin-bottom:4px;
    color:#64748b;
    font-size:8px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.08em;
}

.pyq-jump-controls{
    display:grid;
    grid-template-columns:minmax(0,1fr) 44px;
    gap:5px;
}

.pyq-jump-controls input{
    width:100%;
    min-height:31px;
    padding:6px 8px;
    border:1px solid #dbe3ed;
    border-radius:8px;
    background:#f8fafc;
    color:#0f172a;
    outline:none;
    font-size:10px;
    font-weight:700;
}

.pyq-jump-controls button,
.pyq-quick-btn{
    appearance:none;
    width:100%;
    min-height:31px;
    padding:6px 8px;
    border:1px solid #dbe3ed;
    border-radius:8px;
    background:#fff;
    color:#334155;
    font-size:9.5px;
    line-height:1.2;
    font-weight:800;
    cursor:pointer;
}

.pyq-jump-controls button:hover,
.pyq-quick-btn:hover{
    background:#f8fafc;
    border-color:#cbd5e1;
}

.pyq-quick-btn{
    margin-top:5px;
    text-align:left;
}

.pyq-reader-shell img{
    max-width:100%;
}

.pyq-reader-shell .paper-logo{
    max-width:none;
}


/* Study tip card */
.pyq-tip-icon{
    width:28px;
    height:28px;
    min-width:28px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:8px;
    background:#fff7ed;
    border:1px solid #fed7aa;
    font-size:14px;
}

.pyq-tip-title{
    color:#0f172a;
    font-size:11px;
    line-height:1.2;
    font-weight:900;
}

.pyq-tip-text{
    margin-top:3px;
    color:#64748b;
    font-size:9px;
    line-height:1.5;
}

/* -------------------- DARK MODE -------------------- */
html.dark-mode .pyq-reader-shell,
body.dark-mode .pyq-reader-shell,
html.dark .pyq-reader-shell,
body.dark .pyq-reader-shell{
    --pyq-soft:#020617;
    --pyq-panel:#0f172a;
    --pyq-ink:#e2e8f0;
    background:#020617 !important;
}

html.dark-mode .pyq-sidebar-card,
body.dark-mode .pyq-sidebar-card,
html.dark .pyq-sidebar-card,
body.dark .pyq-sidebar-card{
    background:#0f172a !important;
    border-color:rgba(148,163,184,.18) !important;
    box-shadow:0 12px 28px rgba(0,0,0,.22) !important;
}

html.dark-mode .pyq-sidebar-heading-icon,
body.dark-mode .pyq-sidebar-heading-icon,
html.dark .pyq-sidebar-heading-icon,
body.dark .pyq-sidebar-heading-icon{
    background:rgba(37,99,235,.13);
    border-color:rgba(96,165,250,.20);
}

html.dark-mode .pyq-sidebar-title,
body.dark-mode .pyq-sidebar-title,
html.dark .pyq-sidebar-title{
    color:#f8fafc;
}

html.dark-mode .pyq-sidebar-subtitle,
body.dark-mode .pyq-sidebar-subtitle,
html.dark .pyq-sidebar-subtitle{
    color:#94a3b8;
}

html.dark-mode .pyq-file-search,
body.dark-mode .pyq-file-search,
html.dark .pyq-file-search,
html.dark-mode .pyq-left-question-search,
body.dark-mode .pyq-left-question-search,
html.dark .pyq-left-question-search,
html.dark-mode .pyq-jump-controls input,
body.dark-mode .pyq-jump-controls input,
html.dark .pyq-jump-controls input{
    background:#111827 !important;
    color:#f8fafc !important;
    border-color:rgba(148,163,184,.20) !important;
}

html.dark-mode .pyq-file-search::placeholder,
body.dark-mode .pyq-file-search::placeholder,
html.dark .pyq-file-search::placeholder,
html.dark-mode .pyq-left-question-search::placeholder,
body.dark-mode .pyq-left-question-search::placeholder,
html.dark .pyq-left-question-search::placeholder{
    color:#64748b;
}

html.dark-mode .pyq-reader-main .print-page,
body.dark-mode .pyq-reader-main .print-page,
html.dark .pyq-reader-main .print-page{
    background:#0f172a !important;
    border-color:#243244 !important;
}

html.dark-mode .pyq-palette-progress,
body.dark-mode .pyq-palette-progress,
html.dark .pyq-palette-progress,
html.dark-mode .pyq-quick-btn,
body.dark-mode .pyq-quick-btn,
html.dark .pyq-quick-btn{
    background:#111827 !important;
    border-color:rgba(148,163,184,.18) !important;
    color:#cbd5e1 !important;
}

html.dark-mode .pyq-palette-btn,
body.dark-mode .pyq-palette-btn,
html.dark .pyq-palette-btn{
    background:#111827;
    border-color:rgba(148,163,184,.20);
    color:#cbd5e1;
}

html.dark-mode .pyq-palette-btn.is-current,
body.dark-mode .pyq-palette-btn.is-current,
html.dark .pyq-palette-btn.is-current,
html.dark-mode .pyq-palette-btn.active,
body.dark-mode .pyq-palette-btn.active,
html.dark .pyq-palette-btn.active{
    background:#2563eb !important;
    border-color:#2563eb !important;
    color:#fff !important;
}

/* -------------------- RESPONSIVE -------------------- */
@media (min-width:1201px){
    .pyq-reader-body{
        grid-template-columns:235px minmax(0,1fr) 275px !important;
        gap:16px !important;
    }
    .pyq-reader-main .print-page{
        padding-left:28px !important;
        padding-right:28px !important;
    }
}

@media (max-width:1200px) and (min-width:901px){
    .pyq-reader-shell{
        padding-left:8px !important;
        padding-right:8px !important;
    }
    .pyq-reader-body{
        grid-template-columns:200px minmax(0,1fr) 225px !important;
        gap:10px !important;
    }
    .pyq-reader-main .print-page{
        padding-left:18px !important;
        padding-right:18px !important;
    }
}

@media (max-width:900px){
    .pyq-reader-shell{
        padding:8px 8px 8px !important;
    }

    .pyq-reader-body{
        grid-template-columns:minmax(0,1fr) !important;
        gap:0 !important;
    }

    .pyq-reader-left,
    .pyq-reader-right{
        display:none !important;
    }

    .pyq-reader-main{
        width:100% !important;
        grid-column:1 !important;
        grid-row:1 !important;
    }

    .pyq-reader-main .print-page{
        padding:16px 12px 24px !important;
        border-radius:10px !important;
    }
}

@media (max-width:600px){
    .pyq-reader-shell{
        padding:6px !important;
    }

    .pyq-reader-main .paper-title{
        font-size:19px !important;
    }

    .pyq-reader-main .question-box{
        padding:13px 8px 12px !important;
    }

    .pyq-reader-main .q-text{
        font-size:13.5px !important;
    }
}

/* -------------------- PRINT -------------------- */
@media print{
    html.pyq-reader-active,
    body.pyq-reader-active{
        width:auto !important;
        height:auto !important;
        min-height:0 !important;
        max-height:none !important;
        overflow:visible !important;
    }

    .pyq-reader-shell{
        position:static !important;
        top:auto !important;
        right:auto !important;
        bottom:auto !important;
        left:auto !important;
        width:100% !important;
        height:auto !important;
        max-width:none !important;
        min-height:0 !important;
        margin:0 !important;
        padding:0 !important;
        display:block !important;
        overflow:visible !important;
        visibility:visible !important;
        background:#fff !important;
        z-index:auto !important;
    }

    .pyq-reader-body{
        display:block !important;
        width:100% !important;
        height:auto !important;
        min-height:0 !important;
        overflow:visible !important;
    }

    .pyq-reader-left,
    .pyq-reader-right,
    .pyq-reader-topbar,
    .pyq-reader-subbar,
    .pyq-reader-title-card,
    .pyq-reader-meta-grid,
    .pyq-reader-search-row,
    .pyq-hidden-pdf-trigger{
        display:none !important;
    }

    .pyq-reader-main{
        display:block !important;
        width:100% !important;
        height:auto !important;
        overflow:visible !important;
    }

    .pyq-reader-main .pyq-reader-question-scroll{
        width:100% !important;
        height:auto !important;
        max-height:none !important;
        overflow:visible !important;
        padding:0 !important;
    }

    .pyq-reader-main .pyq-print-wrap,
    .pyq-reader-main .print-page{
        width:100% !important;
        max-width:none !important;
        margin:0 !important;
        padding:0 !important;
        box-shadow:none !important;
        border:none !important;
        border-radius:0 !important;
        overflow:visible !important;
        background:#fff !important;
    }
}

/* =========================================================
   PYQ READER — MOBILE NATIVE CONTROLS
   ---------------------------------------------------------
   • Desktop layout is untouched.
   • Mobile uses a compact top action bar.
   • PYQ Files opens as a left drawer.
   • Question Palette / Quick Navigation open as bottom sheets.
   • Only the question list scrolls underneath the fixed controls.
   ========================================================= */
.pyq-mobile-top-actions,
.pyq-mobile-bottom-nav,
.pyq-mobile-backdrop,
.pyq-mobile-panel-close{
    display:none !important;
}

@media (max-width:900px){
    .pyq-reader-shell{
        padding:0 !important;
    }

    .pyq-reader-body{
        position:relative !important;
        display:block !important;
        width:100% !important;
        height:100% !important;
        min-height:0 !important;
        overflow:hidden !important;
    }

    .pyq-reader-main{
        position:relative !important;
        width:100% !important;
        height:100% !important;
        min-height:0 !important;
        display:flex !important;
        flex-direction:column !important;
        overflow:hidden !important;
        z-index:1 !important;
    }

    /* Compact action row stays fixed while questions scroll. */
    .pyq-mobile-top-actions{
        display:grid !important;
        grid-template-columns:repeat(4,minmax(0,1fr));
        gap:6px;
        flex:0 0 auto;
        padding:7px 8px;
        background:#ffffff;
        border-bottom:1px solid #e2e8f0;
        box-shadow:0 2px 10px rgba(15,23,42,.06);
        z-index:5;
    }

    .pyq-mobile-action-btn{
        min-width:0;
        min-height:38px;
        padding:5px 3px;
        border:1px solid #dbe3ed;
        border-radius:9px;
        background:#fff;
        color:#334155;
        font-size:10px;
        font-weight:800;
        line-height:1.1;
        display:flex;
        align-items:center;
        justify-content:center;
        gap:4px;
        cursor:pointer;
        -webkit-tap-highlight-color:transparent;
    }

    .pyq-mobile-action-btn:active{
        transform:translateY(1px);
        background:#f8fafc;
    }

    /* Center question scroller uses the remaining viewport height. */
    .pyq-reader-main .pyq-reader-question-scroll{
        flex:1 1 auto !important;
        width:100% !important;
        min-height:0 !important;
        height:auto !important;
        overflow-y:auto !important;
        overflow-x:hidden !important;
        padding:0 5px 10px 5px !important;
        margin:0 !important;
        -webkit-overflow-scrolling:touch !important;
        overscroll-behavior:contain !important;
        scrollbar-width:none !important;
    }

    .pyq-reader-main .pyq-reader-question-scroll::-webkit-scrollbar{
        display:none !important;
        width:0 !important;
    }

    .pyq-reader-main .pyq-print-wrap{
        width:100% !important;
        margin:0 !important;
        padding:0 !important;
    }

    .pyq-reader-main .print-page{
        min-height:100% !important;
        width:100% !important;
        margin:0 !important;
        padding:14px 9px 18px !important;
        border-radius:0 !important;
        box-shadow:none !important;
        border:none !important;
        background:#fff !important;
    }

    .pyq-reader-main .paper-header{
        margin-bottom:10px !important;
    }

    .pyq-reader-main .paper-logo{
        width:42px !important;
        height:42px !important;
    }

    .pyq-reader-main .paper-title{
        font-size:18px !important;
        line-height:1.2 !important;
    }

    .pyq-reader-main .paper-brand{
        font-size:9px !important;
        letter-spacing:.28em !important;
    }

    .pyq-reader-main .paper-subject,
    .pyq-reader-main .paper-set{
        font-size:10px !important;
    }

    .pyq-reader-main .paper-meta-table{
        font-size:10px !important;
        line-height:1.35 !important;
    }

    .pyq-reader-main .paper-meta-table td{
        padding:7px 6px !important;
    }

    .pyq-reader-main .paper-instructions{
        padding:10px !important;
        font-size:10px !important;
        line-height:1.45 !important;
    }

    .pyq-reader-main .question-list{
        gap:10px !important;
    }

    .pyq-reader-main .question-box{
        padding:12px 8px 11px !important;
        border-radius:11px !important;
    }

    .pyq-reader-main .q-topline{
        gap:5px !important;
    }

    .pyq-reader-main .q-text{
        font-size:13px !important;
        line-height:1.55 !important;
    }

    .pyq-reader-main .option{
        min-height:44px !important;
        padding:8px 9px !important;
        font-size:12px !important;
    }

    /* Fixed mobile question controls. */
    .pyq-mobile-bottom-nav{
        display:grid !important;
        grid-template-columns:minmax(0,.85fr) minmax(0,1.35fr) minmax(0,.85fr);
        gap:7px;
        flex:0 0 auto;
        padding:7px 8px calc(7px + env(safe-area-inset-bottom));
        background:rgba(255,255,255,.98);
        border-top:1px solid #dbe3ed;
        box-shadow:0 -4px 16px rgba(15,23,42,.08);
        z-index:10;
    }

    .pyq-mobile-bottom-btn{
        min-width:0;
        min-height:46px;
        padding:6px 6px;
        border:1px solid #dbe3ed;
        border-radius:11px;
        background:#fff;
        color:#334155;
        font-size:11px;
        font-weight:800;
        display:flex;
        align-items:center;
        justify-content:center;
        gap:5px;
        cursor:pointer;
        -webkit-tap-highlight-color:transparent;
    }

    .pyq-mobile-next-btn{
        background:#2563eb !important;
        border-color:#2563eb !important;
        color:#fff !important;
        box-shadow:0 5px 14px rgba(37,99,235,.18);
    }

    .pyq-mobile-palette-btn{
        background:#f8fafc;
    }

    /* All desktop sidebars are transformed into mobile overlays. */
    .pyq-reader-left,
    .pyq-reader-right{
        display:block !important;
        height:auto !important;
        min-height:0 !important;
        overflow:visible !important;
    }

    .pyq-reader-left{
        position:fixed !important;
        top:var(--pyq-header-height) !important;
        left:0 !important;
        bottom:0 !important;
        width:min(88vw,380px) !important;
        height:auto !important;
        padding:8px !important;
        margin:0 !important;
        z-index:2100 !important;
        transform:translateX(-105%);
        transition:transform .22s ease;
        background:#f8fafc !important;
        box-shadow:10px 0 30px rgba(15,23,42,.18);
        overflow:hidden !important;
        pointer-events:none;
    }

    .pyq-reader-left .pyq-sidebar-card{
        height:100% !important;
        max-height:none !important;
    }

    .pyq-reader-right{
        position:fixed !important;
        left:8px !important;
        right:8px !important;
        bottom:0 !important;
        width:auto !important;
        height:auto !important;
        max-height:82vh !important;
        padding:0 !important;
        margin:0 !important;
        z-index:2100 !important;
        transform:translateY(calc(100% + 24px));
        transition:transform .22s ease;
        pointer-events:none;
        overflow:visible !important;
    }

    .pyq-reader-right .pyq-sidebar-stack{
        width:100% !important;
        height:auto !important;
        min-height:0 !important;
        gap:8px !important;
        overflow:visible !important;
    }

    .pyq-reader-right .pyq-sidebar-card{
        width:100% !important;
        height:auto !important;
        max-height:76vh !important;
        border-radius:16px !important;
        box-shadow:0 10px 35px rgba(15,23,42,.18) !important;
    }

    .pyq-reader-right .pyq-palette-card{
        display:flex !important;
        flex-direction:column !important;
    }

    .pyq-reader-right .pyq-palette-card .pyq-question-palette{
        max-height:52vh !important;
        overflow-y:auto !important;
        overscroll-behavior:contain !important;
        -webkit-overflow-scrolling:touch !important;
    }

    .pyq-reader-right .pyq-quick-nav-card{
        display:none !important;
    }

    .pyq-mobile-right-close,
    .pyq-mobile-panel-close{
        display:flex !important;
        align-items:center;
        justify-content:center;
        width:30px;
        height:30px;
        min-width:30px;
        border:1px solid #dbe3ed;
        border-radius:50%;
        background:#fff;
        color:#334155;
        font-size:19px;
        line-height:1;
        font-weight:700;
        cursor:pointer;
        -webkit-tap-highlight-color:transparent;
    }

    .pyq-mobile-panel-close{
        margin-left:auto;
    }

    .pyq-mobile-right-close{
        position:absolute !important;
        top:-14px !important;
        right:10px !important;
        z-index:30 !important;
        box-shadow:0 3px 12px rgba(15,23,42,.12);
    }

    .pyq-mobile-backdrop{
        position:fixed !important;
        top:var(--pyq-header-height) !important;
        left:0 !important;
        right:0 !important;
        bottom:0 !important;
        z-index:2050 !important;
        background:rgba(15,23,42,.42);
        opacity:0;
        visibility:hidden;
        pointer-events:none;
        transition:opacity .2s ease, visibility .2s ease;
        display:block !important;
    }

    /* Open states */
    .pyq-reader-shell.pyq-mobile-files-open .pyq-reader-left{
        transform:translateX(0);
        pointer-events:auto;
    }

    .pyq-reader-shell.pyq-mobile-files-open .pyq-mobile-backdrop,
    .pyq-reader-shell.pyq-mobile-palette-open .pyq-mobile-backdrop,
    .pyq-reader-shell.pyq-mobile-more-open .pyq-mobile-backdrop{
        opacity:1;
        visibility:visible;
        pointer-events:auto;
    }

    .pyq-reader-shell.pyq-mobile-palette-open .pyq-reader-right,
    .pyq-reader-shell.pyq-mobile-more-open .pyq-reader-right{
        transform:translateY(0);
        pointer-events:auto;
    }

    .pyq-reader-shell.pyq-mobile-more-open .pyq-reader-right .pyq-palette-card{
        display:none !important;
    }

    .pyq-reader-shell.pyq-mobile-more-open .pyq-reader-right .pyq-quick-nav-card{
        display:block !important;
    }

    .pyq-reader-shell.pyq-mobile-files-open .pyq-reader-right,
    .pyq-reader-shell.pyq-mobile-palette-open .pyq-reader-left,
    .pyq-reader-shell.pyq-mobile-more-open .pyq-reader-left{
        pointer-events:none;
    }
}

@media (max-width:420px){
    .pyq-mobile-action-btn{
        font-size:9px;
        gap:2px;
    }

    .pyq-mobile-bottom-btn{
        font-size:10px;
        min-height:44px;
    }

    .pyq-reader-main .print-page{
        padding-left:6px !important;
        padding-right:6px !important;
    }
}

/* =========================================================
   PYQ READER — MOBILE NATIVE CONTROLS
   Desktop remains unchanged.
   ========================================================= */
.pyq-mobile-top-actions,
.pyq-mobile-bottom-nav,
.pyq-mobile-backdrop,
.pyq-mobile-panel-close{
    display:none !important;
}

@media (max-width:900px){
    .pyq-reader-shell{padding:0 !important;}
    .pyq-reader-body{display:block !important;width:100% !important;height:100% !important;min-height:0 !important;overflow:hidden !important;position:relative !important;}
    .pyq-reader-main{position:relative !important;width:100% !important;height:100% !important;min-height:0 !important;display:flex !important;flex-direction:column !important;overflow:hidden !important;}

    .pyq-mobile-top-actions{
        display:grid !important;
        grid-template-columns:repeat(4,minmax(0,1fr));
        gap:6px;
        flex:0 0 auto;
        padding:7px 8px;
        background:#fff;
        border-bottom:1px solid #e2e8f0;
        box-shadow:0 2px 10px rgba(15,23,42,.06);
        z-index:8;
    }
    .pyq-mobile-action-btn{
        min-width:0;min-height:38px;padding:5px 3px;border:1px solid #dbe3ed;border-radius:9px;background:#fff;color:#334155;
        font-size:10px;font-weight:800;line-height:1.1;display:flex;align-items:center;justify-content:center;gap:4px;cursor:pointer;
    }
    .pyq-mobile-action-btn:active{transform:translateY(1px);background:#f8fafc;}

    .pyq-reader-main .pyq-reader-question-scroll{
        flex:1 1 auto !important;height:auto !important;min-height:0 !important;overflow-y:auto !important;overflow-x:hidden !important;
        padding:0 5px 10px !important;scrollbar-width:none !important;-webkit-overflow-scrolling:touch !important;overscroll-behavior:contain !important;
    }
    .pyq-reader-main .pyq-reader-question-scroll::-webkit-scrollbar{display:none !important;width:0 !important;}
    .pyq-reader-main .pyq-print-wrap{width:100% !important;margin:0 !important;padding:0 !important;}
    .pyq-reader-main .print-page{width:100% !important;min-height:100% !important;margin:0 !important;padding:14px 9px 18px !important;border:0 !important;border-radius:0 !important;box-shadow:none !important;}

    .pyq-reader-main .paper-header{margin-bottom:10px !important;}
    .pyq-reader-main .paper-logo{width:42px !important;height:42px !important;}
    .pyq-reader-main .paper-title{font-size:18px !important;line-height:1.2 !important;}
    .pyq-reader-main .paper-brand{font-size:9px !important;letter-spacing:.28em !important;}
    .pyq-reader-main .paper-subject,.pyq-reader-main .paper-set{font-size:10px !important;}
    .pyq-reader-main .paper-meta-table{font-size:10px !important;line-height:1.35 !important;}
    .pyq-reader-main .paper-meta-table td{padding:7px 6px !important;}
    .pyq-reader-main .paper-instructions{padding:10px !important;font-size:10px !important;line-height:1.45 !important;}
    .pyq-reader-main .question-list{gap:10px !important;}
    .pyq-reader-main .question-box{padding:12px 8px 11px !important;border-radius:11px !important;}
    .pyq-reader-main .q-topline{gap:5px !important;}
    .pyq-reader-main .q-text{font-size:13px !important;line-height:1.55 !important;}
    .pyq-reader-main .option{min-height:44px !important;padding:8px 9px !important;font-size:12px !important;}

    .pyq-mobile-bottom-nav{
        display:grid !important;
        grid-template-columns:minmax(0,.85fr) minmax(0,1.35fr) minmax(0,.85fr);
        gap:7px;
        flex:0 0 auto;
        padding:7px 8px calc(7px + env(safe-area-inset-bottom));
        background:rgba(255,255,255,.98);
        border-top:1px solid #dbe3ed;
        box-shadow:0 -4px 16px rgba(15,23,42,.08);
        z-index:10;
    }
    .pyq-mobile-bottom-btn{
        min-width:0;min-height:46px;padding:6px;border:1px solid #dbe3ed;border-radius:11px;background:#fff;color:#334155;
        font-size:11px;font-weight:800;display:flex;align-items:center;justify-content:center;gap:5px;cursor:pointer;
    }
    .pyq-mobile-next-btn{background:#2563eb !important;border-color:#2563eb !important;color:#fff !important;box-shadow:0 5px 14px rgba(37,99,235,.18);}
    .pyq-mobile-palette-btn{background:#f8fafc;}

    /* Mobile: PYQ Files becomes a left drawer. */
    .pyq-reader-left{
        display:block !important;position:fixed !important;top:var(--pyq-header-height) !important;left:0 !important;bottom:0 !important;
        width:min(88vw,380px) !important;height:auto !important;padding:8px !important;margin:0 !important;z-index:2100 !important;
        transform:translateX(-105%);transition:transform .22s ease;background:#f8fafc !important;box-shadow:10px 0 30px rgba(15,23,42,.18);
        overflow:hidden !important;pointer-events:none;
    }
    .pyq-reader-left .pyq-sidebar-card{height:100% !important;max-height:none !important;}
    .pyq-reader-left .pyq-file-nav{min-height:0 !important;}

    /* Mobile: palette / quick navigation becomes a bottom sheet. */
    .pyq-reader-right{
        display:block !important;position:fixed !important;left:8px !important;right:8px !important;bottom:0 !important;width:auto !important;
        height:auto !important;max-height:82vh !important;padding:0 !important;margin:0 !important;z-index:2100 !important;
        transform:translateY(calc(100% + 24px));transition:transform .22s ease;pointer-events:none;overflow:visible !important;
    }
    .pyq-reader-right .pyq-sidebar-stack{height:auto !important;min-height:0 !important;gap:8px !important;overflow:visible !important;}
    .pyq-reader-right .pyq-sidebar-card{width:100% !important;height:auto !important;max-height:76vh !important;border-radius:16px !important;box-shadow:0 10px 35px rgba(15,23,42,.18) !important;}
    .pyq-reader-right .pyq-palette-card{display:flex !important;flex-direction:column !important;}
    .pyq-reader-right .pyq-question-palette{max-height:52vh !important;overflow-y:auto !important;overscroll-behavior:contain !important;-webkit-overflow-scrolling:touch !important;}
    .pyq-reader-right .pyq-quick-nav-card{display:none !important;}

    .pyq-mobile-panel-close{
        display:flex !important;align-items:center;justify-content:center;width:30px;height:30px;min-width:30px;
        border:1px solid #dbe3ed;border-radius:50%;background:#fff;color:#334155;font-size:19px;line-height:1;font-weight:700;cursor:pointer;
    }
    .pyq-mobile-panel-close{margin-left:auto;}
    .pyq-mobile-right-close{position:absolute !important;top:-14px !important;right:10px !important;z-index:5 !important;box-shadow:0 3px 12px rgba(15,23,42,.12);}

    .pyq-mobile-backdrop{
        display:block !important;position:fixed !important;top:var(--pyq-header-height) !important;left:0 !important;right:0 !important;bottom:0 !important;
        z-index:2050 !important;background:rgba(15,23,42,.42);opacity:0;visibility:hidden;pointer-events:none;
        transition:opacity .2s ease,visibility .2s ease;
    }

    .pyq-reader-shell.pyq-mobile-files-open .pyq-reader-left{transform:translateX(0);pointer-events:auto;}
    .pyq-reader-shell.pyq-mobile-files-open .pyq-mobile-backdrop,
    .pyq-reader-shell.pyq-mobile-palette-open .pyq-mobile-backdrop,
    .pyq-reader-shell.pyq-mobile-more-open .pyq-mobile-backdrop{opacity:1;visibility:visible;pointer-events:auto;}
    .pyq-reader-shell.pyq-mobile-palette-open .pyq-reader-right,
    .pyq-reader-shell.pyq-mobile-more-open .pyq-reader-right{transform:translateY(0);pointer-events:auto;}
    .pyq-reader-shell.pyq-mobile-more-open .pyq-reader-right .pyq-palette-card{display:none !important;}
    .pyq-reader-shell.pyq-mobile-more-open .pyq-reader-right .pyq-quick-nav-card{display:block !important;}
}

@media (max-width:420px){
    .pyq-mobile-action-btn{font-size:9px;gap:2px;}
    .pyq-mobile-bottom-btn{font-size:10px;min-height:44px;}
    .pyq-reader-main .print-page{padding-left:6px !important;padding-right:6px !important;}
}


/* =========================================================
   PYQ READER — FINAL MOBILE/DARK THEME POLISH
   ---------------------------------------------------------
   1) Keeps mobile action bars compact without making them
      hard to tap.
   2) Gives every mobile menu/control a stable border on
      :hover, :focus, :focus-visible and :active.
   3) Applies dark mode to the mobile bars, drawers,
      bottom sheets and reader content that previously kept
      light backgrounds.
   4) Does not change the desktop reader layout.
   ========================================================= */

@media (max-width:900px){
    /* ----- Thin mobile top action bar ----- */
    .pyq-mobile-top-actions{
        gap:5px !important;
        padding:4px 6px !important;
        min-height:42px !important;
        border-bottom-width:1px !important;
    }

    .pyq-mobile-action-btn{
        min-height:32px !important;
        height:32px !important;
        padding:3px 4px !important;
        border:1px solid #d7e0ea !important;
        border-radius:8px !important;
        background:#fff !important;
        color:#334155 !important;
        font-size:9.5px !important;
        line-height:1 !important;
        box-sizing:border-box !important;
        box-shadow:0 1px 2px rgba(15,23,42,.04) !important;
        outline:none !important;
    }

    .pyq-mobile-action-btn:hover{
        border-color:#b8c7d8 !important;
        background:#f8fafc !important;
    }

    .pyq-mobile-action-btn:focus,
    .pyq-mobile-action-btn:focus-visible,
    .pyq-mobile-action-btn:active{
        outline:none !important;
        border:1px solid #93a8bf !important;
        box-shadow:0 0 0 2px rgba(59,130,246,.10) !important;
        background:#f8fafc !important;
    }

    .pyq-mobile-action-btn.is-active,
    .pyq-mobile-action-btn[aria-expanded="true"]{
        border-color:#2563eb !important;
        background:#eff6ff !important;
        color:#1d4ed8 !important;
        box-shadow:0 0 0 2px rgba(37,99,235,.10) !important;
    }

    /* ----- Thin fixed bottom question bar ----- */
    .pyq-mobile-bottom-nav{
        gap:5px !important;
        padding:4px 6px calc(4px + env(safe-area-inset-bottom)) !important;
        border-top-width:1px !important;
    }

    .pyq-mobile-bottom-btn{
        min-height:40px !important;
        height:40px !important;
        padding:4px 5px !important;
        border:1px solid #d7e0ea !important;
        border-radius:9px !important;
        background:#fff !important;
        color:#334155 !important;
        font-size:10px !important;
        line-height:1 !important;
        box-sizing:border-box !important;
        box-shadow:0 1px 2px rgba(15,23,42,.04) !important;
        outline:none !important;
    }

    .pyq-mobile-bottom-btn:hover{
        border-color:#b8c7d8 !important;
        background:#f8fafc !important;
    }

    .pyq-mobile-bottom-btn:focus,
    .pyq-mobile-bottom-btn:focus-visible,
    .pyq-mobile-bottom-btn:active{
        outline:none !important;
        border:1px solid #93a8bf !important;
        box-shadow:0 0 0 2px rgba(59,130,246,.10) !important;
    }

    .pyq-mobile-next-btn{
        min-height:40px !important;
        height:40px !important;
    }

    .pyq-mobile-palette-btn{
        background:#f8fafc !important;
    }

    /* ----- Standard close-button treatment ----- */
    .pyq-mobile-panel-close{
        width:28px !important;
        height:28px !important;
        min-width:28px !important;
        min-height:28px !important;
        border:1px solid #d7e0ea !important;
        background:#fff !important;
        color:#334155 !important;
        box-shadow:0 1px 3px rgba(15,23,42,.08) !important;
        outline:none !important;
    }

    .pyq-mobile-panel-close:hover{
        border-color:#b8c7d8 !important;
        background:#f8fafc !important;
    }

    .pyq-mobile-panel-close:focus,
    .pyq-mobile-panel-close:focus-visible,
    .pyq-mobile-panel-close:active{
        outline:none !important;
        border:1px solid #93a8bf !important;
        box-shadow:0 0 0 2px rgba(59,130,246,.10) !important;
    }

    /* ----- Slightly tighter mobile drawer/sheet spacing ----- */
    .pyq-reader-left{
        width:min(88vw,380px) !important;
        padding:6px !important;
    }

    .pyq-reader-right{
        left:6px !important;
        right:6px !important;
    }

    .pyq-reader-left .pyq-sidebar-card,
    .pyq-reader-right .pyq-sidebar-card{
        border-radius:14px !important;
    }

    /* ----- Make drawer/sheet links keep a visible focus border ----- */
    .pyq-reader-shell .pyq-nav-file,
    .pyq-reader-shell .pyq-nav-link,
    .pyq-reader-shell .pyq-quick-btn,
    .pyq-reader-shell .pyq-palette-btn{
        outline:none !important;
    }

    .pyq-reader-shell .pyq-nav-file:focus,
    .pyq-reader-shell .pyq-nav-file:focus-visible,
    .pyq-reader-shell .pyq-nav-link:focus,
    .pyq-reader-shell .pyq-nav-link:focus-visible,
    .pyq-reader-shell .pyq-quick-btn:focus,
    .pyq-reader-shell .pyq-quick-btn:focus-visible,
    .pyq-reader-shell .pyq-palette-btn:focus,
    .pyq-reader-shell .pyq-palette-btn:focus-visible{
        outline:none !important;
        box-shadow:0 0 0 2px rgba(59,130,246,.14) !important;
    }
}

/* =========================================================
   MOBILE QUESTION PALETTE — COMPACT HEIGHT
   ========================================================= */
@media (max-width:900px){
    .pyq-reader-right .pyq-palette-card{
        max-height:56vh !important;
        overflow:hidden !important;
    }

    .pyq-reader-right .pyq-question-palette{
        max-height:34vh !important;
        gap:5px !important;
        padding:2px 1px 3px 0 !important;
    }

    .pyq-reader-right .pyq-palette-btn{
        min-height:31px !important;
        height:31px !important;
        padding:4px 2px !important;
        border-radius:7px !important;
        font-size:10px !important;
    }

    .pyq-reader-right .pyq-palette-legend{
        margin-top:5px !important;
        padding-top:5px !important;
        gap:4px !important;
    }
}

/* =========================================================
   DARK MODE — MOBILE CONTROLS / SHEETS / READER
   Supports the class names used by the site's dark-mode
   system plus common data-theme fallbacks.
   ========================================================= */
html.dark-mode .pyq-reader-shell,
body.dark-mode .pyq-reader-shell,
html.dark .pyq-reader-shell,
body.dark .pyq-reader-shell,
html[data-theme="dark"] .pyq-reader-shell,
body[data-theme="dark"] .pyq-reader-shell{
    --pyq-soft:#020617 !important;
    --pyq-panel:#0f172a !important;
    --pyq-ink:#e5e7eb !important;
    background:#020617 !important;
    color:#e5e7eb !important;
}

html.dark-mode .pyq-reader-main,
body.dark-mode .pyq-reader-main,
html.dark .pyq-reader-main,
body.dark .pyq-reader-main,
html[data-theme="dark"] .pyq-reader-main,
body[data-theme="dark"] .pyq-reader-main{
    background:#020617 !important;
    color:#e5e7eb !important;
}

html.dark-mode .pyq-reader-main .print-page,
body.dark-mode .pyq-reader-main .print-page,
html.dark .pyq-reader-main .print-page,
body.dark .pyq-reader-main .print-page,
html[data-theme="dark"] .pyq-reader-main .print-page,
body[data-theme="dark"] .pyq-reader-main .print-page{
    background:#0f172a !important;
    color:#e5e7eb !important;
    border-color:#243244 !important;
}

html.dark-mode .pyq-mobile-top-actions,
body.dark-mode .pyq-mobile-top-actions,
html.dark .pyq-mobile-top-actions,
body.dark .pyq-mobile-top-actions,
html[data-theme="dark"] .pyq-mobile-top-actions,
body[data-theme="dark"] .pyq-mobile-top-actions{
    background:#0b1220 !important;
    border-bottom-color:#263445 !important;
    box-shadow:0 2px 12px rgba(0,0,0,.30) !important;
}

html.dark-mode .pyq-mobile-action-btn,
body.dark-mode .pyq-mobile-action-btn,
html.dark .pyq-mobile-action-btn,
body.dark .pyq-mobile-action-btn,
html[data-theme="dark"] .pyq-mobile-action-btn,
body[data-theme="dark"] .pyq-mobile-action-btn{
    background:#111827 !important;
    color:#dbe4ee !important;
    border-color:#334155 !important;
}

html.dark-mode .pyq-mobile-action-btn:hover,
html.dark-mode .pyq-mobile-action-btn:focus,
html.dark-mode .pyq-mobile-action-btn:focus-visible,
html.dark-mode .pyq-mobile-action-btn:active,
body.dark-mode .pyq-mobile-action-btn:hover,
body.dark-mode .pyq-mobile-action-btn:focus,
body.dark-mode .pyq-mobile-action-btn:focus-visible,
body.dark-mode .pyq-mobile-action-btn:active,
html.dark .pyq-mobile-action-btn:hover,
html.dark .pyq-mobile-action-btn:focus,
html.dark .pyq-mobile-action-btn:focus-visible,
html.dark .pyq-mobile-action-btn:active,
body.dark .pyq-mobile-action-btn:hover,
body.dark .pyq-mobile-action-btn:focus,
body.dark .pyq-mobile-action-btn:focus-visible,
body.dark .pyq-mobile-action-btn:active,
html[data-theme="dark"] .pyq-mobile-action-btn:hover,
html[data-theme="dark"] .pyq-mobile-action-btn:focus,
html[data-theme="dark"] .pyq-mobile-action-btn:focus-visible,
html[data-theme="dark"] .pyq-mobile-action-btn:active,
body[data-theme="dark"] .pyq-mobile-action-btn:hover,
body[data-theme="dark"] .pyq-mobile-action-btn:focus,
body[data-theme="dark"] .pyq-mobile-action-btn:focus-visible,
body[data-theme="dark"] .pyq-mobile-action-btn:active{
    background:#172033 !important;
    border-color:#475569 !important;
}

html.dark-mode .pyq-mobile-action-btn.is-active,
html.dark-mode .pyq-mobile-action-btn[aria-expanded="true"],
body.dark-mode .pyq-mobile-action-btn.is-active,
body.dark-mode .pyq-mobile-action-btn[aria-expanded="true"],
html.dark .pyq-mobile-action-btn.is-active,
html.dark .pyq-mobile-action-btn[aria-expanded="true"],
body.dark .pyq-mobile-action-btn.is-active,
body.dark .pyq-mobile-action-btn[aria-expanded="true"],
html[data-theme="dark"] .pyq-mobile-action-btn.is-active,
html[data-theme="dark"] .pyq-mobile-action-btn[aria-expanded="true"],
body[data-theme="dark"] .pyq-mobile-action-btn.is-active,
body[data-theme="dark"] .pyq-mobile-action-btn[aria-expanded="true"]{
    background:#172554 !important;
    color:#bfdbfe !important;
    border-color:#3b82f6 !important;
}

html.dark-mode .pyq-mobile-bottom-nav,
body.dark-mode .pyq-mobile-bottom-nav,
html.dark .pyq-mobile-bottom-nav,
body.dark .pyq-mobile-bottom-nav,
html[data-theme="dark"] .pyq-mobile-bottom-nav,
body[data-theme="dark"] .pyq-mobile-bottom-nav{
    background:rgba(11,18,32,.98) !important;
    border-top-color:#263445 !important;
    box-shadow:0 -5px 18px rgba(0,0,0,.30) !important;
}

html.dark-mode .pyq-mobile-bottom-btn,
body.dark-mode .pyq-mobile-bottom-btn,
html.dark .pyq-mobile-bottom-btn,
body.dark .pyq-mobile-bottom-btn,
html[data-theme="dark"] .pyq-mobile-bottom-btn,
body[data-theme="dark"] .pyq-mobile-bottom-btn{
    background:#111827 !important;
    color:#dbe4ee !important;
    border-color:#334155 !important;
}

html.dark-mode .pyq-mobile-bottom-btn:hover,
html.dark-mode .pyq-mobile-bottom-btn:focus,
html.dark-mode .pyq-mobile-bottom-btn:focus-visible,
html.dark-mode .pyq-mobile-bottom-btn:active,
body.dark-mode .pyq-mobile-bottom-btn:hover,
body.dark-mode .pyq-mobile-bottom-btn:focus,
body.dark-mode .pyq-mobile-bottom-btn:focus-visible,
body.dark-mode .pyq-mobile-bottom-btn:active,
html.dark .pyq-mobile-bottom-btn:hover,
html.dark .pyq-mobile-bottom-btn:focus,
html.dark .pyq-mobile-bottom-btn:focus-visible,
html.dark .pyq-mobile-bottom-btn:active,
body.dark .pyq-mobile-bottom-btn:hover,
body.dark .pyq-mobile-bottom-btn:focus,
body.dark .pyq-mobile-bottom-btn:focus-visible,
body.dark .pyq-mobile-bottom-btn:active,
html[data-theme="dark"] .pyq-mobile-bottom-btn:hover,
html[data-theme="dark"] .pyq-mobile-bottom-btn:focus,
html[data-theme="dark"] .pyq-mobile-bottom-btn:focus-visible,
html[data-theme="dark"] .pyq-mobile-bottom-btn:active,
body[data-theme="dark"] .pyq-mobile-bottom-btn:hover,
body[data-theme="dark"] .pyq-mobile-bottom-btn:focus,
body[data-theme="dark"] .pyq-mobile-bottom-btn:focus-visible,
body[data-theme="dark"] .pyq-mobile-bottom-btn:active{
    background:#172033 !important;
    border-color:#475569 !important;
}

html.dark-mode .pyq-mobile-next-btn,
body.dark-mode .pyq-mobile-next-btn,
html.dark .pyq-mobile-next-btn,
body.dark .pyq-mobile-next-btn,
html[data-theme="dark"] .pyq-mobile-next-btn,
body[data-theme="dark"] .pyq-mobile-next-btn{
    background:#2563eb !important;
    border-color:#3b82f6 !important;
    color:#fff !important;
}

html.dark-mode .pyq-mobile-palette-btn,
body.dark-mode .pyq-mobile-palette-btn,
html.dark .pyq-mobile-palette-btn,
body.dark .pyq-mobile-palette-btn,
html[data-theme="dark"] .pyq-mobile-palette-btn,
body[data-theme="dark"] .pyq-mobile-palette-btn{
    background:#0f172a !important;
}

/* Dark mobile drawer */
html.dark-mode .pyq-reader-left,
body.dark-mode .pyq-reader-left,
html.dark .pyq-reader-left,
body.dark .pyq-reader-left,
html[data-theme="dark"] .pyq-reader-left,
body[data-theme="dark"] .pyq-reader-left{
    background:#020617 !important;
    box-shadow:10px 0 30px rgba(0,0,0,.42) !important;
}

/* Dark bottom sheet */
html.dark-mode .pyq-reader-right .pyq-sidebar-card,
body.dark-mode .pyq-reader-right .pyq-sidebar-card,
html.dark .pyq-reader-right .pyq-sidebar-card,
body.dark .pyq-reader-right .pyq-sidebar-card,
html[data-theme="dark"] .pyq-reader-right .pyq-sidebar-card,
body[data-theme="dark"] .pyq-reader-right .pyq-sidebar-card{
    background:#0f172a !important;
    border-color:#334155 !important;
    box-shadow:0 14px 40px rgba(0,0,0,.48) !important;
}

html.dark-mode .pyq-mobile-panel-close,
body.dark-mode .pyq-mobile-panel-close,
html.dark .pyq-mobile-panel-close,
body.dark .pyq-mobile-panel-close,
html[data-theme="dark"] .pyq-mobile-panel-close,
body[data-theme="dark"] .pyq-mobile-panel-close{
    background:#111827 !important;
    color:#e2e8f0 !important;
    border-color:#475569 !important;
}

/* Dark reader typography and paper elements */
html.dark-mode .pyq-reader-main .paper-title,
body.dark-mode .pyq-reader-main .paper-title,
html.dark .pyq-reader-main .paper-title,
body.dark .pyq-reader-main .paper-title,
html[data-theme="dark"] .pyq-reader-main .paper-title,
body[data-theme="dark"] .pyq-reader-main .paper-title,
html.dark-mode .pyq-reader-main .paper-brand,
body.dark-mode .pyq-reader-main .paper-brand,
html.dark .pyq-reader-main .paper-brand,
body.dark .pyq-reader-main .paper-brand,
html[data-theme="dark"] .pyq-reader-main .paper-brand,
body[data-theme="dark"] .pyq-reader-main .paper-brand,
html.dark-mode .pyq-reader-main .paper-subject,
body.dark-mode .pyq-reader-main .paper-subject,
html.dark .pyq-reader-main .paper-subject,
body.dark .pyq-reader-main .paper-subject,
html[data-theme="dark"] .pyq-reader-main .paper-subject,
body[data-theme="dark"] .pyq-reader-main .paper-subject,
html.dark-mode .pyq-reader-main .paper-set,
body.dark-mode .pyq-reader-main .paper-set,
html.dark .pyq-reader-main .paper-set,
body[data-theme="dark"] .pyq-reader-main .paper-set{
    color:#f8fafc !important;
}

html.dark-mode .pyq-reader-main .paper-meta-table,
body.dark-mode .pyq-reader-main .paper-meta-table,
html.dark .pyq-reader-main .paper-meta-table,
body.dark .pyq-reader-main .paper-meta-table,
html[data-theme="dark"] .pyq-reader-main .paper-meta-table,
body[data-theme="dark"] .pyq-reader-main .paper-meta-table{
    color:#dbe4ee !important;
    background:#0f172a !important;
}

html.dark-mode .pyq-reader-main .paper-meta-table td,
body.dark-mode .pyq-reader-main .paper-meta-table td,
html.dark .pyq-reader-main .paper-meta-table td,
body.dark .pyq-reader-main .paper-meta-table td,
html[data-theme="dark"] .pyq-reader-main .paper-meta-table td,
body[data-theme="dark"] .pyq-reader-main .paper-meta-table td{
    border-color:#334155 !important;
    background:#0f172a !important;
}

html.dark-mode .pyq-reader-main .paper-instructions,
body.dark-mode .pyq-reader-main .paper-instructions,
html.dark .pyq-reader-main .paper-instructions,
body.dark .pyq-reader-main .paper-instructions,
html[data-theme="dark"] .pyq-reader-main .paper-instructions,
body[data-theme="dark"] .pyq-reader-main .paper-instructions{
    color:#cbd5e1 !important;
    background:#111827 !important;
    border-color:#334155 !important;
}

html.dark-mode .pyq-reader-main .question-box,
body.dark-mode .pyq-reader-main .question-box,
html.dark .pyq-reader-main .question-box,
body.dark .pyq-reader-main .question-box,
html[data-theme="dark"] .pyq-reader-main .question-box,
body[data-theme="dark"] .pyq-reader-main .question-box{
    background:#0f172a !important;
    border-color:#334155 !important;
    color:#e5e7eb !important;
    box-shadow:0 2px 8px rgba(0,0,0,.12) !important;
}

html.dark-mode .pyq-reader-main .q-text,
body.dark-mode .pyq-reader-main .q-text,
html.dark .pyq-reader-main .q-text,
body.dark .pyq-reader-main .q-text,
html[data-theme="dark"] .pyq-reader-main .q-text,
body[data-theme="dark"] .pyq-reader-main .q-text,
html.dark-mode .pyq-reader-main .q-number,
body.dark-mode .pyq-reader-main .q-number,
html.dark .pyq-reader-main .q-number,
body.dark .pyq-reader-main .q-number{
    color:#f1f5f9 !important;
}

html.dark-mode .pyq-reader-main .option,
body.dark-mode .pyq-reader-main .option,
html.dark .pyq-reader-main .option,
body.dark .pyq-reader-main .option,
html[data-theme="dark"] .pyq-reader-main .option,
body[data-theme="dark"] .pyq-reader-main .option{
    background:#111827 !important;
    color:#dbe4ee !important;
    border-color:#334155 !important;
}

html.dark-mode .pyq-reader-main .option:hover,
body.dark-mode .pyq-reader-main .option:hover,
html.dark .pyq-reader-main .option:hover,
body.dark .pyq-reader-main .option:hover,
html[data-theme="dark"] .pyq-reader-main .option:hover,
body[data-theme="dark"] .pyq-reader-main .option:hover{
    background:#172033 !important;
    border-color:#475569 !important;
}

html.dark-mode .pyq-reader-main .opt-indicator,
body.dark-mode .pyq-reader-main .opt-indicator,
html.dark .pyq-reader-main .opt-indicator,
body.dark .pyq-reader-main .opt-indicator{
    color:#cbd5e1 !important;
    border-color:#475569 !important;
}

html.dark-mode .pyq-reader-main .solution-wrap,
body.dark-mode .pyq-reader-main .solution-wrap,
html.dark .pyq-reader-main .solution-wrap,
body.dark .pyq-reader-main .solution-wrap,
html[data-theme="dark"] .pyq-reader-main .solution-wrap,
body[data-theme="dark"] .pyq-reader-main .solution-wrap{
    border-color:#334155 !important;
}

html.dark-mode .pyq-reader-main .solution-content,
body.dark-mode .pyq-reader-main .solution-content,
html.dark .pyq-reader-main .solution-content,
body.dark .pyq-reader-main .solution-content,
html[data-theme="dark"] .pyq-reader-main .solution-content,
body[data-theme="dark"] .pyq-reader-main .solution-content{
    background:#111827 !important;
    color:#cbd5e1 !important;
    border-color:#334155 !important;
}

html.dark-mode .pyq-reader-main .view-solution-btn,
body.dark-mode .pyq-reader-main .view-solution-btn,
html.dark .pyq-reader-main .view-solution-btn,
body.dark .pyq-reader-main .view-solution-btn{
    background:#172033 !important;
    color:#dbeafe !important;
    border-color:#334155 !important;
}

html.dark-mode .pyq-reader-main .answer-box,
body.dark-mode .pyq-reader-main .answer-box,
html.dark .pyq-reader-main .answer-box,
body.dark .pyq-reader-main .answer-box,
html[data-theme="dark"] .pyq-reader-main .answer-box,
body[data-theme="dark"] .pyq-reader-main .answer-box{
    background:#0f172a !important;
    color:#dbe4ee !important;
    border-color:#334155 !important;
}

html.dark-mode .pyq-reader-main .answer-chip,
body.dark-mode .pyq-reader-main .answer-chip,
html.dark .pyq-reader-main .answer-chip,
body.dark .pyq-reader-main .answer-chip{
    background:#111827 !important;
    color:#dbe4ee !important;
    border-color:#334155 !important;
}

/* Sidebar text/search in dark mode */
html.dark-mode .pyq-reader-shell .pyq-nav-file,
body.dark-mode .pyq-reader-shell .pyq-nav-file,
html.dark .pyq-reader-shell .pyq-nav-file,
body.dark .pyq-reader-shell .pyq-nav-file,
html[data-theme="dark"] .pyq-reader-shell .pyq-nav-file,
body[data-theme="dark"] .pyq-reader-shell .pyq-nav-file,
html.dark-mode .pyq-reader-shell .pyq-nav-link,
body.dark-mode .pyq-reader-shell .pyq-nav-link,
html.dark .pyq-reader-shell .pyq-nav-link,
body.dark .pyq-reader-shell .pyq-nav-link{
    color:#dbe4ee !important;
}

html.dark-mode .pyq-reader-shell .pyq-nav-file:hover,
body.dark-mode .pyq-reader-shell .pyq-nav-file:hover,
html.dark .pyq-reader-shell .pyq-nav-file:hover,
body.dark .pyq-reader-shell .pyq-nav-file:hover{
    background:#172033 !important;
}

html.dark-mode .pyq-reader-shell .pyq-nav-file.is-active,
body.dark-mode .pyq-reader-shell .pyq-nav-file.is-active,
html.dark .pyq-reader-shell .pyq-nav-file.is-active,
body.dark .pyq-reader-shell .pyq-nav-file.is-active{
    background:#172554 !important;
    border-color:#3b82f6 !important;
    color:#bfdbfe !important;
}

/* Search boxes + quick navigation controls */
html.dark-mode .pyq-reader-shell .pyq-file-search,
body.dark-mode .pyq-reader-shell .pyq-file-search,
html.dark .pyq-reader-shell .pyq-file-search,
body.dark .pyq-reader-shell .pyq-file-search,
html[data-theme="dark"] .pyq-reader-shell .pyq-file-search,
body[data-theme="dark"] .pyq-reader-shell .pyq-file-search,
html.dark-mode .pyq-reader-shell .pyq-left-question-search,
body.dark-mode .pyq-reader-shell .pyq-left-question-search,
html.dark .pyq-reader-shell .pyq-left-question-search,
body.dark .pyq-reader-shell .pyq-left-question-search,
html[data-theme="dark"] .pyq-reader-shell .pyq-left-question-search,
body[data-theme="dark"] .pyq-reader-shell .pyq-left-question-search,
html.dark-mode .pyq-reader-shell .pyq-jump-controls input,
body.dark-mode .pyq-reader-shell .pyq-jump-controls input,
html.dark .pyq-reader-shell .pyq-jump-controls input,
body.dark .pyq-reader-shell .pyq-jump-controls input{
    background:#111827 !important;
    color:#f8fafc !important;
    border-color:#334155 !important;
    color-scheme:dark;
}

html.dark-mode .pyq-reader-shell .pyq-file-search::placeholder,
body.dark-mode .pyq-reader-shell .pyq-file-search::placeholder,
html.dark .pyq-reader-shell .pyq-file-search::placeholder,
body.dark .pyq-reader-shell .pyq-file-search::placeholder,
html.dark-mode .pyq-reader-shell .pyq-left-question-search::placeholder,
body.dark-mode .pyq-reader-shell .pyq-left-question-search::placeholder,
html.dark .pyq-reader-shell .pyq-left-question-search::placeholder,
body.dark .pyq-reader-shell .pyq-left-question-search::placeholder{
    color:#64748b !important;
}

html.dark-mode .pyq-reader-shell .pyq-quick-btn,
body.dark-mode .pyq-reader-shell .pyq-quick-btn,
html.dark .pyq-reader-shell .pyq-quick-btn,
body.dark .pyq-reader-shell .pyq-quick-btn,
html[data-theme="dark"] .pyq-reader-shell .pyq-quick-btn,
body[data-theme="dark"] .pyq-reader-shell .pyq-quick-btn{
    background:#111827 !important;
    color:#dbe4ee !important;
    border-color:#334155 !important;
}

html.dark-mode .pyq-reader-shell .pyq-palette-progress,
body.dark-mode .pyq-reader-shell .pyq-palette-progress,
html.dark .pyq-reader-shell .pyq-palette-progress,
body.dark .pyq-reader-shell .pyq-palette-progress{
    background:#111827 !important;
    color:#dbe4ee !important;
    border-color:#334155 !important;
}

html.dark-mode .pyq-reader-shell .pyq-palette-btn,
body.dark-mode .pyq-reader-shell .pyq-palette-btn,
html.dark .pyq-reader-shell .pyq-palette-btn,
body.dark .pyq-reader-shell .pyq-palette-btn{
    background:#111827 !important;
    color:#dbe4ee !important;
    border-color:#334155 !important;
}

html.dark-mode .pyq-reader-shell .pyq-palette-btn:hover,
body.dark-mode .pyq-reader-shell .pyq-palette-btn:hover,
html.dark .pyq-reader-shell .pyq-palette-btn:hover,
body.dark .pyq-reader-shell .pyq-palette-btn:hover{
    background:#172033 !important;
    border-color:#475569 !important;
}

html.dark-mode .pyq-reader-shell .pyq-palette-btn.is-current,
body.dark-mode .pyq-reader-shell .pyq-palette-btn.is-current,
html.dark .pyq-reader-shell .pyq-palette-btn.is-current,
body.dark .pyq-reader-shell .pyq-palette-btn.is-current,
html[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-current,
body[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-current{
    background:#2563eb !important;
    border-color:#3b82f6 !important;
    color:#fff !important;
}

html.dark-mode .pyq-mobile-backdrop,
body.dark-mode .pyq-mobile-backdrop,
html.dark .pyq-mobile-backdrop,
body.dark .pyq-mobile-backdrop,
html[data-theme="dark"] .pyq-mobile-backdrop,
body[data-theme="dark"] .pyq-mobile-backdrop{
    background:rgba(0,0,0,.60) !important;
}

/* Keep KaTeX visible on dark papers. */
html.dark-mode .pyq-reader-shell .katex,
body.dark-mode .pyq-reader-shell .katex,
html.dark .pyq-reader-shell .katex,
body.dark .pyq-reader-shell .katex,
html[data-theme="dark"] .pyq-reader-shell .katex,
body[data-theme="dark"] .pyq-reader-shell .katex{
    color:#f1f5f9 !important;
}

@media (max-width:420px){
    .pyq-mobile-top-actions{
        gap:4px !important;
        padding:3px 5px !important;
    }

    .pyq-mobile-action-btn{
        min-height:30px !important;
        height:30px !important;
        font-size:9px !important;
        border-radius:7px !important;
    }

    .pyq-mobile-bottom-nav{
        gap:4px !important;
        padding:3px 5px calc(3px + env(safe-area-inset-bottom)) !important;
    }

    .pyq-mobile-bottom-btn,
    .pyq-mobile-next-btn{
        min-height:38px !important;
        height:38px !important;
        font-size:9.5px !important;
        border-radius:8px !important;
    }
}


/* =========================================================
   DARK MODE — COMPLETE READER SURFACE COVERAGE
   ========================================================= */
html.dark-mode .pyq-reader-shell .pyq-sidebar-heading-icon,
body.dark-mode .pyq-reader-shell .pyq-sidebar-heading-icon,
html.dark .pyq-reader-shell .pyq-sidebar-heading-icon,
body.dark .pyq-reader-shell .pyq-sidebar-heading-icon,
html[data-theme="dark"] .pyq-reader-shell .pyq-sidebar-heading-icon,
body[data-theme="dark"] .pyq-reader-shell .pyq-sidebar-heading-icon{
    background:#172554 !important;
    border-color:#334155 !important;
    color:#bfdbfe !important;
}

html.dark-mode .pyq-reader-shell .pyq-nav-section-label,
body.dark-mode .pyq-reader-shell .pyq-nav-section-label,
html.dark .pyq-reader-shell .pyq-nav-section-label,
body.dark .pyq-reader-shell .pyq-nav-section-label,
html[data-theme="dark"] .pyq-reader-shell .pyq-nav-section-label,
body[data-theme="dark"] .pyq-reader-shell .pyq-nav-section-label{
    color:#94a3b8 !important;
}

html.dark-mode .pyq-reader-shell .pyq-nav-empty,
body.dark-mode .pyq-reader-shell .pyq-nav-empty,
html.dark .pyq-reader-shell .pyq-nav-empty,
body.dark .pyq-reader-shell .pyq-nav-empty,
html[data-theme="dark"] .pyq-reader-shell .pyq-nav-empty,
body[data-theme="dark"] .pyq-reader-shell .pyq-nav-empty{
    background:#111827 !important;
    border-color:#334155 !important;
    color:#94a3b8 !important;
}

html.dark-mode .pyq-reader-shell .pyq-nav-link:hover,
body.dark-mode .pyq-reader-shell .pyq-nav-link:hover,
html.dark .pyq-reader-shell .pyq-nav-link:hover,
body.dark .pyq-reader-shell .pyq-nav-link:hover,
html[data-theme="dark"] .pyq-reader-shell .pyq-nav-link:hover,
body[data-theme="dark"] .pyq-reader-shell .pyq-nav-link:hover,
html.dark-mode .pyq-reader-shell .pyq-nav-link:focus-visible,
body.dark-mode .pyq-reader-shell .pyq-nav-link:focus-visible,
html.dark .pyq-reader-shell .pyq-nav-link:focus-visible,
body.dark .pyq-reader-shell .pyq-nav-link:focus-visible{
    background:#172033 !important;
    border-color:#334155 !important;
}

html.dark-mode .pyq-reader-shell .pyq-nav-link.is-active,
body.dark-mode .pyq-reader-shell .pyq-nav-link.is-active,
html.dark .pyq-reader-shell .pyq-nav-link.is-active,
body.dark .pyq-reader-shell .pyq-nav-link.is-active,
html[data-theme="dark"] .pyq-reader-shell .pyq-nav-link.is-active,
body[data-theme="dark"] .pyq-reader-shell .pyq-nav-link.is-active{
    background:#172554 !important;
    border-color:#3b82f6 !important;
    color:#bfdbfe !important;
}

html.dark-mode .pyq-reader-shell .pyq-file-dot,
body.dark-mode .pyq-reader-shell .pyq-file-dot,
html.dark .pyq-reader-shell .pyq-file-dot,
body.dark .pyq-reader-shell .pyq-file-dot{
    background:#64748b !important;
}

html.dark-mode .pyq-reader-shell .pyq-nav-current,
body.dark-mode .pyq-reader-shell .pyq-nav-current,
html.dark .pyq-reader-shell .pyq-nav-current,
body.dark .pyq-reader-shell .pyq-nav-current{
    background:#14532d !important;
    color:#86efac !important;
}

html.dark-mode .pyq-reader-shell .pyq-file-search:focus,
body.dark-mode .pyq-reader-shell .pyq-file-search:focus,
html.dark .pyq-reader-shell .pyq-file-search:focus,
body.dark .pyq-reader-shell .pyq-file-search:focus,
html.dark-mode .pyq-reader-shell .pyq-left-question-search:focus,
body.dark-mode .pyq-reader-shell .pyq-left-question-search:focus,
html.dark .pyq-reader-shell .pyq-left-question-search:focus,
body.dark .pyq-reader-shell .pyq-left-question-search:focus,
html.dark-mode .pyq-reader-shell .pyq-jump-controls input:focus,
body.dark-mode .pyq-reader-shell .pyq-jump-controls input:focus,
html.dark .pyq-reader-shell .pyq-jump-controls input:focus,
body.dark .pyq-reader-shell .pyq-jump-controls input:focus{
    background:#172033 !important;
    border-color:#3b82f6 !important;
    box-shadow:0 0 0 3px rgba(59,130,246,.14) !important;
}

html.dark-mode .pyq-reader-shell .pyq-palette-legend,
body.dark-mode .pyq-reader-shell .pyq-palette-legend,
html.dark .pyq-reader-shell .pyq-palette-legend,
body.dark .pyq-reader-shell .pyq-palette-legend{
    border-top-color:#263445 !important;
}

html.dark-mode .pyq-reader-shell .pyq-palette-legend > div,
body.dark-mode .pyq-reader-shell .pyq-palette-legend > div,
html.dark .pyq-reader-shell .pyq-palette-legend > div,
body.dark .pyq-reader-shell .pyq-palette-legend > div{
    color:#94a3b8 !important;
}

html.dark-mode .pyq-reader-shell .legend-dot,
body.dark-mode .pyq-reader-shell .legend-dot,
html.dark .pyq-reader-shell .legend-dot,
body.dark .pyq-reader-shell .legend-dot{
    background:#111827 !important;
    border-color:#475569 !important;
}

html.dark-mode .pyq-reader-shell .legend-current,
body.dark-mode .pyq-reader-shell .legend-current,
html.dark .pyq-reader-shell .legend-current,
body.dark .pyq-reader-shell .legend-current{
    background:#2563eb !important;
    border-color:#3b82f6 !important;
}

html.dark-mode .pyq-reader-shell .legend-solved,
body.dark-mode .pyq-reader-shell .legend-solved,
html.dark .pyq-reader-shell .legend-solved,
body.dark .pyq-reader-shell .legend-solved{
    background:#14532d !important;
    border-color:#4ade80 !important;
}

html.dark-mode .pyq-reader-shell .pyq-jump-row > label,
body.dark-mode .pyq-reader-shell .pyq-jump-row > label,
html.dark .pyq-reader-shell .pyq-jump-row > label,
body.dark .pyq-reader-shell .pyq-jump-row > label{
    color:#94a3b8 !important;
}

html.dark-mode .pyq-reader-shell .pyq-jump-controls button,
body.dark-mode .pyq-reader-shell .pyq-jump-controls button,
html.dark .pyq-reader-shell .pyq-jump-controls button,
body.dark .pyq-reader-shell .pyq-jump-controls button{
    background:#111827 !important;
    color:#dbe4ee !important;
    border-color:#334155 !important;
    outline:none !important;
}

html.dark-mode .pyq-reader-shell .pyq-jump-controls button:hover,
body.dark-mode .pyq-reader-shell .pyq-jump-controls button:hover,
html.dark .pyq-reader-shell .pyq-jump-controls button:hover,
body.dark .pyq-reader-shell .pyq-jump-controls button:hover,
html.dark-mode .pyq-reader-shell .pyq-quick-btn:hover,
body.dark-mode .pyq-reader-shell .pyq-quick-btn:hover,
html.dark .pyq-reader-shell .pyq-quick-btn:hover,
body.dark .pyq-reader-shell .pyq-quick-btn:hover{
    background:#172033 !important;
    border-color:#475569 !important;
}

html.dark-mode .pyq-reader-shell .pyq-tip-icon,
body.dark-mode .pyq-reader-shell .pyq-tip-icon,
html.dark .pyq-reader-shell .pyq-tip-icon,
body.dark .pyq-reader-shell .pyq-tip-icon{
    background:#3b2611 !important;
    border-color:#7c4a03 !important;
}

html.dark-mode .pyq-reader-shell .pyq-tip-title,
body.dark-mode .pyq-reader-shell .pyq-tip-title,
html.dark .pyq-reader-shell .pyq-tip-title,
body.dark .pyq-reader-shell .pyq-tip-title,
html.dark-mode .pyq-reader-shell .pyq-tip-text,
body.dark-mode .pyq-reader-shell .pyq-tip-text,
html.dark .pyq-reader-shell .pyq-tip-text,
body.dark .pyq-reader-shell .pyq-tip-text{
    color:#dbe4ee !important;
}

html.dark-mode .pyq-reader-main .q-badge,
body.dark-mode .pyq-reader-main .q-badge,
html.dark .pyq-reader-main .q-badge,
body.dark .pyq-reader-main .q-badge{
    background:#172033 !important;
    color:#dbe4ee !important;
    border-color:#334155 !important;
}

html.dark-mode .pyq-reader-main .q-badge.marks,
body.dark-mode .pyq-reader-main .q-badge.marks,
html.dark .pyq-reader-main .q-badge.marks,
body.dark .pyq-reader-main .q-badge.marks{
    background:#052e16 !important;
    color:#86efac !important;
    border-color:#166534 !important;
}

html.dark-mode .pyq-reader-main .q-badge.pyq-badge,
body.dark-mode .pyq-reader-main .q-badge.pyq-badge,
html.dark .pyq-reader-main .q-badge.pyq-badge,
body.dark .pyq-reader-main .q-badge.pyq-badge{
    background:#172554 !important;
    color:#bfdbfe !important;
    border-color:#1d4ed8 !important;
}

html.dark-mode .pyq-reader-main .question-section-divider,
body.dark-mode .pyq-reader-main .question-section-divider,
html.dark .pyq-reader-main .question-section-divider,
body.dark .pyq-reader-main .question-section-divider{
    border-top-color:#334155 !important;
}

/* Prevent a browser/theme button reset from removing the border after tap. */
@media (max-width:900px){
    .pyq-mobile-action-btn,
    .pyq-mobile-bottom-btn,
    .pyq-mobile-panel-close,
    .pyq-palette-btn,
    .pyq-quick-btn,
    .pyq-jump-controls button{
        appearance:none !important;
        -webkit-appearance:none !important;
        border-style:solid !important;
    }

    .pyq-mobile-action-btn:focus:not(:focus-visible),
    .pyq-mobile-bottom-btn:focus:not(:focus-visible),
    .pyq-mobile-panel-close:focus:not(:focus-visible){
        outline:none !important;
    }
}


/* =========================================================
   FINAL MOBILE / PDF CONTROL OVERRIDES
   - Style the actual PDF trigger consistently in light/dark mode.
   - Hide the desktop PDF trigger on mobile (mobile PDF action is used there).
   - Make mobile top and bottom action bars slimmer.
   - In dark mode, Save & Next stays neutral (no blue fill).
   ========================================================= */

.pyq-hidden-pdf-trigger{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-height:32px !important;
    padding:6px 10px !important;
    border:1px solid #d7e0ea !important;
    border-radius:8px !important;
    background:#fff !important;
    color:#334155 !important;
    font-size:11px !important;
    font-weight:700 !important;
    line-height:1 !important;
    box-sizing:border-box !important;
    box-shadow:0 1px 2px rgba(15,23,42,.05) !important;
    appearance:none !important;
    -webkit-appearance:none !important;
}

.pyq-hidden-pdf-trigger:hover,
.pyq-hidden-pdf-trigger:focus,
.pyq-hidden-pdf-trigger:focus-visible,
.pyq-hidden-pdf-trigger:active{
    background:#f8fafc !important;
    border-color:#b8c7d8 !important;
    color:#1e293b !important;
    outline:none !important;
    box-shadow:0 0 0 2px rgba(59,130,246,.10) !important;
}

html.dark-mode .pyq-hidden-pdf-trigger,
body.dark-mode .pyq-hidden-pdf-trigger,
html.dark .pyq-hidden-pdf-trigger,
body.dark .pyq-hidden-pdf-trigger,
html[data-theme="dark"] .pyq-hidden-pdf-trigger,
body[data-theme="dark"] .pyq-hidden-pdf-trigger{
    background:#111827 !important;
    color:#dbe4ee !important;
    border-color:#334155 !important;
    box-shadow:0 1px 2px rgba(0,0,0,.24) !important;
}

html.dark-mode .pyq-hidden-pdf-trigger:hover,
html.dark-mode .pyq-hidden-pdf-trigger:focus,
html.dark-mode .pyq-hidden-pdf-trigger:focus-visible,
html.dark-mode .pyq-hidden-pdf-trigger:active,
body.dark-mode .pyq-hidden-pdf-trigger:hover,
body.dark-mode .pyq-hidden-pdf-trigger:focus,
body.dark-mode .pyq-hidden-pdf-trigger:focus-visible,
body.dark-mode .pyq-hidden-pdf-trigger:active,
html.dark .pyq-hidden-pdf-trigger:hover,
html.dark .pyq-hidden-pdf-trigger:focus,
html.dark .pyq-hidden-pdf-trigger:focus-visible,
html.dark .pyq-hidden-pdf-trigger:active,
body.dark .pyq-hidden-pdf-trigger:hover,
body.dark .pyq-hidden-pdf-trigger:focus,
body.dark .pyq-hidden-pdf-trigger:focus-visible,
body.dark .pyq-hidden-pdf-trigger:active,
html[data-theme="dark"] .pyq-hidden-pdf-trigger:hover,
html[data-theme="dark"] .pyq-hidden-pdf-trigger:focus,
html[data-theme="dark"] .pyq-hidden-pdf-trigger:focus-visible,
html[data-theme="dark"] .pyq-hidden-pdf-trigger:active,
body[data-theme="dark"] .pyq-hidden-pdf-trigger:hover,
body[data-theme="dark"] .pyq-hidden-pdf-trigger:focus,
body[data-theme="dark"] .pyq-hidden-pdf-trigger:focus-visible,
body[data-theme="dark"] .pyq-hidden-pdf-trigger:active{
    background:#172033 !important;
    color:#f1f5f9 !important;
    border-color:#475569 !important;
}

@media (max-width:900px){
    /* The mobile top bar is intentionally compact. */
    .pyq-mobile-top-actions{
        gap:4px !important;
        padding:2px 5px !important;
        min-height:36px !important;
        height:36px !important;
    }

    .pyq-mobile-action-btn{
        min-height:28px !important;
        height:28px !important;
        padding:2px 4px !important;
        border-radius:7px !important;
        font-size:9px !important;
        gap:3px !important;
    }

    /* Never show the desktop PDF trigger on mobile. */
    .pyq-hidden-pdf-trigger{
        display:none !important;
    }

    /* The bottom question bar is also kept slim. */
    .pyq-mobile-bottom-nav{
        gap:4px !important;
        padding:2px 5px calc(2px + env(safe-area-inset-bottom)) !important;
    }

    .pyq-mobile-bottom-btn,
    .pyq-mobile-next-btn{
        min-height:34px !important;
        height:34px !important;
        padding:3px 5px !important;
        border-radius:8px !important;
        font-size:9.5px !important;
    }

    /* Keep interaction borders stable after tap. */
    .pyq-mobile-action-btn:focus,
    .pyq-mobile-action-btn:focus-visible,
    .pyq-mobile-action-btn:active,
    .pyq-mobile-bottom-btn:focus,
    .pyq-mobile-bottom-btn:focus-visible,
    .pyq-mobile-bottom-btn:active{
        border-style:solid !important;
    }
}

/* Save & Next: neutral in dark mode, never blue. */
html.dark-mode .pyq-mobile-next-btn,
body.dark-mode .pyq-mobile-next-btn,
html.dark .pyq-mobile-next-btn,
body.dark .pyq-mobile-next-btn,
html[data-theme="dark"] .pyq-mobile-next-btn,
body[data-theme="dark"] .pyq-mobile-next-btn{
    background:transparent !important;
    color:#dbe4ee !important;
    border-color:#334155 !important;
    box-shadow:none !important;
}

html.dark-mode .pyq-mobile-next-btn:hover,
html.dark-mode .pyq-mobile-next-btn:focus,
html.dark-mode .pyq-mobile-next-btn:focus-visible,
html.dark-mode .pyq-mobile-next-btn:active,
body.dark-mode .pyq-mobile-next-btn:hover,
body.dark-mode .pyq-mobile-next-btn:focus,
body.dark-mode .pyq-mobile-next-btn:focus-visible,
body.dark-mode .pyq-mobile-next-btn:active,
html.dark .pyq-mobile-next-btn:hover,
html.dark .pyq-mobile-next-btn:focus,
html.dark .pyq-mobile-next-btn:focus-visible,
html.dark .pyq-mobile-next-btn:active,
body.dark .pyq-mobile-next-btn:hover,
body.dark .pyq-mobile-next-btn:focus,
body.dark .pyq-mobile-next-btn:focus-visible,
body.dark .pyq-mobile-next-btn:active,
html[data-theme="dark"] .pyq-mobile-next-btn:hover,
html[data-theme="dark"] .pyq-mobile-next-btn:focus,
html[data-theme="dark"] .pyq-mobile-next-btn:focus-visible,
html[data-theme="dark"] .pyq-mobile-next-btn:active,
body[data-theme="dark"] .pyq-mobile-next-btn:hover,
body[data-theme="dark"] .pyq-mobile-next-btn:focus,
body[data-theme="dark"] .pyq-mobile-next-btn:focus-visible,
body[data-theme="dark"] .pyq-mobile-next-btn:active{
    background:transparent !important;
    color:#f1f5f9 !important;
    border-color:#475569 !important;
    box-shadow:none !important;
}

@media (max-width:420px){
    .pyq-mobile-top-actions{
        gap:3px !important;
        padding:2px 4px !important;
        min-height:34px !important;
        height:34px !important;
    }

    .pyq-mobile-action-btn{
        min-height:27px !important;
        height:27px !important;
        padding:2px 3px !important;
        border-radius:6px !important;
        font-size:8.5px !important;
    }

    .pyq-mobile-bottom-nav{
        gap:3px !important;
        padding:2px 4px calc(2px + env(safe-area-inset-bottom)) !important;
    }

    .pyq-mobile-bottom-btn,
    .pyq-mobile-next-btn{
        min-height:32px !important;
        height:32px !important;
        padding:2px 4px !important;
        border-radius:7px !important;
        font-size:9px !important;
    }
}


/* =========================================================
   PALETTE — SOLUTION VIEWED STATE
   Purple is reserved for questions whose solution was opened.
   Correct / wrong answer states remain green / red.
   ========================================================= */
.pyq-reader-shell .pyq-palette-btn.is-solution-viewed:not(.is-correct):not(.is-wrong){
    background:#f3e8ff !important;
    border-color:#a855f7 !important;
    color:#7e22ce !important;
    box-shadow:none !important;
}

.pyq-reader-shell .pyq-palette-btn.is-solution-viewed:not(.is-correct):not(.is-wrong):hover{
    background:#ede9fe !important;
    border-color:#9333ea !important;
    color:#6b21a8 !important;
}

/* =========================================================
   PALETTE ANSWER RESULT — DARK MODE
   ========================================================= */
html.dark-mode .pyq-reader-shell .pyq-palette-btn.is-solution-viewed:not(.is-correct):not(.is-wrong),
body.dark-mode .pyq-reader-shell .pyq-palette-btn.is-solution-viewed:not(.is-correct):not(.is-wrong),
html.dark .pyq-reader-shell .pyq-palette-btn.is-solution-viewed:not(.is-correct):not(.is-wrong),
body.dark .pyq-reader-shell .pyq-palette-btn.is-solution-viewed:not(.is-correct):not(.is-wrong),
html[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-solution-viewed:not(.is-correct):not(.is-wrong),
body[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-solution-viewed:not(.is-correct):not(.is-wrong){
    background:#2e1065 !important;
    border-color:#a855f7 !important;
    color:#d8b4fe !important;
    box-shadow:none !important;
}

html.dark-mode .pyq-reader-shell .pyq-palette-btn.is-correct,
body.dark-mode .pyq-reader-shell .pyq-palette-btn.is-correct,
html.dark .pyq-reader-shell .pyq-palette-btn.is-correct,
body.dark .pyq-reader-shell .pyq-palette-btn.is-correct,
html[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-correct,
body[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-correct{
    background:#052e16 !important;
    border-color:#22c55e !important;
    color:#86efac !important;
    box-shadow:none !important;
}

html.dark-mode .pyq-reader-shell .pyq-palette-btn.is-wrong,
body.dark-mode .pyq-reader-shell .pyq-palette-btn.is-wrong,
html.dark .pyq-reader-shell .pyq-palette-btn.is-wrong,
body.dark .pyq-reader-shell .pyq-palette-btn.is-wrong,
html[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-wrong,
body[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-wrong{
    background:#450a0a !important;
    border-color:#ef4444 !important;
    color:#fca5a5 !important;
    box-shadow:none !important;
}

html.dark-mode .pyq-reader-shell .pyq-palette-btn.is-current.is-correct,
body.dark-mode .pyq-reader-shell .pyq-palette-btn.is-current.is-correct,
html.dark .pyq-reader-shell .pyq-palette-btn.is-current.is-correct,
body.dark .pyq-reader-shell .pyq-palette-btn.is-current.is-correct,
html[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-current.is-correct,
body[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-current.is-correct{
    box-shadow:0 0 0 2px rgba(34,197,94,.28) !important;
}

html.dark-mode .pyq-reader-shell .pyq-palette-btn.is-current.is-wrong,
body.dark-mode .pyq-reader-shell .pyq-palette-btn.is-current.is-wrong,
html.dark .pyq-reader-shell .pyq-palette-btn.is-current.is-wrong,
body.dark .pyq-reader-shell .pyq-palette-btn.is-current.is-wrong,
html[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-current.is-wrong,
body[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-current.is-wrong{
    box-shadow:0 0 0 2px rgba(239,68,68,.28) !important;
}

/* =========================================================
   FINAL PYQ NAV + PALETTE STATUS POLISH
   ========================================================= */

/* Compact two-option switch for the left PYQ Files sidebar. */
.pyq-nav-mode-tabs{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:4px !important;
    width:100%;
    margin:0 0 8px !important;
    padding:3px !important;
    border:1px solid #e2e8f0 !important;
    border-radius:9px !important;
    background:#f8fafc !important;
    box-sizing:border-box !important;
}

.pyq-nav-mode-tab{
    appearance:none !important;
    -webkit-appearance:none !important;
    width:100% !important;
    min-width:0 !important;
    min-height:30px !important;
    padding:5px 6px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:4px !important;
    border:1px solid transparent !important;
    border-radius:7px !important;
    background:transparent !important;
    color:#64748b !important;
    font-size:9px !important;
    font-weight:800 !important;
    line-height:1 !important;
    cursor:pointer !important;
    box-sizing:border-box !important;
    outline:none !important;
    transition:background-color .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease !important;
}

.pyq-nav-mode-tab:hover{
    background:#fff !important;
    border-color:#dbe3ed !important;
    color:#334155 !important;
}

.pyq-nav-mode-tab:focus-visible,
.pyq-nav-mode-tab:active{
    outline:none !important;
    border-color:#93a8bf !important;
    box-shadow:0 0 0 2px rgba(59,130,246,.10) !important;
}

.pyq-nav-mode-tab.is-active{
    background:#fff !important;
    border-color:#bfdbfe !important;
    color:#1d4ed8 !important;
    box-shadow:0 1px 3px rgba(15,23,42,.06) !important;
}

.pyq-nav-mode-panel[hidden]{
    display:none !important;
}

.pyq-nav-mode-panel{
    display:block;
}

/* Four compact legend states: Current / Wrong / Right / View. */
.pyq-palette-legend{
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
}

.pyq-palette-legend .legend-wrong{
    background:#fef2f2 !important;
    border-color:#fca5a5 !important;
}

.pyq-palette-legend .legend-right{
    background:#ecfdf5 !important;
    border-color:#86efac !important;
}

.pyq-palette-legend .legend-view{
    background:#f3e8ff !important;
    border-color:#c084fc !important;
}

/* The most recently viewed state wins over Current/Right/Wrong colours. */
.pyq-reader-shell .pyq-palette-btn.is-solution-viewed{
    background:#f3e8ff !important;
    border-color:#a855f7 !important;
    color:#7e22ce !important;
    box-shadow:none !important;
}

/* Keep the four status colours visible in dark mode too. */
html.dark-mode .pyq-reader-shell .pyq-nav-mode-tabs,
body.dark-mode .pyq-reader-shell .pyq-nav-mode-tabs,
html.dark .pyq-reader-shell .pyq-nav-mode-tabs,
body.dark .pyq-reader-shell .pyq-nav-mode-tabs,
html[data-theme="dark"] .pyq-reader-shell .pyq-nav-mode-tabs,
body[data-theme="dark"] .pyq-reader-shell .pyq-nav-mode-tabs{
    background:#111827 !important;
    border-color:#334155 !important;
}

html.dark-mode .pyq-reader-shell .pyq-nav-mode-tab,
body.dark-mode .pyq-reader-shell .pyq-nav-mode-tab,
html.dark .pyq-reader-shell .pyq-nav-mode-tab,
body.dark .pyq-reader-shell .pyq-nav-mode-tab,
html[data-theme="dark"] .pyq-reader-shell .pyq-nav-mode-tab,
body[data-theme="dark"] .pyq-reader-shell .pyq-nav-mode-tab{
    color:#94a3b8 !important;
}

html.dark-mode .pyq-reader-shell .pyq-nav-mode-tab:hover,
body.dark-mode .pyq-reader-shell .pyq-nav-mode-tab:hover,
html.dark .pyq-reader-shell .pyq-nav-mode-tab:hover,
body.dark .pyq-reader-shell .pyq-nav-mode-tab:hover,
html[data-theme="dark"] .pyq-reader-shell .pyq-nav-mode-tab:hover,
body[data-theme="dark"] .pyq-reader-shell .pyq-nav-mode-tab:hover{
    background:#172033 !important;
    border-color:#475569 !important;
    color:#e2e8f0 !important;
}

html.dark-mode .pyq-reader-shell .pyq-nav-mode-tab.is-active,
body.dark-mode .pyq-reader-shell .pyq-nav-mode-tab.is-active,
html.dark .pyq-reader-shell .pyq-nav-mode-tab.is-active,
body.dark .pyq-reader-shell .pyq-nav-mode-tab.is-active,
html[data-theme="dark"] .pyq-reader-shell .pyq-nav-mode-tab.is-active,
body[data-theme="dark"] .pyq-reader-shell .pyq-nav-mode-tab.is-active{
    background:#172554 !important;
    border-color:#3b82f6 !important;
    color:#bfdbfe !important;
}

html.dark-mode .pyq-reader-shell .pyq-nav-mode-tab:focus-visible,
body.dark-mode .pyq-reader-shell .pyq-nav-mode-tab:focus-visible,
html.dark .pyq-reader-shell .pyq-nav-mode-tab:focus-visible,
body.dark .pyq-reader-shell .pyq-nav-mode-tab:focus-visible,
html[data-theme="dark"] .pyq-reader-shell .pyq-nav-mode-tab:focus-visible,
body[data-theme="dark"] .pyq-reader-shell .pyq-nav-mode-tab:focus-visible{
    border-color:#64748b !important;
    box-shadow:0 0 0 2px rgba(96,165,250,.12) !important;
}

html.dark-mode .pyq-reader-shell .pyq-palette-legend .legend-wrong,
body.dark-mode .pyq-reader-shell .pyq-palette-legend .legend-wrong,
html.dark .pyq-reader-shell .pyq-palette-legend .legend-wrong,
body.dark .pyq-reader-shell .pyq-palette-legend .legend-wrong,
html[data-theme="dark"] .pyq-reader-shell .pyq-palette-legend .legend-wrong,
body[data-theme="dark"] .pyq-reader-shell .pyq-palette-legend .legend-wrong{
    background:#450a0a !important;
    border-color:#ef4444 !important;
}

html.dark-mode .pyq-reader-shell .pyq-palette-legend .legend-right,
body.dark-mode .pyq-reader-shell .pyq-palette-legend .legend-right,
html.dark .pyq-reader-shell .pyq-palette-legend .legend-right,
body.dark .pyq-reader-shell .pyq-palette-legend .legend-right,
html[data-theme="dark"] .pyq-reader-shell .pyq-palette-legend .legend-right,
body[data-theme="dark"] .pyq-reader-shell .pyq-palette-legend .legend-right{
    background:#052e16 !important;
    border-color:#22c55e !important;
}

html.dark-mode .pyq-reader-shell .pyq-palette-legend .legend-view,
body.dark-mode .pyq-reader-shell .pyq-palette-legend .legend-view,
html.dark .pyq-reader-shell .pyq-palette-legend .legend-view,
body.dark .pyq-reader-shell .pyq-palette-legend .legend-view,
html[data-theme="dark"] .pyq-reader-shell .pyq-palette-legend .legend-view,
body[data-theme="dark"] .pyq-reader-shell .pyq-palette-legend .legend-view{
    background:#2e1065 !important;
    border-color:#a855f7 !important;
}

html.dark-mode .pyq-reader-shell .pyq-palette-btn.is-solution-viewed,
body.dark-mode .pyq-reader-shell .pyq-palette-btn.is-solution-viewed,
html.dark .pyq-reader-shell .pyq-palette-btn.is-solution-viewed,
body.dark .pyq-reader-shell .pyq-palette-btn.is-solution-viewed,
html[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-solution-viewed,
body[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-solution-viewed{
    background:#2e1065 !important;
    border-color:#a855f7 !important;
    color:#d8b4fe !important;
    box-shadow:none !important;
}

@media (max-width:900px){
    .pyq-nav-mode-tabs{
        gap:3px !important;
        margin-bottom:7px !important;
        padding:2px !important;
        border-radius:8px !important;
    }

    .pyq-nav-mode-tab{
        min-height:28px !important;
        padding:4px 5px !important;
        border-radius:6px !important;
        font-size:8.5px !important;
    }

    .pyq-palette-legend{
        grid-template-columns:repeat(4,minmax(0,1fr)) !important;
        gap:3px !important;
    }

    .pyq-palette-legend > div{
        justify-content:center !important;
        gap:3px !important;
        font-size:7px !important;
        white-space:nowrap !important;
    }
}

/* =========================================================
   FINAL STABLE READER NAVIGATION / PALETTE FIX
   ---------------------------------------------------------
   - Standard left PYQ Files sidebar with a true two-tab switch.
   - Active tab/list item keeps a stable border and does not
     lose its visual state on click/focus.
   - Palette status colors: Right=green, Wrong=red,
     View Solution=purple.
   - The status color remains visible even when that question
     becomes the current question.
   ========================================================= */

/* ---------- Left sidebar ---------- */
.pyq-reader-shell .pyq-file-nav-card{
    padding:12px !important;
    border:1px solid #dbe3ed !important;
    background:#ffffff !important;
}

.pyq-reader-shell .pyq-file-nav-card .pyq-sidebar-heading{
    margin-bottom:9px !important;
    padding-bottom:9px !important;
    border-bottom:1px solid #edf2f7 !important;
}

.pyq-reader-shell .pyq-nav-mode-tabs{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:4px !important;
    width:100% !important;
    padding:3px !important;
    margin:2px 0 9px !important;
    border:1px solid #dbe3ed !important;
    border-radius:10px !important;
    background:#f8fafc !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.8) !important;
}

.pyq-reader-shell .pyq-nav-mode-tab{
    appearance:none !important;
    -webkit-appearance:none !important;
    min-width:0 !important;
    min-height:34px !important;
    height:34px !important;
    margin:0 !important;
    padding:5px 7px !important;
    border:1px solid transparent !important;
    border-radius:7px !important;
    background:transparent !important;
    color:#64748b !important;
    font-size:10px !important;
    font-weight:800 !important;
    line-height:1 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:4px !important;
    cursor:pointer !important;
    outline:none !important;
    box-shadow:none !important;
    transition:background-color .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease !important;
}

.pyq-reader-shell .pyq-nav-mode-tab:hover{
    background:#ffffff !important;
    border-color:#dbe3ed !important;
    color:#334155 !important;
}

.pyq-reader-shell .pyq-nav-mode-tab:focus,
.pyq-reader-shell .pyq-nav-mode-tab:focus-visible,
.pyq-reader-shell .pyq-nav-mode-tab:active{
    outline:none !important;
    border-color:#93a8bf !important;
    background:#ffffff !important;
    color:#334155 !important;
    box-shadow:0 0 0 2px rgba(37,99,235,.08) !important;
}

.pyq-reader-shell .pyq-nav-mode-tab.is-active{
    background:#ffffff !important;
    border-color:#bfdbfe !important;
    color:#1d4ed8 !important;
    box-shadow:0 1px 3px rgba(15,23,42,.08) !important;
}

.pyq-reader-shell .pyq-nav-mode-panel{
    width:100% !important;
    min-width:0 !important;
}

.pyq-reader-shell .pyq-nav-file-list{
    gap:3px !important;
}

.pyq-reader-shell .pyq-nav-file{
    min-height:34px !important;
    padding:7px 8px !important;
    border:1px solid transparent !important;
    border-radius:8px !important;
    background:transparent !important;
    color:#334155 !important;
    font-size:10px !important;
    font-weight:700 !important;
    line-height:1.2 !important;
    transition:background-color .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease !important;
}

.pyq-reader-shell .pyq-nav-file:hover{
    background:#f8fafc !important;
    border-color:#e2e8f0 !important;
    color:#0f172a !important;
}

.pyq-reader-shell .pyq-nav-file:focus,
.pyq-reader-shell .pyq-nav-file:focus-visible{
    outline:none !important;
    background:#f8fafc !important;
    border-color:#bfdbfe !important;
    color:#0f172a !important;
    box-shadow:0 0 0 2px rgba(37,99,235,.08) !important;
}

.pyq-reader-shell .pyq-nav-file:active{
    background:#eff6ff !important;
    border-color:#93c5fd !important;
}

.pyq-reader-shell .pyq-nav-file.is-active{
    background:#eff6ff !important;
    border-color:#bfdbfe !important;
    color:#1d4ed8 !important;
    box-shadow:inset 3px 0 0 #2563eb !important;
}

.pyq-reader-shell .pyq-nav-file.is-active:hover,
.pyq-reader-shell .pyq-nav-file.is-active:focus,
.pyq-reader-shell .pyq-nav-file.is-active:focus-visible{
    background:#eaf2ff !important;
    border-color:#93c5fd !important;
    color:#1d4ed8 !important;
    box-shadow:inset 3px 0 0 #2563eb,0 0 0 2px rgba(37,99,235,.07) !important;
}

.pyq-reader-shell .pyq-nav-current{
    margin-left:auto !important;
    flex:0 0 auto !important;
    width:16px !important;
    height:16px !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    border:1px solid #bfdbfe !important;
    border-radius:5px !important;
    background:#ffffff !important;
    color:#2563eb !important;
    font-size:9px !important;
    font-weight:900 !important;
}

/* When only one published list exists, make the remaining tab fill the bar. */
.pyq-reader-shell .pyq-nav-mode-tabs:has(.pyq-nav-mode-tab:only-child){
    grid-template-columns:1fr !important;
}

/* ---------- Palette result states ---------- */
.pyq-reader-shell .pyq-palette-btn.is-correct,
.pyq-reader-shell .pyq-palette-btn.is-current.is-correct{
    background:#ecfdf5 !important;
    border-color:#22c55e !important;
    color:#15803d !important;
    box-shadow:none !important;
}

.pyq-reader-shell .pyq-palette-btn.is-wrong,
.pyq-reader-shell .pyq-palette-btn.is-current.is-wrong{
    background:#fef2f2 !important;
    border-color:#ef4444 !important;
    color:#b91c1c !important;
    box-shadow:none !important;
}

.pyq-reader-shell .pyq-palette-btn.is-solution-viewed,
.pyq-reader-shell .pyq-palette-btn.is-current.is-solution-viewed{
    background:#f3e8ff !important;
    border-color:#a855f7 !important;
    color:#7e22ce !important;
    box-shadow:none !important;
}

.pyq-reader-shell .pyq-palette-btn.is-correct:focus,
.pyq-reader-shell .pyq-palette-btn.is-correct:focus-visible{
    box-shadow:0 0 0 2px rgba(34,197,94,.16) !important;
}

.pyq-reader-shell .pyq-palette-btn.is-wrong:focus,
.pyq-reader-shell .pyq-palette-btn.is-wrong:focus-visible{
    box-shadow:0 0 0 2px rgba(239,68,68,.16) !important;
}

.pyq-reader-shell .pyq-palette-btn.is-solution-viewed:focus,
.pyq-reader-shell .pyq-palette-btn.is-solution-viewed:focus-visible{
    box-shadow:0 0 0 2px rgba(168,85,247,.18) !important;
}

/* ---------- Dark mode ---------- */
html.dark-mode .pyq-reader-shell .pyq-file-nav-card,
body.dark-mode .pyq-reader-shell .pyq-file-nav-card,
html.dark .pyq-reader-shell .pyq-file-nav-card,
body.dark .pyq-reader-shell .pyq-file-nav-card,
html[data-theme="dark"] .pyq-reader-shell .pyq-file-nav-card,
body[data-theme="dark"] .pyq-reader-shell .pyq-file-nav-card{
    background:#0f172a !important;
    border-color:#334155 !important;
}

html.dark-mode .pyq-reader-shell .pyq-file-nav-card .pyq-sidebar-heading,
body.dark-mode .pyq-reader-shell .pyq-file-nav-card .pyq-sidebar-heading,
html.dark .pyq-reader-shell .pyq-file-nav-card .pyq-sidebar-heading,
body.dark .pyq-reader-shell .pyq-file-nav-card .pyq-sidebar-heading,
html[data-theme="dark"] .pyq-reader-shell .pyq-file-nav-card .pyq-sidebar-heading,
body[data-theme="dark"] .pyq-reader-shell .pyq-file-nav-card .pyq-sidebar-heading{
    border-bottom-color:#1e293b !important;
}

html.dark-mode .pyq-reader-shell .pyq-nav-mode-tabs,
body.dark-mode .pyq-reader-shell .pyq-nav-mode-tabs,
html.dark .pyq-reader-shell .pyq-nav-mode-tabs,
body.dark .pyq-reader-shell .pyq-nav-mode-tabs,
html[data-theme="dark"] .pyq-reader-shell .pyq-nav-mode-tabs,
body[data-theme="dark"] .pyq-reader-shell .pyq-nav-mode-tabs{
    background:#111827 !important;
    border-color:#334155 !important;
}

html.dark-mode .pyq-reader-shell .pyq-nav-mode-tab,
body.dark-mode .pyq-reader-shell .pyq-nav-mode-tab,
html.dark .pyq-reader-shell .pyq-nav-mode-tab,
body.dark .pyq-reader-shell .pyq-nav-mode-tab,
html[data-theme="dark"] .pyq-reader-shell .pyq-nav-mode-tab,
body[data-theme="dark"] .pyq-reader-shell .pyq-nav-mode-tab{
    color:#94a3b8 !important;
}

html.dark-mode .pyq-reader-shell .pyq-nav-mode-tab:hover,
body.dark-mode .pyq-reader-shell .pyq-nav-mode-tab:hover,
html.dark .pyq-reader-shell .pyq-nav-mode-tab:hover,
body.dark .pyq-reader-shell .pyq-nav-mode-tab:hover,
html[data-theme="dark"] .pyq-reader-shell .pyq-nav-mode-tab:hover,
body[data-theme="dark"] .pyq-reader-shell .pyq-nav-mode-tab:hover,
html.dark-mode .pyq-reader-shell .pyq-nav-mode-tab:focus,
body.dark-mode .pyq-reader-shell .pyq-nav-mode-tab:focus,
html.dark .pyq-reader-shell .pyq-nav-mode-tab:focus,
body.dark .pyq-reader-shell .pyq-nav-mode-tab:focus,
html[data-theme="dark"] .pyq-reader-shell .pyq-nav-mode-tab:focus,
body[data-theme="dark"] .pyq-reader-shell .pyq-nav-mode-tab:focus{
    background:#172033 !important;
    border-color:#475569 !important;
    color:#e2e8f0 !important;
}

html.dark-mode .pyq-reader-shell .pyq-nav-mode-tab.is-active,
body.dark-mode .pyq-reader-shell .pyq-nav-mode-tab.is-active,
html.dark .pyq-reader-shell .pyq-nav-mode-tab.is-active,
body.dark .pyq-reader-shell .pyq-nav-mode-tab.is-active,
html[data-theme="dark"] .pyq-reader-shell .pyq-nav-mode-tab.is-active,
body[data-theme="dark"] .pyq-reader-shell .pyq-nav-mode-tab.is-active{
    background:#172554 !important;
    border-color:#3b82f6 !important;
    color:#bfdbfe !important;
}

html.dark-mode .pyq-reader-shell .pyq-nav-file,
body.dark-mode .pyq-reader-shell .pyq-nav-file,
html.dark .pyq-reader-shell .pyq-nav-file,
body.dark .pyq-reader-shell .pyq-nav-file,
html[data-theme="dark"] .pyq-reader-shell .pyq-nav-file,
body[data-theme="dark"] .pyq-reader-shell .pyq-nav-file{
    color:#cbd5e1 !important;
}

html.dark-mode .pyq-reader-shell .pyq-nav-file:hover,
body.dark-mode .pyq-reader-shell .pyq-nav-file:hover,
html.dark .pyq-reader-shell .pyq-nav-file:hover,
body.dark .pyq-reader-shell .pyq-nav-file:hover,
html[data-theme="dark"] .pyq-reader-shell .pyq-nav-file:hover,
body[data-theme="dark"] .pyq-reader-shell .pyq-nav-file:hover,
html.dark-mode .pyq-reader-shell .pyq-nav-file:focus,
body.dark-mode .pyq-reader-shell .pyq-nav-file:focus,
html.dark .pyq-reader-shell .pyq-nav-file:focus,
body.dark .pyq-reader-shell .pyq-nav-file:focus,
html[data-theme="dark"] .pyq-reader-shell .pyq-nav-file:focus,
body[data-theme="dark"] .pyq-reader-shell .pyq-nav-file:focus{
    background:#172033 !important;
    border-color:#475569 !important;
    color:#f8fafc !important;
}

html.dark-mode .pyq-reader-shell .pyq-nav-file.is-active,
body.dark-mode .pyq-reader-shell .pyq-nav-file.is-active,
html.dark .pyq-reader-shell .pyq-nav-file.is-active,
body.dark .pyq-reader-shell .pyq-nav-file.is-active,
html[data-theme="dark"] .pyq-reader-shell .pyq-nav-file.is-active,
body[data-theme="dark"] .pyq-reader-shell .pyq-nav-file.is-active{
    background:#172554 !important;
    border-color:#3b82f6 !important;
    color:#bfdbfe !important;
    box-shadow:inset 3px 0 0 #60a5fa !important;
}

html.dark-mode .pyq-reader-shell .pyq-nav-current,
body.dark-mode .pyq-reader-shell .pyq-nav-current,
html.dark .pyq-reader-shell .pyq-nav-current,
body.dark .pyq-reader-shell .pyq-nav-current,
html[data-theme="dark"] .pyq-reader-shell .pyq-nav-current,
body[data-theme="dark"] .pyq-reader-shell .pyq-nav-current{
    background:#0f172a !important;
    border-color:#475569 !important;
    color:#60a5fa !important;
}

html.dark-mode .pyq-reader-shell .pyq-palette-btn.is-correct,
body.dark-mode .pyq-reader-shell .pyq-palette-btn.is-correct,
html.dark .pyq-reader-shell .pyq-palette-btn.is-correct,
body.dark .pyq-reader-shell .pyq-palette-btn.is-correct,
html[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-correct,
body[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-correct{
    background:#052e16 !important;
    border-color:#22c55e !important;
    color:#86efac !important;
}

html.dark-mode .pyq-reader-shell .pyq-palette-btn.is-wrong,
body.dark-mode .pyq-reader-shell .pyq-palette-btn.is-wrong,
html.dark .pyq-reader-shell .pyq-palette-btn.is-wrong,
body.dark .pyq-reader-shell .pyq-palette-btn.is-wrong,
html[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-wrong,
body[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-wrong{
    background:#450a0a !important;
    border-color:#ef4444 !important;
    color:#fca5a5 !important;
}

html.dark-mode .pyq-reader-shell .pyq-palette-btn.is-solution-viewed,
body.dark-mode .pyq-reader-shell .pyq-palette-btn.is-solution-viewed,
html.dark .pyq-reader-shell .pyq-palette-btn.is-solution-viewed,
body.dark .pyq-reader-shell .pyq-palette-btn.is-solution-viewed,
html[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-solution-viewed,
body[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-solution-viewed{
    background:#2e1065 !important;
    border-color:#a855f7 !important;
    color:#d8b4fe !important;
}

@media (max-width:900px){
    .pyq-reader-shell .pyq-file-nav-card{
        padding:10px !important;
    }

    .pyq-reader-shell .pyq-nav-mode-tabs{
        margin-bottom:8px !important;
        padding:2px !important;
        border-radius:9px !important;
    }

    .pyq-reader-shell .pyq-nav-mode-tab{
        min-height:32px !important;
        height:32px !important;
        padding:4px 5px !important;
        border-radius:7px !important;
        font-size:9px !important;
    }

    .pyq-reader-shell .pyq-nav-file{
        min-height:35px !important;
        padding:7px 8px !important;
        font-size:10px !important;
    }
}


/* =========================================================
   PYQ READER — SCROLL STABILITY / PALETTE SYNC FINAL
   ========================================================= */
.pyq-reader-main .pyq-reader-question-scroll{
    touch-action:pan-y !important;
    overscroll-behavior-y:contain !important;
    scroll-snap-type:none !important;
    scroll-behavior:auto !important;
}

.pyq-question-box,
.pyq-palette-btn,
.pyq-palette-current-label{
    -webkit-backface-visibility:hidden;
    backface-visibility:hidden;
}

.pyq-reader-shell .pyq-palette-btn{
    transition:
        background-color .16s ease,
        border-color .16s ease,
        color .16s ease,
        box-shadow .16s ease,
        transform .12s ease !important;
}

@media (max-width:900px){
    .pyq-reader-shell{
        height:100dvh !important;
        max-height:none !important;
    }

    .pyq-reader-main .pyq-reader-question-scroll{
        touch-action:pan-y !important;
        -webkit-overflow-scrolling:touch !important;
        overscroll-behavior-y:contain !important;
        overflow-y:scroll !important;
    }
}


/* =========================================================
   FINAL SOLUTION-REVEAL STATE — HIGHEST PRIORITY
   When View Solution is opened, the question is read-only and
   the actual correct option is always purple. These selectors
   intentionally come last so they override dark-mode .option
   rules and disabled-button rules from earlier blocks.
   ========================================================= */
.pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option.solution-correct,
.pyq-reader-shell .pyq-reader-main .question-box.active-solution .option.solution-correct,
.pyq-reader-shell .pyq-reader-main .option.solution-correct,
.pyq-reader-shell .pyq-reader-main .option.solution-correct:hover,
.pyq-reader-shell .pyq-reader-main .option.solution-correct:disabled,
.pyq-reader-shell .pyq-reader-main .option.solution-correct:disabled:hover{
    background:#ede9fe !important;
    background-image:none !important;
    border-color:#a855f7 !important;
    color:#6d28d9 !important;
    box-shadow:0 0 0 1px rgba(168,85,247,.08) !important;
    opacity:1 !important;
    transform:none !important;
    cursor:default !important;
    pointer-events:none !important;
}

.pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option.solution-correct .opt-indicator,
.pyq-reader-shell .pyq-reader-main .question-box.active-solution .option.solution-correct .opt-indicator{
    background:#7c3aed !important;
    border-color:#ffffff !important;
    color:#ffffff !important;
    box-shadow:0 0 0 2px #7c3aed !important;
}

.pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option:not(.solution-correct),
.pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option:not(.solution-correct):hover,
.pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option:not(.solution-correct):disabled,
.pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option:not(.solution-correct):disabled:hover{
    cursor:default !important;
    pointer-events:none !important;
}

/* Final dark-mode override: the purple solution state must remain purple. */
html.dark-mode .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option.solution-correct,
body.dark-mode .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option.solution-correct,
html.dark .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option.solution-correct,
body.dark .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option.solution-correct,
html[data-theme="dark"] .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option.solution-correct,
body[data-theme="dark"] .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option.solution-correct{
    background:#2e1065 !important;
    background-image:none !important;
    border-color:#a855f7 !important;
    color:#d8b4fe !important;
    box-shadow:0 0 0 1px rgba(168,85,247,.18) !important;
    opacity:1 !important;
}

html.dark-mode .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option.solution-correct .opt-indicator,
body.dark-mode .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option.solution-correct .opt-indicator,
html.dark .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option.solution-correct .opt-indicator,
body.dark .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option.solution-correct .opt-indicator,
html[data-theme="dark"] .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option.solution-correct .opt-indicator,
body[data-theme="dark"] .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option.solution-correct .opt-indicator{
    background:#7c3aed !important;
    border-color:#ffffff !important;
    color:#ffffff !important;
    box-shadow:0 0 0 2px #7c3aed !important;
}

/* Keep the palette purple for a revealed solution, regardless of current-state classes. */
.pyq-reader-shell .pyq-palette-btn[data-answer-state="view"],
.pyq-reader-shell .pyq-palette-btn.is-solution-viewed,
.pyq-reader-shell .pyq-palette-btn.is-current.is-solution-viewed{
    background:#f3e8ff !important;
    border-color:#a855f7 !important;
    color:#7e22ce !important;
    box-shadow:none !important;
}

html.dark-mode .pyq-reader-shell .pyq-palette-btn[data-answer-state="view"],
body.dark-mode .pyq-reader-shell .pyq-palette-btn[data-answer-state="view"],
html.dark .pyq-reader-shell .pyq-palette-btn[data-answer-state="view"],
body.dark .pyq-reader-shell .pyq-palette-btn[data-answer-state="view"],
html[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn[data-answer-state="view"],
body[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn[data-answer-state="view"]{
    background:#2e1065 !important;
    border-color:#a855f7 !important;
    color:#d8b4fe !important;
}


/* =========================================================
   FINAL QUESTION SCROLL PERFORMANCE / SMOOTHNESS OVERRIDE
   ========================================================= */
.pyq-reader-main .pyq-reader-question-scroll{
    scroll-behavior:smooth !important;
    scroll-snap-type:none !important;
    overscroll-behavior-y:contain !important;
    touch-action:pan-y !important;
}

/* Keep user wheel/touch scrolling native; JS never intercepts it. */
.pyq-reader-main .pyq-reader-question-scroll *{
    scroll-snap-align:none !important;
}

/* Palette highlighting should transition, but the current button must never
   block the question scroller. */
.pyq-reader-shell .pyq-palette-btn{
    transition:background-color .18s ease, border-color .18s ease,
               color .18s ease, box-shadow .18s ease,
               transform .10s ease !important;
}


/* =========================================================
   MOBILE BOTTOM NAV — FORCE VISIBLE / NO THEME .no-print COLLISION
   ---------------------------------------------------------
   The mobile controls are hidden from print via the print rule,
   not by the generic `.no-print` class, because themes/plugins may
   apply `.no-print { display:none !important; }` after this stylesheet.
   ========================================================= */
@media (max-width:900px){
    .pyq-reader-shell .pyq-mobile-bottom-nav{
        display:grid !important;
        visibility:visible !important;
        opacity:1 !important;
        position:relative !important;
        flex:0 0 auto !important;
        width:100% !important;
        min-height:34px !important;
        height:auto !important;
        z-index:100 !important;
        align-items:stretch !important;
        box-sizing:border-box !important;
    }

    .pyq-reader-shell .pyq-mobile-bottom-nav .pyq-mobile-bottom-btn{
        display:flex !important;
        visibility:visible !important;
        opacity:1 !important;
    }

    .pyq-reader-shell .pyq-mobile-top-actions{
        display:grid !important;
        visibility:visible !important;
        opacity:1 !important;
    }
}

@media print{
    .pyq-mobile-top-actions,
    .pyq-mobile-bottom-nav,
    .pyq-mobile-backdrop,
    .pyq-mobile-panel-close{
        display:none !important;
    }
}

/* =========================================================
   FINAL MOBILE BOTTOM MENU — ALWAYS VISIBLE / FIXED
   ---------------------------------------------------------
   The bottom question controls stay pinned to the viewport on
   mobile. The question scroller gets matching bottom padding so
   the last question is never hidden behind the menu.
   ========================================================= */
@media (max-width:900px){
    .pyq-reader-shell .pyq-mobile-bottom-nav{
        position:fixed !important;
        left:0 !important;
        right:0 !important;
        bottom:0 !important;
        width:100% !important;
        height:auto !important;
        min-height:44px !important;
        display:grid !important;
        grid-template-columns:minmax(0,1fr) minmax(0,1.15fr) minmax(0,1fr) !important;
        gap:4px !important;
        margin:0 !important;
        padding:3px 5px calc(3px + env(safe-area-inset-bottom, 0px)) !important;
        background:rgba(255,255,255,.98) !important;
        border-top:1px solid #dbe3ed !important;
        box-shadow:0 -3px 14px rgba(15,23,42,.10) !important;
        z-index:99999 !important;
        visibility:visible !important;
        opacity:1 !important;
        pointer-events:auto !important;
        box-sizing:border-box !important;
    }

    .pyq-reader-shell .pyq-mobile-bottom-nav .pyq-mobile-bottom-btn{
        display:flex !important;
        align-items:center !important;
        justify-content:center !important;
        min-width:0 !important;
        width:100% !important;
        height:36px !important;
        min-height:36px !important;
        margin:0 !important;
        padding:3px 5px !important;
        border:1px solid #d7e0ea !important;
        border-radius:8px !important;
        background:#fff !important;
        color:#334155 !important;
        font-size:9.5px !important;
        font-weight:800 !important;
        line-height:1.05 !important;
        box-shadow:none !important;
        opacity:1 !important;
        visibility:visible !important;
        cursor:pointer !important;
        pointer-events:auto !important;
        appearance:none !important;
        -webkit-appearance:none !important;
        -webkit-tap-highlight-color:transparent !important;
    }

    .pyq-reader-shell .pyq-mobile-bottom-nav .pyq-mobile-bottom-btn:hover,
    .pyq-reader-shell .pyq-mobile-bottom-nav .pyq-mobile-bottom-btn:focus,
    .pyq-reader-shell .pyq-mobile-bottom-nav .pyq-mobile-bottom-btn:focus-visible,
    .pyq-reader-shell .pyq-mobile-bottom-nav .pyq-mobile-bottom-btn:active{
        border:1px solid #c5d0dc !important;
        background:#f8fafc !important;
        color:#1e293b !important;
        outline:none !important;
        box-shadow:none !important;
    }

    .pyq-reader-shell .pyq-mobile-bottom-nav .pyq-mobile-next-btn{
        background:transparent !important;
        border-color:#d7e0ea !important;
        color:#334155 !important;
        box-shadow:none !important;
    }

    .pyq-reader-shell .pyq-mobile-bottom-nav .pyq-mobile-next-btn:hover,
    .pyq-reader-shell .pyq-mobile-bottom-nav .pyq-mobile-next-btn:focus,
    .pyq-reader-shell .pyq-mobile-bottom-nav .pyq-mobile-next-btn:focus-visible,
    .pyq-reader-shell .pyq-mobile-bottom-nav .pyq-mobile-next-btn:active{
        background:#f8fafc !important;
        border-color:#c5d0dc !important;
        color:#1e293b !important;
    }

    .pyq-reader-shell .pyq-mobile-bottom-nav .pyq-mobile-palette-btn{
        background:#f8fafc !important;
    }

    .pyq-reader-main .pyq-reader-question-scroll{
        padding-bottom:calc(54px + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* Keep the menu usable when a mobile drawer/sheet is open. */
    .pyq-reader-shell.pyq-mobile-files-open .pyq-mobile-bottom-nav,
    .pyq-reader-shell.pyq-mobile-palette-open .pyq-mobile-bottom-nav,
    .pyq-reader-shell.pyq-mobile-more-open .pyq-mobile-bottom-nav{
        z-index:2040 !important;
    }
}

@media (max-width:420px){
    .pyq-reader-shell .pyq-mobile-bottom-nav{
        min-height:42px !important;
        padding:2px 4px calc(2px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .pyq-reader-shell .pyq-mobile-bottom-nav .pyq-mobile-bottom-btn{
        height:34px !important;
        min-height:34px !important;
        font-size:9px !important;
        padding:2px 4px !important;
    }

    .pyq-reader-main .pyq-reader-question-scroll{
        padding-bottom:calc(50px + env(safe-area-inset-bottom, 0px)) !important;
    }
}


/* =========================================================
   FINAL MOBILE DARK-MODE + PALETTE TAP BORDER FIX
   ---------------------------------------------------------
   1) Keep mobile top/bottom controls clean and consistent in
      dark mode.
   2) Prevent the tapped/current palette number from growing
      because of focus/box-shadow rules.
   3) Keep Right/Wrong/View Solution colours authoritative.
   ========================================================= */
@media (max-width:900px){
    /* Stable, compact mobile action buttons after tap/focus. */
    .pyq-reader-shell .pyq-mobile-action-btn,
    .pyq-reader-shell .pyq-mobile-bottom-btn{
        border-width:1px !important;
        border-style:solid !important;
        box-shadow:none !important;
        outline:none !important;
        transform:none !important;
        -webkit-tap-highlight-color:transparent !important;
    }

    .pyq-reader-shell .pyq-mobile-action-btn:focus,
    .pyq-reader-shell .pyq-mobile-action-btn:focus-visible,
    .pyq-reader-shell .pyq-mobile-action-btn:active,
    .pyq-reader-shell .pyq-mobile-bottom-btn:focus,
    .pyq-reader-shell .pyq-mobile-bottom-btn:focus-visible,
    .pyq-reader-shell .pyq-mobile-bottom-btn:active{
        border-width:1px !important;
        outline:none !important;
        box-shadow:none !important;
        transform:none !important;
    }

    /* The palette number itself must keep a small 1px border.
       This removes the large blue focus ring seen after tapping
       a question on mobile. */
    .pyq-reader-shell .pyq-palette-btn,
    .pyq-reader-shell .pyq-palette-btn:focus,
    .pyq-reader-shell .pyq-palette-btn:focus-visible,
    .pyq-reader-shell .pyq-palette-btn:active{
        border-width:1px !important;
        border-style:solid !important;
        outline:none !important;
        box-shadow:none !important;
        transform:none !important;
        -webkit-tap-highlight-color:transparent !important;
    }

    /* Current/unvisited number: compact highlight, no extra ring. */
    .pyq-reader-shell .pyq-palette-btn.is-current:not(.is-correct):not(.is-wrong):not(.is-solution-viewed),
    .pyq-reader-shell .pyq-palette-btn.active:not(.is-correct):not(.is-wrong):not(.is-solution-viewed){
        border-width:1px !important;
        box-shadow:none !important;
    }

    /* Status colours remain clean and do not gain a focus ring. */
    .pyq-reader-shell .pyq-palette-btn.is-correct,
    .pyq-reader-shell .pyq-palette-btn.is-correct:focus,
    .pyq-reader-shell .pyq-palette-btn.is-correct:focus-visible,
    .pyq-reader-shell .pyq-palette-btn.is-correct:active{
        border-width:1px !important;
        border-color:#22c55e !important;
        box-shadow:none !important;
    }

    .pyq-reader-shell .pyq-palette-btn.is-wrong,
    .pyq-reader-shell .pyq-palette-btn.is-wrong:focus,
    .pyq-reader-shell .pyq-palette-btn.is-wrong:focus-visible,
    .pyq-reader-shell .pyq-palette-btn.is-wrong:active{
        border-width:1px !important;
        border-color:#ef4444 !important;
        box-shadow:none !important;
    }

    .pyq-reader-shell .pyq-palette-btn.is-solution-viewed,
    .pyq-reader-shell .pyq-palette-btn.is-solution-viewed:focus,
    .pyq-reader-shell .pyq-palette-btn.is-solution-viewed:focus-visible,
    .pyq-reader-shell .pyq-palette-btn.is-solution-viewed:active{
        border-width:1px !important;
        border-color:#a855f7 !important;
        box-shadow:none !important;
    }
}

/* Dark mode: keep all mobile controls neutral/consistent.
   Expanded/active mobile actions still retain a subtle blue state. */
html.dark-mode .pyq-reader-shell .pyq-mobile-action-btn,
body.dark-mode .pyq-reader-shell .pyq-mobile-action-btn,
html.dark .pyq-reader-shell .pyq-mobile-action-btn,
body.dark .pyq-reader-shell .pyq-mobile-action-btn,
html[data-theme="dark"] .pyq-reader-shell .pyq-mobile-action-btn,
body[data-theme="dark"] .pyq-reader-shell .pyq-mobile-action-btn{
    background:#111827 !important;
    color:#dbe4ee !important;
    border:1px solid #334155 !important;
    box-shadow:none !important;
}

html.dark-mode .pyq-reader-shell .pyq-mobile-action-btn:hover,
html.dark-mode .pyq-reader-shell .pyq-mobile-action-btn:focus,
html.dark-mode .pyq-reader-shell .pyq-mobile-action-btn:focus-visible,
html.dark-mode .pyq-reader-shell .pyq-mobile-action-btn:active,
body.dark-mode .pyq-reader-shell .pyq-mobile-action-btn:hover,
body.dark-mode .pyq-reader-shell .pyq-mobile-action-btn:focus,
body.dark-mode .pyq-reader-shell .pyq-mobile-action-btn:focus-visible,
body.dark-mode .pyq-reader-shell .pyq-mobile-action-btn:active,
html.dark .pyq-reader-shell .pyq-mobile-action-btn:hover,
html.dark .pyq-reader-shell .pyq-mobile-action-btn:focus,
html.dark .pyq-reader-shell .pyq-mobile-action-btn:focus-visible,
html.dark .pyq-reader-shell .pyq-mobile-action-btn:active,
body.dark .pyq-reader-shell .pyq-mobile-action-btn:hover,
body.dark .pyq-reader-shell .pyq-mobile-action-btn:focus,
body.dark .pyq-reader-shell .pyq-mobile-action-btn:focus-visible,
body.dark .pyq-reader-shell .pyq-mobile-action-btn:active,
html[data-theme="dark"] .pyq-reader-shell .pyq-mobile-action-btn:hover,
html[data-theme="dark"] .pyq-reader-shell .pyq-mobile-action-btn:focus,
html[data-theme="dark"] .pyq-reader-shell .pyq-mobile-action-btn:focus-visible,
html[data-theme="dark"] .pyq-reader-shell .pyq-mobile-action-btn:active,
body[data-theme="dark"] .pyq-reader-shell .pyq-mobile-action-btn:hover,
body[data-theme="dark"] .pyq-reader-shell .pyq-mobile-action-btn:focus,
body[data-theme="dark"] .pyq-reader-shell .pyq-mobile-action-btn:focus-visible,
body[data-theme="dark"] .pyq-reader-shell .pyq-mobile-action-btn:active{
    background:#172033 !important;
    color:#e2e8f0 !important;
    border:1px solid #475569 !important;
    box-shadow:none !important;
}

html.dark-mode .pyq-reader-shell .pyq-mobile-action-btn.is-active,
html.dark-mode .pyq-reader-shell .pyq-mobile-action-btn[aria-expanded="true"],
body.dark-mode .pyq-reader-shell .pyq-mobile-action-btn.is-active,
body.dark-mode .pyq-reader-shell .pyq-mobile-action-btn[aria-expanded="true"],
html.dark .pyq-reader-shell .pyq-mobile-action-btn.is-active,
html.dark .pyq-reader-shell .pyq-mobile-action-btn[aria-expanded="true"],
body.dark .pyq-reader-shell .pyq-mobile-action-btn.is-active,
body.dark .pyq-reader-shell .pyq-mobile-action-btn[aria-expanded="true"],
html[data-theme="dark"] .pyq-reader-shell .pyq-mobile-action-btn.is-active,
html[data-theme="dark"] .pyq-reader-shell .pyq-mobile-action-btn[aria-expanded="true"],
body[data-theme="dark"] .pyq-reader-shell .pyq-mobile-action-btn.is-active,
body[data-theme="dark"] .pyq-reader-shell .pyq-mobile-action-btn[aria-expanded="true"]{
    background:#172554 !important;
    color:#bfdbfe !important;
    border:1px solid #3b82f6 !important;
    box-shadow:none !important;
}

html.dark-mode .pyq-reader-shell .pyq-mobile-bottom-nav,
body.dark-mode .pyq-reader-shell .pyq-mobile-bottom-nav,
html.dark .pyq-reader-shell .pyq-mobile-bottom-nav,
body.dark .pyq-reader-shell .pyq-mobile-bottom-nav,
html[data-theme="dark"] .pyq-reader-shell .pyq-mobile-bottom-nav,
body[data-theme="dark"] .pyq-reader-shell .pyq-mobile-bottom-nav{
    background:#0b1220 !important;
    border-top:1px solid #263445 !important;
    box-shadow:0 -4px 14px rgba(0,0,0,.24) !important;
}

html.dark-mode .pyq-reader-shell .pyq-mobile-bottom-btn,
body.dark-mode .pyq-reader-shell .pyq-mobile-bottom-btn,
html.dark .pyq-reader-shell .pyq-mobile-bottom-btn,
body.dark .pyq-reader-shell .pyq-mobile-bottom-btn,
html[data-theme="dark"] .pyq-reader-shell .pyq-mobile-bottom-btn,
body[data-theme="dark"] .pyq-reader-shell .pyq-mobile-bottom-btn{
    background:#111827 !important;
    color:#dbe4ee !important;
    border:1px solid #334155 !important;
    box-shadow:none !important;
}

/* Save & Next remains neutral in dark mode. */
html.dark-mode .pyq-reader-shell .pyq-mobile-next-btn,
body.dark-mode .pyq-reader-shell .pyq-mobile-next-btn,
html.dark .pyq-reader-shell .pyq-mobile-next-btn,
body.dark .pyq-reader-shell .pyq-mobile-next-btn,
html[data-theme="dark"] .pyq-reader-shell .pyq-mobile-next-btn,
body[data-theme="dark"] .pyq-reader-shell .pyq-mobile-next-btn{
    background:transparent !important;
    color:#dbe4ee !important;
    border:1px solid #334155 !important;
    box-shadow:none !important;
}

/* Mobile palette current number: no oversized blue focus ring. */
@media (max-width:900px){
    html.dark-mode .pyq-reader-shell .pyq-palette-btn.is-current:not(.is-correct):not(.is-wrong):not(.is-solution-viewed),
    body.dark-mode .pyq-reader-shell .pyq-palette-btn.is-current:not(.is-correct):not(.is-wrong):not(.is-solution-viewed),
    html.dark .pyq-reader-shell .pyq-palette-btn.is-current:not(.is-correct):not(.is-wrong):not(.is-solution-viewed),
    body.dark .pyq-reader-shell .pyq-palette-btn.is-current:not(.is-correct):not(.is-wrong):not(.is-solution-viewed),
    html[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-current:not(.is-correct):not(.is-wrong):not(.is-solution-viewed),
    body[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-current:not(.is-correct):not(.is-wrong):not(.is-solution-viewed){
        background:#1e293b !important;
        color:#e2e8f0 !important;
        border:1px solid #475569 !important;
        box-shadow:none !important;
    }
}


/* =========================================================
   SCORE ANIMATION — CLICK-ORIGIN LOCK
   The floating +marks/-marks pill is positioned from the exact option
   clicked by the student. It is independent of nested question scroll
   containers, so mobile and desktop use the same visual origin.
   ========================================================= */
.pbs-floating-score-fx{
  position:fixed !important;
  right:auto !important;
  bottom:auto !important;
  margin:0 !important;
  z-index:2147483647 !important;
  pointer-events:none !important;
  user-select:none !important;
  -webkit-user-select:none !important;
  width:max-content !important;
  min-width:0 !important;
  max-width:max-content !important;
  white-space:nowrap !important;
  box-sizing:border-box !important;
}

@media (max-width:768px){
  .pbs-floating-score-fx{
    padding:4px 7px !important;
    font-size:11px !important;
    line-height:1 !important;
    border-radius:999px !important;
  }
}


/* =========================================================
   SOLUTION VIEW FINAL STATE
   ---------------------------------------------------------
   Purple belongs ONLY to the actual correct option of an
   unanswered question.  Already answered questions keep
   their original green/red option state.
   ========================================================= */

.pyq-reader-shell .pyq-reader-main .question-box.active-solution .option:not(.solution-correct),
.pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option:not(.solution-correct){
    background:inherit !important;
    background-image:none !important;
    border-color:inherit !important;
    color:inherit !important;
    box-shadow:inherit !important;
}

/* Remove the old blanket purple treatment from active-solution options. */
.pyq-reader-shell .pyq-reader-main .question-box.active-solution .option:not(.correct):not(.wrong):not(.solution-correct),
.pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option:not(.correct):not(.wrong):not(.solution-correct){
    background:#ffffff !important;
    border-color:#e2e8f0 !important;
    color:#0f172a !important;
    box-shadow:none !important;
}

/* Only the revealed correct option gets purple. */
.pyq-reader-shell .pyq-reader-main .option.solution-correct,
.pyq-reader-shell .pyq-reader-main .option.solution-correct:hover,
.pyq-reader-shell .pyq-reader-main .option.solution-correct:disabled,
.pyq-reader-shell .pyq-reader-main .option.solution-correct:disabled:hover{
    background:#ede9fe !important;
    background-image:none !important;
    border-color:#a855f7 !important;
    color:#6d28d9 !important;
    box-shadow:0 8px 18px rgba(124,58,237,.10) !important;
    opacity:1 !important;
    transform:none !important;
    cursor:default !important;
}

.pyq-reader-shell .pyq-reader-main .option.solution-correct .opt-indicator{
    background:#7c3aed !important;
    border-color:#ffffff !important;
    color:#ffffff !important;
    box-shadow:0 0 0 2px #7c3aed !important;
}

/* Answered questions retain their original right/wrong appearance. */
.pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option.correct,
.pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option.wrong{
    transform:none !important;
}

/* Dark mode: neutral options stay dark; ONLY the correct solution option is purple. */
html.dark-mode .pyq-reader-shell .pyq-reader-main .question-box.active-solution .option:not(.correct):not(.wrong):not(.solution-correct),
body.dark-mode .pyq-reader-shell .pyq-reader-main .question-box.active-solution .option:not(.correct):not(.wrong):not(.solution-correct),
html.dark .pyq-reader-shell .pyq-reader-main .question-box.active-solution .option:not(.correct):not(.wrong):not(.solution-correct),
body.dark .pyq-reader-shell .pyq-reader-main .question-box.active-solution .option:not(.correct):not(.wrong):not(.solution-correct),
html[data-theme="dark"] .pyq-reader-shell .pyq-reader-main .question-box.active-solution .option:not(.correct):not(.wrong):not(.solution-correct),
body[data-theme="dark"] .pyq-reader-shell .pyq-reader-main .question-box.active-solution .option:not(.correct):not(.wrong):not(.solution-correct),
html.dark-mode .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option:not(.correct):not(.wrong):not(.solution-correct),
body.dark-mode .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option:not(.correct):not(.wrong):not(.solution-correct),
html.dark .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option:not(.correct):not(.wrong):not(.solution-correct),
body.dark .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option:not(.correct):not(.wrong):not(.solution-correct),
html[data-theme="dark"] .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option:not(.correct):not(.wrong):not(.solution-correct),
body[data-theme="dark"] .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option:not(.correct):not(.wrong):not(.solution-correct){
    background:#111827 !important;
    background-image:none !important;
    border-color:#334155 !important;
    color:#dbe4ee !important;
    box-shadow:none !important;
}

html.dark-mode .pyq-reader-shell .pyq-reader-main .option.solution-correct,
body.dark-mode .pyq-reader-shell .pyq-reader-main .option.solution-correct,
html.dark .pyq-reader-shell .pyq-reader-main .option.solution-correct,
body.dark .pyq-reader-shell .pyq-reader-main .option.solution-correct,
html[data-theme="dark"] .pyq-reader-shell .pyq-reader-main .option.solution-correct,
body[data-theme="dark"] .pyq-reader-shell .pyq-reader-main .option.solution-correct{
    background:#2e1065 !important;
    background-image:none !important;
    border-color:#a855f7 !important;
    color:#d8b4fe !important;
    box-shadow:0 8px 18px rgba(168,85,247,.14) !important;
    opacity:1 !important;
}

html.dark-mode .pyq-reader-shell .pyq-reader-main .option.solution-correct .opt-indicator,
body.dark-mode .pyq-reader-shell .pyq-reader-main .option.solution-correct .opt-indicator,
html.dark .pyq-reader-shell .pyq-reader-main .option.solution-correct .opt-indicator,
body.dark .pyq-reader-shell .pyq-reader-main .option.solution-correct .opt-indicator,
html[data-theme="dark"] .pyq-reader-shell .pyq-reader-main .option.solution-correct .opt-indicator,
body[data-theme="dark"] .pyq-reader-shell .pyq-reader-main .option.solution-correct .opt-indicator{
    background:#7c3aed !important;
    border-color:#c4b5fd !important;
    color:#ffffff !important;
    box-shadow:0 0 0 2px #7c3aed !important;
}

/* In dark mode an already answered option keeps the same red/green state. */
html.dark-mode .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option.correct,
body.dark-mode .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option.correct,
html.dark .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option.correct,
body.dark .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option.correct{
    background:linear-gradient(135deg,rgba(34,197,94,.14),rgba(6,78,59,.10)) !important;
    border-color:rgba(34,197,94,.32) !important;
}

html.dark-mode .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option.wrong,
body.dark-mode .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option.wrong,
html.dark .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option.wrong,
body.dark .pyq-reader-shell .pyq-reader-main .question-box[data-solution-locked="1"] .option.wrong{
    background:linear-gradient(135deg,rgba(239,68,68,.14),rgba(127,29,29,.10)) !important;
    border-color:rgba(248,113,113,.32) !important;
}


/* =========================================================
   FINAL DARK PALETTE — BORDER-FIRST STYLE
   Keep palette buttons dark and subtle. Status is communicated
   primarily by the coloured border, with only a faint tint.
   ========================================================= */
@media (prefers-color-scheme: dark){
    /* No forced OS-theme styling; app theme selectors below remain authoritative. */
}

html.dark-mode .pyq-reader-shell .pyq-palette-btn,
body.dark-mode .pyq-reader-shell .pyq-palette-btn,
html.dark .pyq-reader-shell .pyq-palette-btn,
body.dark .pyq-reader-shell .pyq-palette-btn,
html[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn,
body[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn{
    background:#111827 !important;
    border:1px solid #334155 !important;
    color:#cbd5e1 !important;
    box-shadow:none !important;
}

html.dark-mode .pyq-reader-shell .pyq-palette-btn.is-current:not(.is-correct):not(.is-wrong):not(.is-solution-viewed),
body.dark-mode .pyq-reader-shell .pyq-palette-btn.is-current:not(.is-correct):not(.is-wrong):not(.is-solution-viewed),
html.dark .pyq-reader-shell .pyq-palette-btn.is-current:not(.is-correct):not(.is-wrong):not(.is-solution-viewed),
body.dark .pyq-reader-shell .pyq-palette-btn.is-current:not(.is-correct):not(.is-wrong):not(.is-solution-viewed),
html[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-current:not(.is-correct):not(.is-wrong):not(.is-solution-viewed),
body[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-current:not(.is-correct):not(.is-wrong):not(.is-solution-viewed){
    background:rgba(59,130,246,.07) !important;
    border-color:rgba(96,165,250,.78) !important;
    color:#bfdbfe !important;
}

html.dark-mode .pyq-reader-shell .pyq-palette-btn.is-correct,
body.dark-mode .pyq-reader-shell .pyq-palette-btn.is-correct,
html.dark .pyq-reader-shell .pyq-palette-btn.is-correct,
body.dark .pyq-reader-shell .pyq-palette-btn.is-correct,
html[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-correct,
body[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-correct{
    background:rgba(34,197,94,.08) !important;
    border-color:rgba(34,197,94,.72) !important;
    color:#86efac !important;
}

html.dark-mode .pyq-reader-shell .pyq-palette-btn.is-wrong,
body.dark-mode .pyq-reader-shell .pyq-palette-btn.is-wrong,
html.dark .pyq-reader-shell .pyq-palette-btn.is-wrong,
body.dark .pyq-reader-shell .pyq-palette-btn.is-wrong,
html[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-wrong,
body[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-wrong{
    background:rgba(239,68,68,.08) !important;
    border-color:rgba(248,113,113,.72) !important;
    color:#fca5a5 !important;
}

html.dark-mode .pyq-reader-shell .pyq-palette-btn.is-solution-viewed,
body.dark-mode .pyq-reader-shell .pyq-palette-btn.is-solution-viewed,
html.dark .pyq-reader-shell .pyq-palette-btn.is-solution-viewed,
body.dark .pyq-reader-shell .pyq-palette-btn.is-solution-viewed,
html[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-solution-viewed,
body[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn.is-solution-viewed{
    background:rgba(168,85,247,.08) !important;
    border-color:rgba(192,132,252,.78) !important;
    color:#d8b4fe !important;
}

/* Keep focus/tap rings subtle and never replace the status border. */
html.dark-mode .pyq-reader-shell .pyq-palette-btn:focus,
body.dark-mode .pyq-reader-shell .pyq-palette-btn:focus,
html.dark .pyq-reader-shell .pyq-palette-btn:focus,
body.dark .pyq-reader-shell .pyq-palette-btn:focus,
html[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn:focus,
body[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn:focus{
    outline:none !important;
}

html.dark-mode .pyq-reader-shell .pyq-palette-btn:focus-visible,
body.dark-mode .pyq-reader-shell .pyq-palette-btn:focus-visible,
html.dark .pyq-reader-shell .pyq-palette-btn:focus-visible,
body.dark .pyq-reader-shell .pyq-palette-btn:focus-visible,
html[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn:focus-visible,
body[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn:focus-visible{
    box-shadow:0 0 0 2px rgba(148,163,184,.16) !important;
}

@media (max-width:900px){
    html.dark-mode .pyq-reader-shell .pyq-palette-btn,
    body.dark-mode .pyq-reader-shell .pyq-palette-btn,
    html.dark .pyq-reader-shell .pyq-palette-btn,
    body.dark .pyq-reader-shell .pyq-palette-btn,
    html[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn,
    body[data-theme="dark"] .pyq-reader-shell .pyq-palette-btn{
        min-width:42px !important;
        min-height:34px !important;
        border-width:1px !important;
    }
}

/* =========================================================
   FINAL DARK-MODE PALETTE — TRUE BORDER-FIRST STYLE
   Status is shown by border + text. The button itself stays
   dark/neutral instead of becoming a solid coloured block.
   ========================================================= */
html.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn,
body.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn,
html.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn,
body.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn,
html[data-theme="dark"] .pyq-reader-shell .pyq-question-palette .pyq-palette-btn,
body[data-theme="dark"] .pyq-reader-shell .pyq-question-palette .pyq-palette-btn{
    background:rgba(15,23,42,.58) !important;
    background-image:none !important;
    border:1px solid #334155 !important;
    color:#cbd5e1 !important;
    box-shadow:none !important;
    outline:none !important;
}

html.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn:hover,
body.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn:hover,
html.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn:hover,
body.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn:hover,
html[data-theme="dark"] .pyq-reader-shell .pyq-question-palette .pyq-palette-btn:hover,
body[data-theme="dark"] .pyq-reader-shell .pyq-question-palette .pyq-palette-btn:hover{
    background:rgba(30,41,59,.72) !important;
    border-color:#64748b !important;
    color:#f1f5f9 !important;
    box-shadow:none !important;
}

/* CURRENT — blue border */
html.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-current:not(.is-correct):not(.is-wrong):not(.is-solution-viewed),
body.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-current:not(.is-correct):not(.is-wrong):not(.is-solution-viewed),
html.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-current:not(.is-correct):not(.is-wrong):not(.is-solution-viewed),
body.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-current:not(.is-correct):not(.is-wrong):not(.is-solution-viewed),
html[data-theme="dark"] .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-current:not(.is-correct):not(.is-wrong):not(.is-solution-viewed),
body[data-theme="dark"] .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-current:not(.is-correct):not(.is-wrong):not(.is-solution-viewed){
    background:rgba(30,64,175,.10) !important;
    border:1px solid #60a5fa !important;
    color:#bfdbfe !important;
    box-shadow:0 0 0 1px rgba(96,165,250,.10) !important;
}

/* RIGHT — green border */
html.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-correct,
body.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-correct,
html.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-correct,
body.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-correct,
html[data-theme="dark"] .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-correct,
body[data-theme="dark"] .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-correct{
    background:rgba(22,101,52,.10) !important;
    border:1px solid #4ade80 !important;
    color:#86efac !important;
    box-shadow:0 0 0 1px rgba(74,222,128,.08) !important;
}

/* WRONG — red border */
html.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-wrong,
body.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-wrong,
html.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-wrong,
body.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-wrong,
html[data-theme="dark"] .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-wrong,
body[data-theme="dark"] .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-wrong{
    background:rgba(127,29,29,.10) !important;
    border:1px solid #f87171 !important;
    color:#fca5a5 !important;
    box-shadow:0 0 0 1px rgba(248,113,113,.08) !important;
}

/* VIEW — purple border */
html.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-solution-viewed,
body.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-solution-viewed,
html.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-solution-viewed,
body.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-solution-viewed,
html[data-theme="dark"] .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-solution-viewed,
body[data-theme="dark"] .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-solution-viewed,
html.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn[data-answer-state="view"],
body.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn[data-answer-state="view"],
html.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn[data-answer-state="view"],
body.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn[data-answer-state="view"],
html[data-theme="dark"] .pyq-reader-shell .pyq-question-palette .pyq-palette-btn[data-answer-state="view"],
body[data-theme="dark"] .pyq-reader-shell .pyq-question-palette .pyq-palette-btn[data-answer-state="view"]{
    background:rgba(88,28,135,.10) !important;
    border:1px solid #c084fc !important;
    color:#d8b4fe !important;
    box-shadow:0 0 0 1px rgba(192,132,252,.08) !important;
}

/* Status borders must survive focus/active/tap state. */
html.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-correct:focus,
body.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-correct:focus,
html.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-correct:focus,
body.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-correct:focus,
html.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-correct:active,
body.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-correct:active,
html.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-correct:active,
body.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-correct:active{
    border-color:#4ade80 !important;
    background:rgba(22,101,52,.10) !important;
    color:#86efac !important;
    box-shadow:0 0 0 1px rgba(74,222,128,.08) !important;
}

html.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-wrong:focus,
body.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-wrong:focus,
html.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-wrong:focus,
body.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-wrong:focus,
html.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-wrong:active,
body.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-wrong:active,
html.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-wrong:active,
body.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-wrong:active{
    border-color:#f87171 !important;
    background:rgba(127,29,29,.10) !important;
    color:#fca5a5 !important;
    box-shadow:0 0 0 1px rgba(248,113,113,.08) !important;
}

html.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-solution-viewed:focus,
body.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-solution-viewed:focus,
html.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-solution-viewed:focus,
body.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-solution-viewed:focus,
html.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-solution-viewed:active,
body.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-solution-viewed:active,
html.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-solution-viewed:active,
body.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn.is-solution-viewed:active{
    border-color:#c084fc !important;
    background:rgba(88,28,135,.10) !important;
    color:#d8b4fe !important;
    box-shadow:0 0 0 1px rgba(192,132,252,.08) !important;
}

@media (max-width:900px){
    html.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn,
    body.dark-mode .pyq-reader-shell .pyq-question-palette .pyq-palette-btn,
    html.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn,
    body.dark .pyq-reader-shell .pyq-question-palette .pyq-palette-btn,
    html[data-theme="dark"] .pyq-reader-shell .pyq-question-palette .pyq-palette-btn,
    body[data-theme="dark"] .pyq-reader-shell .pyq-question-palette .pyq-palette-btn{
        min-width:38px !important;
        min-height:32px !important;
        height:32px !important;
        padding:4px 6px !important;
        border-width:1px !important;
        border-radius:8px !important;
    }
}


/* =========================================================
   FINAL SCROLL PERFORMANCE OVERRIDE
   User wheel/touch scrolling must stay native and immediate.
   Smoothness is used only for explicit question/palette jumps in JS.
   ========================================================= */
.pyq-reader-main .pyq-reader-question-scroll{
    scroll-behavior:auto !important;
    scroll-snap-type:none !important;
    overscroll-behavior-y:contain !important;
    touch-action:pan-y !important;
}

@media (max-width:900px){
    .pyq-reader-main .pyq-reader-question-scroll{
        scroll-behavior:auto !important;
        -webkit-overflow-scrolling:touch !important;
        overflow-y:auto !important;
        overscroll-behavior-y:contain !important;
    }
}


/* =========================================================
   PRINT STAGE — FULL PAPER PDF SAFETY
   The live reader uses a fixed/nested scroll container. For
   browser Print/Save as PDF we create a detached copy so the
   complete question list is laid out as one normal document,
   independent of the on-screen scroll position.
   ========================================================= */
.pyq-print-stage{
    display:none !important;
    width:100% !important;
    box-sizing:border-box !important;
    background:#fff !important;
    color:#111827 !important;
}

@media print{
    body > .pyq-print-stage{
        display:block !important;
        position:static !important;
        width:100% !important;
        height:auto !important;
        max-height:none !important;
        min-height:0 !important;
        margin:0 !important;
        padding:0 !important;
        overflow:visible !important;
        visibility:visible !important;
        background:#fff !important;
        color:#111827 !important;
        z-index:auto !important;
    }

    body > .pyq-print-stage .print-page,
    body > .pyq-print-stage .print-page *{
        visibility:visible !important;
    }

    body > .pyq-print-stage .print-page{
        position:static !important;
        display:block !important;
        width:100% !important;
        max-width:none !important;
        height:auto !important;
        max-height:none !important;
        min-height:0 !important;
        margin:0 !important;
        padding:8mm 0 !important;
        overflow:visible !important;
        border:0 !important;
        border-radius:0 !important;
        box-shadow:none !important;
        background:#fff !important;
        color:#111827 !important;
    }

    body > .pyq-print-stage .question-list{
        display:flex !important;
        flex-direction:column !important;
        height:auto !important;
        max-height:none !important;
        overflow:visible !important;
    }

    body > .pyq-print-stage .question-box{
        display:block !important;
        visibility:visible !important;
        height:auto !important;
        max-height:none !important;
        min-height:0 !important;
        overflow:visible !important;
        opacity:1 !important;
        break-inside:avoid !important;
        page-break-inside:avoid !important;
    }

    body > .pyq-print-stage .question-box[hidden]{
        display:block !important;
    }

    body > .pyq-print-stage .pyq-search-hidden{
        display:block !important;
    }

    body > .pyq-print-stage img{
        max-width:100% !important;
        height:auto !important;
    }
}


@media print{
    /* When the detached print copy is active, suppress the live reader
       so the paper is printed exactly once. */
    body.pbs-print-clone-active > .pyq-reader-shell{
        display:none !important;
        visibility:hidden !important;
    }

    body.pbs-print-clone-active > .pyq-print-stage{
        display:block !important;
        visibility:visible !important;
    }
}

/* FINAL PDF TWO-COLUMN GUARD — keeps the print stage in coaching-center layout */
@media print{
  body > .pyq-print-stage .question-list{
    display:block !important;
    width:100% !important;
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
    column-count:2 !important;
    column-gap:8mm !important;
    column-rule:1px solid #cbd5e1 !important;
    column-fill:balance !important;
  }
  body > .pyq-print-stage .question-box{
    display:inline-block !important;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:visible !important;
    break-inside:avoid-column !important;
    page-break-inside:avoid !important;
    margin:0 0 4mm !important;
    padding:0 0 2.5mm !important;
  }
}


/* =========================================================
   FINAL PDF FLOW FIX — CONTINUOUS A4 TWO-COLUMN TEXTBOOK FLOW
   ========================================================= */
@media print{
  body > .pyq-print-stage .question-list{
    display:block !important;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:visible !important;
    column-count:2 !important;
    column-width:auto !important;
    column-gap:8mm !important;
    column-rule:1px solid #cbd5e1 !important;
    column-fill:auto !important;
    column-span:none !important;
  }

  body > .pyq-print-stage .question-box{
    display:block !important;
    width:100% !important;
    min-height:0 !important;
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
    margin:0 0 3mm !important;
    padding:0 0 2mm !important;
    break-inside:auto !important;
    page-break-inside:auto !important;
    box-sizing:border-box !important;
  }

  body > .pyq-print-stage .question-box .q-topline,
  body > .pyq-print-stage .question-box .q-text,
  body > .pyq-print-stage .question-box .options,
  body > .pyq-print-stage .question-box .option,
  body > .pyq-print-stage .question-box .question-image-wrap{
    break-inside:avoid !important;
    page-break-inside:avoid !important;
  }

  body > .pyq-print-stage .q-text,
  body > .pyq-print-stage .option,
  body > .pyq-print-stage .solution-content,
  body > .pyq-print-stage .final-answer-line{
    overflow-wrap:anywhere !important;
    word-break:normal !important;
    white-space:normal !important;
  }

  body > .pyq-print-stage .katex-display{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    overflow:visible !important;
    text-align:center !important;
    white-space:normal !important;
  }

  body > .pyq-print-stage .katex-display .katex{
    max-width:100% !important;
    white-space:normal !important;
  }
}

/* =========================================================
   FINAL PRESENTATION OVERRIDES
   Requested UI cleanup only.
   NOTE: Do not alter equation sizing/wrapping rules here.
   ========================================================= */

/* --- Watermark: faint, centered, and allowed to sit over option area --- */
.pyq-reader-shell .question-main-content,
.pyq-reader-shell .solution-content{
  position:relative !important;
}

.pyq-reader-shell .question-watermark{
  position:absolute !important;
  top:52% !important;
  left:50% !important;
  transform:translate(-50%,-50%) rotate(-28deg) !important;
  display:block !important;
  width:max-content !important;
  max-width:90% !important;
  white-space:nowrap !important;
  pointer-events:none !important;
  user-select:none !important;
  -webkit-user-select:none !important;
  font-size:34px !important;
  font-weight:800 !important;
  letter-spacing:.15px !important;
  color:rgba(15,23,42,.065) !important;
  opacity:1 !important;
  z-index:5 !important;
}

.pyq-reader-shell .solution-watermark{
  position:absolute !important;
  top:50% !important;
  left:50% !important;
  transform:translate(-50%,-50%) rotate(-28deg) !important;
  display:block !important;
  width:max-content !important;
  max-width:90% !important;
  white-space:nowrap !important;
  pointer-events:none !important;
  user-select:none !important;
  -webkit-user-select:none !important;
  font-size:34px !important;
  font-weight:800 !important;
  letter-spacing:.15px !important;
  color:rgba(15,23,42,.055) !important;
  opacity:1 !important;
  z-index:30 !important;
}

/* Keep watermark subtle in dark mode without creating a bright patch. */
html.dark-mode .pyq-reader-shell .question-watermark,
body.dark-mode .pyq-reader-shell .question-watermark,
html.dark .pyq-reader-shell .question-watermark,
body.dark .pyq-reader-shell .question-watermark,
html[data-theme="dark"] .pyq-reader-shell .question-watermark,
body[data-theme="dark"] .pyq-reader-shell .question-watermark{
  color:rgba(226,232,240,.075) !important;
}

html.dark-mode .pyq-reader-shell .solution-watermark,
body.dark-mode .pyq-reader-shell .solution-watermark,
html.dark .pyq-reader-shell .solution-watermark,
body.dark .pyq-reader-shell .solution-watermark,
html[data-theme="dark"] .pyq-reader-shell .solution-watermark,
body[data-theme="dark"] .pyq-reader-shell .solution-watermark{
  color:rgba(226,232,240,.065) !important;
}

/* --- Option labels: always circular --- */
.pyq-reader-shell .option .opt-indicator,
.pyq-reader-shell .option.is-mcq .opt-indicator,
.pyq-reader-shell .option.is-msq .opt-indicator{
  width:24px !important;
  height:24px !important;
  min-width:24px !important;
  flex:0 0 24px !important;
  border-radius:50% !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  box-sizing:border-box !important;
}

/* --- Final Answer: simple textbook line, no separator/highlight --- */
.pyq-reader-shell .final-answer-line{
  margin-top:9px !important;
  padding-top:0 !important;
  border-top:0 !important;
  border-bottom:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  border-radius:0 !important;
  font-size:13px !important;
  line-height:1.5 !important;
  font-weight:500 !important;
  color:#1f2937 !important;
}

.pyq-reader-shell .final-answer-line strong{
  font-weight:600 !important;
  color:inherit !important;
}

html.dark-mode .pyq-reader-shell .final-answer-line,
body.dark-mode .pyq-reader-shell .final-answer-line,
html.dark .pyq-reader-shell .final-answer-line,
body.dark .pyq-reader-shell .final-answer-line,
html[data-theme="dark"] .pyq-reader-shell .final-answer-line,
body[data-theme="dark"] .pyq-reader-shell .final-answer-line{
  color:#cbd5e1 !important;
  background:transparent !important;
}

/* Print/PDF: keep the same clean treatment. */
@media print{
  .question-watermark{
    display:block !important;
    position:absolute !important;
    top:52% !important;
    left:50% !important;
    transform:translate(-50%,-50%) rotate(-28deg) !important;
    color:rgba(15,23,42,.055) !important;
    font-size:24px !important;
    font-weight:800 !important;
    white-space:nowrap !important;
    pointer-events:none !important;
    z-index:5 !important;
  }

  .solution-watermark{
    display:block !important;
    position:absolute !important;
    top:50% !important;
    left:50% !important;
    transform:translate(-50%,-50%) rotate(-28deg) !important;
    color:rgba(15,23,42,.045) !important;
    font-size:24px !important;
    font-weight:800 !important;
    white-space:nowrap !important;
    pointer-events:none !important;
    z-index:1 !important;
  }

  .option .opt-indicator,
  .option.is-mcq .opt-indicator,
  .option.is-msq .opt-indicator{
    width:20px !important;
    height:20px !important;
    min-width:20px !important;
    flex:0 0 20px !important;
    border-radius:50% !important;
  }

  .final-answer-line{
    margin-top:7px !important;
    padding-top:0 !important;
    border:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    font-size:11pt !important;
    line-height:1.45 !important;
    font-weight:500 !important;
    color:#1f2937 !important;
  }

  .final-answer-line strong{
    font-weight:600 !important;
    color:inherit !important;
  }
}

/* =========================================================
   FINAL WATERMARK + OPTION LABEL FIX
   User-requested presentation only. Do not alter equation sizing,
   wrapping, or compact/overflow behavior.
   ========================================================= */

/* Keep the watermark inside each question/solution area, centered,
   subtle, non-interactive, and visible even when it passes behind
   the option region. */
.pyq-reader-shell .question-main-content,
.pyq-reader-shell .solution-content,
.pyq-print-stage .question-main-content,
.pyq-print-stage .solution-content{
  position:relative !important;
  overflow:visible !important;
}

.pyq-reader-shell .question-watermark,
.pyq-reader-shell .solution-watermark,
.pyq-print-stage .question-watermark,
.pyq-print-stage .solution-watermark,
.question-watermark,
.solution-watermark{
  position:absolute !important;
  top:50% !important;
  left:50% !important;
  transform:translate(-50%,-50%) rotate(-28deg) !important;
  display:block !important;
  width:max-content !important;
  max-width:none !important;
  white-space:nowrap !important;
  pointer-events:none !important;
  user-select:none !important;
  -webkit-user-select:none !important;
  font-family:Arial, Helvetica, sans-serif !important;
  font-size:24px !important;
  font-weight:800 !important;
  letter-spacing:.2px !important;
  line-height:1 !important;
  opacity:1 !important;
  color:rgba(15,23,42,.065) !important;
  text-shadow:none !important;
}

.pyq-reader-shell .question-watermark,
.pyq-print-stage .question-watermark,
.question-watermark{
  z-index:15 !important;
}

.pyq-reader-shell .solution-watermark,
.pyq-print-stage .solution-watermark,
.solution-watermark{
  z-index:15 !important;
}

/* Dark mode: same subtle watermark, never a bright patch. */
html.dark-mode .pyq-reader-shell .question-watermark,
body.dark-mode .pyq-reader-shell .question-watermark,
html.dark .pyq-reader-shell .question-watermark,
body.dark .pyq-reader-shell .question-watermark,
html[data-theme="dark"] .pyq-reader-shell .question-watermark,
body[data-theme="dark"] .pyq-reader-shell .question-watermark,
html.dark-mode .pyq-reader-shell .solution-watermark,
body.dark-mode .pyq-reader-shell .solution-watermark,
html.dark .pyq-reader-shell .solution-watermark,
body.dark .pyq-reader-shell .solution-watermark,
html[data-theme="dark"] .pyq-reader-shell .solution-watermark,
body[data-theme="dark"] .pyq-reader-shell .solution-watermark{
  color:rgba(226,232,240,.075) !important;
}

/* A/B/C/D option labels: always circular in the live reader. */
.pyq-reader-shell .option .opt-indicator,
.pyq-reader-shell .option.is-mcq .opt-indicator,
.pyq-reader-shell .option.is-msq .opt-indicator,
.pyq-print-stage .option .opt-indicator,
.pyq-print-stage .option.is-mcq .opt-indicator,
.pyq-print-stage .option.is-msq .opt-indicator,
.option .opt-indicator,
.option.is-mcq .opt-indicator,
.option.is-msq .opt-indicator{
  width:24px !important;
  height:24px !important;
  min-width:24px !important;
  min-height:24px !important;
  flex:0 0 24px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  box-sizing:border-box !important;
  border-radius:50% !important;
  line-height:1 !important;
  text-align:center !important;
}

/* Keep the printed labels circular too. */
@media print{
  .option .opt-indicator,
  .option.is-mcq .opt-indicator,
  .option.is-msq .opt-indicator{
    width:20px !important;
    height:20px !important;
    min-width:20px !important;
    min-height:20px !important;
    flex:0 0 20px !important;
    border-radius:50% !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    line-height:1 !important;
    box-sizing:border-box !important;
  }

  .question-watermark,
  .solution-watermark{
    position:absolute !important;
    top:50% !important;
    left:50% !important;
    transform:translate(-50%,-50%) rotate(-28deg) !important;
    display:block !important;
    width:max-content !important;
    max-width:none !important;
    white-space:nowrap !important;
    font-family:Arial, Helvetica, sans-serif !important;
    font-size:18px !important;
    font-weight:800 !important;
    line-height:1 !important;
    color:rgba(15,23,42,.055) !important;
    opacity:1 !important;
    pointer-events:none !important;
    z-index:15 !important;
    -webkit-print-color-adjust:exact !important;
    print-color-adjust:exact !important;
  }
}


/* =========================================================
   FINAL PDF PRESENTATION FIX
   - watermark visible over option area
   - larger, faint watermark
   - A/B/C/D circular labels
   - decorative border on every printed page
   ========================================================= */
@media print{
  body::before{
    content:"" !important;
    position:fixed !important;
    inset:3mm !important;
    border:1.1pt solid #c7ced8 !important;
    border-radius:2.5mm !important;
    pointer-events:none !important;
    z-index:999999 !important;
  }

  body > .pyq-print-stage .question-main-content,
  body > .pyq-print-stage .solution-content{
    position:relative !important;
    overflow:visible !important;
  }

  body > .pyq-print-stage .question-watermark,
  body > .pyq-print-stage .solution-watermark{
    position:absolute !important;
    top:52% !important;
    left:50% !important;
    transform:translate(-50%,-50%) rotate(-28deg) !important;
    display:block !important;
    width:max-content !important;
    max-width:none !important;
    white-space:nowrap !important;
    pointer-events:none !important;
    user-select:none !important;
    -webkit-user-select:none !important;
    font-family:Arial,Helvetica,sans-serif !important;
    font-size:30px !important;
    font-weight:800 !important;
    letter-spacing:.2px !important;
    line-height:1 !important;
    color:rgba(71,85,105,.12) !important;
    opacity:1 !important;
    z-index:50 !important;
  }

  /* Do not create a stacking layer above the watermark. */
  body > .pyq-print-stage .question-main-content > *:not(.question-watermark),
  body > .pyq-print-stage .solution-content > *:not(.solution-watermark){
    position:static !important;
    z-index:auto !important;
  }

  /* Keep option boxes readable while allowing the watermark to sit over them. */
  body > .pyq-print-stage .option{
    position:relative !important;
    background:#fff !important;
    isolation:auto !important;
  }

  body > .pyq-print-stage .question-watermark{
    color:rgba(71,85,105,.105) !important;
  }

  body > .pyq-print-stage .solution-watermark{
    color:rgba(71,85,105,.095) !important;
  }

  /* Exact circular option labels for the printed paper. */
  body > .pyq-print-stage .option .opt-indicator,
  body > .pyq-print-stage .option.is-mcq .opt-indicator,
  body > .pyq-print-stage .option.is-msq .opt-indicator{
    flex:0 0 19px !important;
    width:19px !important;
    height:19px !important;
    min-width:19px !important;
    min-height:19px !important;
    border:1px solid #6b7280 !important;
    border-radius:50% !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    background:#fff !important;
    color:#111827 !important;
    line-height:1 !important;
  }
}


/* =========================================================
   PERFORMANCE: LARGE PYQ PAPERS (500+ QUESTIONS)
   - Keep native scrolling.
   - Let the browser skip painting far-off question cards.
   - Math is rendered lazily by pyq.js.
   - Disabled for print so A4 output remains complete.
   ========================================================= */
@media screen {
  .pyq-reader-question-scroll #pyqQuestionList .question-box {
    content-visibility: auto;
    contain-intrinsic-size: 360px;
  }

  .pyq-reader-question-scroll #pyqQuestionList .question-box.solution-locked {
    contain-intrinsic-size: 440px;
  }
}

@media print {
  .pyq-reader-question-scroll #pyqQuestionList .question-box {
    content-visibility: visible !important;
    contain-intrinsic-size: auto !important;
  }
}

/* =========================================================
   PDF PREPARATION PROGRESS OVERLAY
   - Appears immediately after Download PDF is clicked.
   - Green circular progress ring fills smoothly from 0 to 100%.
   ========================================================= */
.pbs-pdf-progress-overlay{
    position:fixed !important;
    inset:0 !important;
    z-index:2147483000 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    padding:20px !important;
    background:rgba(15,23,42,.20) !important;
    backdrop-filter:blur(2px) !important;
    -webkit-backdrop-filter:blur(2px) !important;
    opacity:0 !important;
    visibility:hidden !important;
    pointer-events:none !important;
    transition:opacity .20s ease, visibility .20s ease !important;
}

.pbs-pdf-progress-overlay.is-visible{
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;
}

.pbs-pdf-progress-card{
    position:relative !important;
    z-index:2 !important;
    pointer-events:auto !important;
    width:min(270px, calc(100vw - 40px)) !important;
    padding:24px 22px 22px !important;
    border:1px solid rgba(148,163,184,.30) !important;
    border-radius:18px !important;
    background:rgba(255,255,255,.97) !important;
    color:#172033 !important;
    box-shadow:0 18px 60px rgba(15,23,42,.22), 0 4px 18px rgba(15,23,42,.10) !important;
    text-align:center !important;
    box-sizing:border-box !important;
}

.pbs-pdf-progress-circle{
    position:relative !important;
    width:134px !important;
    height:134px !important;
    margin:0 auto 16px !important;
}

.pbs-pdf-progress-svg{
    width:134px !important;
    height:134px !important;
    display:block !important;
    transform:rotate(-90deg) !important;
    overflow:visible !important;
}

.pbs-pdf-progress-track,
.pbs-pdf-progress-ring{
    fill:none !important;
    stroke-width:8 !important;
}

.pbs-pdf-progress-track{
    stroke:rgba(148,163,184,.20) !important;
}

.pbs-pdf-progress-ring{
    stroke:#22c55e !important;
    stroke-linecap:round !important;
    transition:stroke-dashoffset .08s linear !important;
    filter:drop-shadow(0 2px 5px rgba(34,197,94,.16)) !important;
}

.pbs-pdf-progress-percent{
    position:absolute !important;
    inset:0 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:1px !important;
    color:#172033 !important;
    font-family:Arial,Helvetica,sans-serif !important;
    font-size:28px !important;
    line-height:1 !important;
    font-weight:800 !important;
    font-variant-numeric:tabular-nums !important;
}

.pbs-pdf-progress-percent small{
    margin-top:5px !important;
    font-size:14px !important;
    font-weight:800 !important;
}

.pbs-pdf-progress-title{
    margin:0 !important;
    font-family:Arial,Helvetica,sans-serif !important;
    font-size:17px !important;
    line-height:1.25 !important;
    font-weight:800 !important;
    letter-spacing:.1px !important;
}

.pbs-pdf-progress-subtitle{
    margin-top:6px !important;
    color:#64748b !important;
    font-family:Arial,Helvetica,sans-serif !important;
    font-size:12px !important;
    line-height:1.35 !important;
    font-weight:600 !important;
}

html.dark-mode .pbs-pdf-progress-card,
body.dark-mode .pbs-pdf-progress-card,
html.dark .pbs-pdf-progress-card,
body.dark .pbs-pdf-progress-card,
html[data-theme="dark"] .pbs-pdf-progress-card,
body[data-theme="dark"] .pbs-pdf-progress-card{
    background:rgba(17,24,39,.97) !important;
    border-color:rgba(71,85,105,.55) !important;
    color:#e5edf7 !important;
    box-shadow:0 20px 64px rgba(0,0,0,.42), 0 4px 20px rgba(0,0,0,.25) !important;
}

html.dark-mode .pbs-pdf-progress-track,
body.dark-mode .pbs-pdf-progress-track,
html.dark .pbs-pdf-progress-track,
body.dark .pbs-pdf-progress-track,
html[data-theme="dark"] .pbs-pdf-progress-track,
body[data-theme="dark"] .pbs-pdf-progress-track{
    stroke:rgba(100,116,139,.25) !important;
}

html.dark-mode .pbs-pdf-progress-percent,
body.dark-mode .pbs-pdf-progress-percent,
html.dark .pbs-pdf-progress-percent,
body.dark .pbs-pdf-progress-percent,
html[data-theme="dark"] .pbs-pdf-progress-percent,
body[data-theme="dark"] .pbs-pdf-progress-percent{
    color:#e5edf7 !important;
}

html.dark-mode .pbs-pdf-progress-subtitle,
body.dark-mode .pbs-pdf-progress-subtitle,
html.dark .pbs-pdf-progress-subtitle,
body.dark .pbs-pdf-progress-subtitle,
html[data-theme="dark"] .pbs-pdf-progress-subtitle,
body[data-theme="dark"] .pbs-pdf-progress-subtitle{
    color:#94a3b8 !important;
}

@media (max-width:600px){
    .pbs-pdf-progress-card{
        width:min(250px, calc(100vw - 34px)) !important;
        padding:20px 18px 19px !important;
        border-radius:16px !important;
    }
    .pbs-pdf-progress-circle,
    .pbs-pdf-progress-svg{
        width:122px !important;
        height:122px !important;
    }
    .pbs-pdf-progress-percent{
        font-size:25px !important;
    }
    .pbs-pdf-progress-title{
        font-size:16px !important;
    }
}


/* =========================================================
   PDF PROGRESS — CANCEL DOWNLOAD BUTTON
   ========================================================= */
.pbs-pdf-progress-cancel{
    position:relative !important;
    z-index:10 !important;
    pointer-events:auto !important;
    touch-action:manipulation !important;
    -webkit-tap-highlight-color:transparent !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-width:132px !important;
    height:38px !important;
    margin:15px auto 0 !important;
    padding:0 16px !important;
    border:1px solid #cbd5e1 !important;
    border-radius:10px !important;
    background:#fff !important;
    color:#475569 !important;
    font-family:Arial,Helvetica,sans-serif !important;
    font-size:12px !important;
    line-height:1 !important;
    font-weight:700 !important;
    letter-spacing:.05px !important;
    cursor:pointer !important;
    box-shadow:0 1px 2px rgba(15,23,42,.06) !important;
    transition:background .15s ease,border-color .15s ease,color .15s ease,transform .15s ease !important;
}

.pbs-pdf-progress-cancel:hover{
    border-color:#94a3b8 !important;
    background:#f8fafc !important;
    color:#1e293b !important;
}

.pbs-pdf-progress-cancel:active{
    transform:translateY(1px) !important;
}

.pbs-pdf-progress-cancel:focus,
.pbs-pdf-progress-cancel:focus-visible{
    outline:none !important;
    border-color:#94a3b8 !important;
    box-shadow:0 0 0 3px rgba(59,130,246,.10),0 1px 2px rgba(15,23,42,.06) !important;
}

html.dark-mode .pbs-pdf-progress-cancel,
body.dark-mode .pbs-pdf-progress-cancel,
html.dark .pbs-pdf-progress-cancel,
body.dark .pbs-pdf-progress-cancel,
html[data-theme="dark"] .pbs-pdf-progress-cancel,
body[data-theme="dark"] .pbs-pdf-progress-cancel{
    border-color:#475569 !important;
    background:#111827 !important;
    color:#cbd5e1 !important;
    box-shadow:0 1px 2px rgba(0,0,0,.22) !important;
}

html.dark-mode .pbs-pdf-progress-cancel:hover,
body.dark-mode .pbs-pdf-progress-cancel:hover,
html.dark .pbs-pdf-progress-cancel:hover,
body.dark .pbs-pdf-progress-cancel:hover,
html[data-theme="dark"] .pbs-pdf-progress-cancel:hover,
body[data-theme="dark"] .pbs-pdf-progress-cancel:hover{
    border-color:#64748b !important;
    background:#1e293b !important;
    color:#f1f5f9 !important;
}

@media (max-width:600px){
    .pbs-pdf-progress-cancel{
        min-width:124px !important;
        height:36px !important;
        padding:0 14px !important;
        margin-top:13px !important;
        font-size:11.5px !important;
        border-radius:9px !important;
    }
}
