/* ============================================================
   SINGLE PYQ STYLESHEET (Final Premium V8.0)
   Designed for: Pariksha Taiyari
   Updates: Open Layout Optimized (No Sticky Footer, Cleaner Spacing)
   ============================================================ */

/* 2. LAYOUT VARIABLES (page-specific dimensions only)
   All color variables come from pyq-design-tokens.css */
:root {
    --pt-container-w: 750px;
    --pt-col-marker: 40px;
    --pt-col-status: 30px;
    --pt-btn-pad-x: 12px;
}

/* 3. BASE STYLES */
*,
*::before,
*::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--pt-bg-page);
    font-family: var(--theme-font-family, inherit);
    /* Use Blocksy's CSS variable */
    color: var(--pt-text);
    line-height: 1.6;
    margin: 0;
}

/* Main Container (Optimized for No Sticky Footer) */
.pt-main-container {
    max-width: var(--pt-container-w, 750px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    /* Updated Padding: Removed extra bottom space */
    padding: 20px 16px 40px 16px;
    font-family: inherit;
    width: 100%;
}

/* 4. LANGUAGE TOGGLE LOGIC */
[data-lang="en"] .pt-show-hi {
    display: none !important;
}

[data-lang="hi"] .pt-show-en {
    display: none !important;
}

/* 5. COMPONENTS: BREADCRUMBS */
.pt-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--pt-text-light);
    font-weight: 500;
    margin-bottom: 0 !important;
}

.pt-sep {
    margin: 0 2px;
    opacity: 0.5;
    font-size: 10px;
}

/* 6. COMPONENTS: CARD (Common) */
.pt-related-section {
    max-width: var(--pt-container-w, 750px);
    margin-left: auto;
    margin-right: auto;
    width: 100% !important;
    background: var(--pt-bg-card);
    border-radius: 6px; /* Reverted to 6px */
    box-shadow: none;
    border: 1px solid var(--pt-border);
    margin-bottom: 16px;
    overflow: hidden;
}

/* Question card — blue top accent bar */
.pyq-single-article {
    border-top: 3px solid var(--pt-primary);
}

/* 6.1 Specific Card Types */

/* 7. CARD HEADER */

.pt-breadcrumbs {
    margin-bottom: 0 !important;
    /* Override breadcrumb margin since it's now in a flex row */
    flex: 1;
    overflow: hidden;
}

/* Consolidated below */

.pt-breadcrumb-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Q.No + Actions — same row inside question body */

/* Removed: Moved to header */

/* Action Tools Layout */
.pyq-action-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pt-divider {
    height: 1px;
    background: var(--pt-border);
    width: 100%;
    margin: 15px 0;
}

/* 8. QUESTION BODY & COMPONENTS */

/* --- Standardize Module Gaps (Dynamic & Professional) --- */

/* Specific left indent for all components when Q number exists */

/* Master Gap between all main modules */

/* Paragraph Margin Reset (Variable Driven) */

/* Specific left indent for all components when Q number exists */

/* Hanging Indent Layout (when Q number exists) */

/* Base Options Margin (Indented visually like rest of content) */

/* Base Section Padding */

/* Meta Header (QID/QNo) */

/* Passage / Comprehension */

/* Assertion-Reason */

/* The text runs on after its label on the same line ("कथन (A): पृथ्वी गोल है।"). */

/* Statements & Chronology Lists */

.pt-stmt-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: var(--pt-inner-gap, 6px);
}

.pt-stmt-item:last-child {
    margin-bottom: 0;
}

.pt-stmt-num {
    font-weight: 700;
    color: var(--pt-text);
    min-width: 20px;
}

.pt-stmt-text {
    flex: 1;
}

/* Sub-Question / Instruction Box */

/* Media Containers */

.pt-main-container .pt-question-img {
    max-width: 450px;
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    margin: 15px auto;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

/* Option Images */

/* Rich Content Formatting */
.pyq-rich-content p {
    margin-top: 0;
    margin-bottom: 0.8em;
}

.pyq-rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

.pyq-rich-content ul,
.pyq-rich-content ol {
    margin-bottom: 1rem;
    padding-left: 20px;
}

/* Exam Badge */

/* 9. OPTIONS GRID */

/* 2-column layout — statement/short text types */

/* Equal height rows in 2-col grid */

/* Consolidated below */

/* STATES: Correct & Wrong */

/* 9b. EXAM BOX — which exam this question is from */
.pt-exam-box {
    margin: 16px 20px 20px 20px;
    padding: 16px;
    background: transparent;
    border: 1px solid var(--pt-border, #e2e8f0);
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    width: auto;
}

/* Removed placeholder footer */

.pt-exam-btns {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    min-width: 140px;
}

.pt-exam-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    width: 100%;
}

.pt-exam-btn:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.pt-exam-btn-pdf {
    border: 1.5px solid #dc2626;
    color: #dc2626;
    background: #fff;
}

.pt-exam-btn-pdf:hover {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #b91c1c;
}

.pt-exam-btn-mock {
    background: #10b981;
    color: white;
    border: 1px solid rgba(16, 185, 129, 0.5);
    box-shadow: none;
}

.pt-exam-btn-mock:hover {
    background: #059669;
    color: #fff !important;
    box-shadow: none;
}

/* 9c. ASKED BEFORE — other papers with this question (closed by default) */
.pt-asked {
    margin: -8px 20px 20px 20px;
}

.pt-asked-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--pt-border, #e2e8f0);
    border-radius: 6px;
    background: transparent;
    color: var(--pt-text, #0f172a);
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.pt-asked-toggle:hover {
    background: var(--pt-bg-subtle, #f8fafc);
}

.pt-asked-txt {
    flex: 1;
}

.pt-asked-chev {
    color: var(--pt-text-muted, #64748b);
    transition: transform 0.2s ease;
}

.pt-asked-toggle.open {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.pt-asked-toggle.open .pt-asked-chev {
    transform: rotate(180deg);
}

.pt-asked-list {
    list-style: none;
    margin: 0;
    padding: 4px 12px;
    border: 1px solid var(--pt-border, #e2e8f0);
    border-top: 0;
    border-radius: 0 0 6px 6px;
}

.pt-asked-list[hidden] {
    display: none;
}

.pt-asked-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--pt-border, #e2e8f0);
}

.pt-asked-list li:last-child {
    border-bottom: 0;
}

.pt-asked-list a {
    color: var(--pt-primary, #2563eb);
    text-decoration: none;
    font-weight: 600;
}

.pt-asked-list a:hover {
    text-decoration: underline;
}

.pt-asked-q {
    color: var(--pt-text-muted, #64748b);
    white-space: nowrap;
}

/* Disabled State for Actions */
.pt-btn-disabled {
    opacity: 0.5 !important;
    filter: grayscale(0.8);
    cursor: not-allowed !important;
    pointer-events: none;
    box-shadow: none !important;
    transform: none !important;
}

.pt-btn-disabled:hover {
    background: inherit !important;
    transform: none !important;
    box-shadow: none !important;
}

.pt-exam-btn-mock:hover {
    background: #059669;
    box-shadow: none;
    transform: translateY(-1px);
}

/* Mobile Responsiveness for Exam Box */
/* Consolidated below */

/* 10. BUTTONS & UTILS (Reused for Navigation) */
/* Used for 'Next Question' button */
.pt-btn-soft {
    background: var(--pt-primary-soft);
    color: var(--pt-primary);
    border: 1px solid rgba(37, 99, 235, 0.15);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
    box-shadow: none;
    text-decoration: none;
    /* Added for link compatibility */
}

.pt-btn-soft:hover {
    background: var(--pt-primary-hover);
    transform: translateY(-1px);
    box-shadow: none;
}

/* Used for 'Previous' and 'Full Paper' buttons */
.pt-btn-outline {
    text-decoration: none;
    color: var(--pt-primary);
    border: 1px solid var(--pt-primary);
    padding: 6px 14px;
    /* Slightly adjusted padding */
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    transition: 0.2s;
    display: inline-block;
}

.pt-btn-outline:hover {
    background: var(--pt-primary);
    color: white;
}

/* ============================================================
   10.5 CORRECT ANSWER STRIP (Premium Minimalist V4 - Green Theme)
   ============================================================ */

/* Mobile Adjustments */
/* Consolidated below */

/* 11. SOLUTION CARD */

.pt-tab-btn {
    background: none;
    border: none;
    padding: 14px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--pt-text-light);
    border-bottom: 2px solid transparent;
    cursor: pointer;
}

.pt-tab-btn.active {
    color: var(--pt-primary);
    border-bottom-color: var(--pt-primary);
}

.pyq-rich-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.pyq-rich-content p:first-child {
    margin-top: 0;
}

.pt-sol-voting {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* CLEANUP: Removing old voting button classes if still present */

/* 12. (Navigator removed) */

/* 14. MODAL UTILS */
.pt-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(3px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pt-modal-box {
    background: white;
    width: 90%;
    max-width: 380px;
    border-radius: 16px;
    border: 1px solid var(--pt-border, #e2e8f0);
    box-shadow: none;
    overflow: hidden;
    animation: ptSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pt-modal-header {
    background: #f8fafc;
    padding: 12px 20px;
    border-bottom: 1px solid var(--pt-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pt-modal-header h3 {
    margin: 0;
    font-size: 15px;
    color: var(--pt-text);
}

.pt-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
}

.pt-modal-body {
    padding: 20px;
}

/* =========================================
   7. SMART STATEMENT LISTS
   ========================================= */
/* =========================================
   7. SMART STATEMENT LISTS & UNIVERSAL TABLE
   ========================================= */

/* UNIVERSAL TABLE (For Layout Only - No Visuals) */

/* SMART STATEMENT ITEMS */
.pt-stmt-item {
    display: flex;
    align-items: baseline;
    /* Better than flex-start for text */
    margin-bottom: 8px;
    line-height: 1.6;
    width: 100%;
    /* Force full width */
}

.pt-stmt-num {
    font-weight: 700;
    min-width: 28px;
    /* Slightly wider for double digits */
    color: var(--pt-text);
    /* Standard text color looks cleaner */
    flex-shrink: 0;
}

.pt-stmt-text {
    flex-grow: 1;
    /* Removed display: block to permit inline flow in PDF/mPDF */
}

/* Ensure no conflict (Fix "One Line" issue) */

.pt-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--pt-border);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
}

.pt-radio-label:has(input:checked) {
    border-color: var(--pt-primary);
    background: var(--pt-primary-soft);
    color: var(--pt-primary);
    font-weight: 600;
}

.pt-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--pt-border);
    border-radius: 8px;
    margin-top: 10px;
    font-family: inherit;
}

.pt-btn-submit {
    width: 100%;
    background: var(--pt-text);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    margin-top: 15px;
    font-weight: 600;
    cursor: pointer;
}

/* Utilities */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Hide redundant Blocksy Theme elements on Single PYQ pages */
.single-pyq .hero-section,
.single-pyq .ct-post-meta,
.single-pyq .entry-meta {
    display: none !important;
}

@keyframes ptShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

@keyframes ptSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ---- Report Modal Form Groups ---------------------------- */
.pt-form-group {
    margin-bottom: 16px;
}

.pt-form-group > label:first-child {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--pt-text, #1e293b);
    margin-bottom: 10px;
}

/* Dashicons inside buttons — standardize size */

/* Image Lightbox */
.pt-question-img.is-zoomed {
    position: relative;
    z-index: 1000;
    transform: scale(1.5);
    transition: transform 0.3s ease;
    cursor: zoom-out;
}

/* Image Load Error */
.pt-img-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #94a3b8;
    font-size: 12px;
    padding: 20px;
}

.pt-img-error .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #cbd5e1;
}

/* Solution card header row */

/* Print Styles */
@media print {
    .print\:hidden {
        display: none !important;
    }

    .pt-main-container {
        padding: 0;
        max-width: 100%;
    }

    .print\:block {
        display: block !important;
    }

    body {
        background: white;
    }
}

/* ============================================================
   UNIVERSAL TABLE ENGINE (For List-I vs List-II)
   ============================================================ */

/* Consolidated below */

/* Question Body Spacing */
/* .pyq-entry-content - Placeholder removed to fix empty ruleset warning */

/* Sources / References Box */

/* Chronology List */

/* Table Wrapping & Polishing */

/* 15. PRINT OPTIMIZATIONS (Premium Export) */
@media print {

    /* Hide UI-only elements */
    .pt-sidebar,
    .pt-modal-overlay,
    .pt-breadcrumbs .pt-sep,
    .pt-breadcrumbs a:after,
    #header,
    #footer,
    .sidebar,
    .nav-links {
        display: none !important;
    }

    /* Reset Container for Print */
    .pt-main-container {
        display: block !important;
        padding: 0 !important;
        background: white !important;
    }

    /* Force Solutions to Show on Print */
    .pt-solution-box,
    .pt-show-en,
    .pt-show-hi {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Keep Question and Options Together */
    .pt-solution-box {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    /* Typography Polish */
    body {
        font-size: 12pt;
        color: black;
    }

    h1 {
        font-size: 18pt;
        margin-bottom: 20px;
    }

    /* Branding Footer for Print */
}

/* ============================================================
   DESIGN SYSTEM UPGRADES — Professional UI
   ============================================================ */

/* --- VOTING BOX (Clean, no box) --- */
.pyq-voting-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.pyq-voting-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 0;
}

.pyq-vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 36px;
    padding: 4px 2px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #475569;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    transition: color 0.15s ease;
}

.pyq-vote-btn .dashicons {
    font-size: 17px;
    width: 17px;
    height: 17px;
}

.pyq-vote-btn:hover {
    background: transparent;
    color: #1d4ed8;
}

.pyq-vote-btn.voted {
    background: transparent;
    color: #047857;
    cursor: default;
}

.pyq-vote-count {
    font-size: 13px;
    font-weight: 700;
    color: inherit;
    min-width: 10px;
    text-align: center;
}

.pyq-vote-feedback {
    font-size: 12px;
    font-weight: 700;
    color: #10b981;
    animation: ptFadeInUp 0.4s ease;
}

@keyframes ptFadeInUp {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pt-vote-animate {
    animation: ptQuickScale 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes ptQuickScale {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.4);
        color: #10b981;
    }

    100% {
        transform: scale(1);
    }
}

/* --- Q.1 + Question text --- */

/* Old QID/meta header — hidden (removed from template) */

/* --- META BADGES (Exam / Year / Subject / Difficulty) --- */
.pyq-meta-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pyq-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--pt-border-light);
    border: 1px solid var(--pt-border);
    color: var(--pt-text-light);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--pt-radius-pill);
    text-decoration: none;
    line-height: 1;
}

.pyq-meta-item a {
    color: inherit;
    text-decoration: none;
}

.pyq-meta-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* Exam badge — blue tint */
.pyq-tax-exam {
    background: var(--pt-primary-soft);
    border-color: rgba(37, 99, 235, 0.2);
    color: var(--pt-primary);
}

/* Difficulty badge — amber */
.pyq-tax-difficulty {
    background: var(--pt-warning-bg);
    color: #b45309;
    border-color: var(--pt-warning-border);
}

/* Year badge — subtle */
.pyq-tax-year {
    background: var(--pt-bg-subtle);
}

/* --- QID META HEADER CLEANUP (removed from template, kept hidden) --- */

/* --- SOLUTION CARD HEADER --- */

/* ============================================================
   END DESIGN SYSTEM UPGRADES
   ============================================================ */

/* 2. MATCH MODE (Matrix) */
/* Container overrides */

/* Matrix Row Grid Layout (Used for both Header and Option Rows) */

/* Matrix Number Styling (Clean Look - No BG/Border) */

/* Hover state: reset color inheritance */

/* ============================================================
   MATCH TABLE HEADER (List-I / List-II column titles)
   ============================================================ */

/* Reset list/paragraph indent inside match table cells */

/* ============================================================
   MATRIX CODES TABLE (options as grid for match/matrix type)
   ============================================================ */

/* Mobile Adjustments for Matrix Table */
/* Consolidated below */

/* ============================================================
   16. UNIFIED MOBILE RESPONSIVENESS (Consolidated V1.0)
   ============================================================ */

/* --- Tablet & Small Screens (600px) --- */
@media (max-width: 600px) {

    .pt-breadcrumb-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .pt-exam-box {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        margin: 10px 20px;
    }

    .pt-exam-btns {
        width: 100%;
        min-width: 0;
        flex-direction: row;
    }

    .pt-exam-btn {
        flex: 1;
    }

    .pt-asked {
        margin: -4px 20px 16px;
    }
}

/* --- Mobile Smartphones (480px) --- */
@media (max-width: 480px) {
    /* Unified Card Spacing: Ensure no clinging to edges */
    .pt-exam-box,
    .pt-asked {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }

    /* Question body & options — reduce side padding on small screens */

    /* Options Grid */

    /* Correct Answer Strip */

    /* Solution Footer — wrap on very small screens */

    /* Tables (Universal & Matrix) */

    /* Exam buttons — side by side on mobile */
    .pt-exam-btns {
        flex-direction: row;
    }

    .pt-exam-btn {
        flex: 1;
    }
}

/* ============================================================
   17. PHASE 1 MOBILE BLOCKERS (HIGH priority audit fixes)
   Appended — do not edit; safe to remove as a block.
   ============================================================ */

/* HIGH #4: container max-width — full viewport on small phones */
/* HIGH #5: question images — never overflow viewport */
@media (max-width: 480px) {
    .pt-main-container {
        max-width: 100% !important;
        padding: 16px 12px 32px 12px !important;
    }

    .pt-main-container .pt-question-img {
        max-width: 100% !important;
        margin: 12px auto;
    }

    /* Q.No: a touch more breathing room (8px → 10px) */

    /* Breadcrumbs: don't truncate on mobile (was overflow:hidden via flex:1) */
    .pt-breadcrumbs {
        overflow: visible;
    }

    /* Touch targets — meet 44x44 minimum on key controls */
}

/* HIGH #3: matrix codes table — keep readable on iPhone SE / Galaxy S10 */

/* Solution figure (direction / Venn diagram drawn from the AI's data) */

/* AI-redrawn question figure (clean SVG); the paper crop is the fallback */

/* Data tables written in the question, passage or explanation text (plain
   <table>, no class): cell lines, header shade, sideways scroll on phones. */
.pyq-rich-content table:not([class]) {
    width: auto !important;
    min-width: 60%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 10px 0 !important;
    font-size: 0.95em;
}

.pyq-rich-content table:not([class]) th,
.pyq-rich-content table:not([class]) td {
    border: 1px solid #cbd5e1;
    padding: 6px 10px;
    text-align: left;
    vertical-align: top;
}

.pyq-rich-content table:not([class]) th {
    background: #f1f5f9;
    font-weight: 700;
}

.pyq-rich-content:has(table) {
    overflow-x: auto;
}

/* AI drawings: a label written just past the drawing's edge stays visible. */

/* Paper-style options on single PYQ posts; answer feedback stays unchanged. */

/* Single-question toolbar: compact language toggle and plain footer actions. */
#ptApp #ptLangToggle {
    height: 40px;
    min-height: 40px;
    width: auto;
    min-width: 70px;
    padding: 3px !important;
    gap: 0 !important;
    border: none !important;
    border-radius: 999px;
    flex-shrink: 0;
}

#ptApp #ptLangToggle .pt-lang-opt {
    width: 32px !important;
    height: 32px !important;
    flex: 0 0 32px;
    border-radius: 50%;
}

#ptApp .pt-sol-footer-actions {
    margin-left: auto;
    max-width: 100%;
}

#ptApp .pt-sol-footer-actions .pyq-action-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 4px 12px;
}

#ptApp .pt-sol-footer-actions .pyq-tool-btn {
    height: auto;
    min-height: 36px;
    max-width: 100%;
    padding: 4px 2px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    white-space: normal;
    text-align: left;
}

#ptApp .pt-sol-footer-actions .pyq-tool-btn svg {
    flex-shrink: 0;
}

#ptApp .pt-sol-footer-actions .pyq-tool-btn:hover {
    background: transparent;
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 480px) {
    #ptApp #ptLangToggle {
        height: 36px;
        min-height: 36px;
        min-width: 62px;
    }

    #ptApp #ptLangToggle .pt-lang-opt {
        width: 28px !important;
        height: 28px !important;
        flex-basis: 28px;
        font-size: 12px;
    }
}

.pt-report-context {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.pt-report-context-btn {
    border: 1px solid var(--pt-border, #e2e8f0);
    background: white;
    color: #475569;
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
}

.pt-report-context-btn[aria-pressed="true"] {
    background: var(--pt-primary, #2563eb);
    border-color: var(--pt-primary, #2563eb);
    color: white;
}

/* Keep the final question line close to its options on single PYQ posts. */

/* Keep voting and plain actions together on phones. */
@media (max-width: 600px) {

    #ptApp .pt-sol-voting {
        flex: 0 0 auto;
    }

    #ptApp .pt-sol-footer-actions {
        min-width: 0;
    }

    #ptApp .pt-sol-footer-actions .pyq-action-tools {
        gap: 4px 10px;
    }

    #ptApp .pt-sol-footer-actions .pyq-tool-btn {
        font-size: 12px;
        line-height: 1.4;
    }
}

/* Compact, book-style paper references within the question card. */
#ptApp .pyq-entry-content .pt-exam-box {
    border: 0;
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 12px 24px 16px !important;
    width: auto !important;
    display: block;
}

#ptApp .pt-exam-reference-list {
    width: min(620px, 100%);
    margin-left: auto;
    text-align: right;
}

#ptApp .pt-exam-reference-row {
    display: flex;
    justify-content: flex-end;
    padding: 3px 0;
    font-size: 13px;
    line-height: 1.45;
}

#ptApp .pt-exam-reference-line,
#ptApp .pt-exam-reference-link {
    display: inline;
    max-width: 100%;
    color: inherit;
    text-decoration: none;
}

#ptApp .pt-exam-reference-current {
    color: var(--pt-primary, #2563eb);
    font-weight: 700;
}

#ptApp .pt-exam-reference-repeat {
    color: var(--pt-text-muted, #64748b);
    font-weight: 600;
}

#ptApp .pt-exam-reference-repeat .pt-exam-reference-link:hover {
    color: var(--pt-primary, #2563eb);
    text-decoration: underline;
    text-underline-offset: 2px;
}

#ptApp .pt-exam-reference-prefix {
    display: inline;
}

#ptApp .pt-exam-reference-tail {
    display: inline-block;
    white-space: nowrap;
}

#ptApp .pt-exam-paper-sep {
    color: var(--pt-text-muted, #94a3b8);
    font-weight: 400;
}

#ptApp .pt-exam-reference-dot {
    color: #a5b0ba;
    font-size: 0.82em;
    padding: 0 4px;
    font-weight: 400;
}

#ptApp .pt-exam-reference-date {
    color: var(--pt-text-muted, #7f8e9f);
    font-size: 0.92em;
    font-weight: 500;
}

/* Web-only resources belong to the current paper row.
   Keep the existing labels and icons, but render them as quiet text links. */
#ptApp .pt-exam-btns {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    min-width: 0;
    gap: 6px 12px;
    margin: 4px 0 7px;
}

#ptApp .pt-exam-btn {
    width: auto;
    flex: 0 1 auto;
    min-height: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    padding: 2px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    white-space: normal;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
}

#ptApp .pt-exam-btn svg {
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
}

#ptApp .pt-exam-btn-pdf {
    color: #dc2626;
}

#ptApp .pt-exam-btn-mock {
    color: #047857;
}

#ptApp .pt-exam-btn:hover {
    background: transparent;
    transform: none;
    box-shadow: none;
}

#ptApp .pt-exam-btn-pdf:not(.pt-btn-disabled):hover {
    color: #b91c1c;
    text-decoration: underline;
    text-underline-offset: 2px;
}

#ptApp .pt-exam-btn-mock:not(.pt-btn-disabled):hover {
    color: #047857 !important;
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (max-width: 480px) {
    #ptApp .pyq-entry-content .pt-exam-box {
        margin-left: 16px !important;
        margin-right: 16px !important;
    }

    #ptApp .pt-exam-reference-row {
        font-size: 12px;
        padding: 3px 0;
    }

    #ptApp .pt-exam-btns {
        gap: 5px 9px;
        margin-top: 4px;
    }

    #ptApp .pt-exam-btn {
        font-size: 10.8px;
    }
}

@media (max-width: 380px) {
    #ptApp .pyq-entry-content .pt-exam-box {
        margin-left: 12px !important;
        margin-right: 12px !important;
    }

    #ptApp .pt-exam-reference-row {
        font-size: 11.6px;
    }
}

/* Resource actions are website navigation only, never printable/PDF content. */
@media print {
    #ptApp .pt-web-only {
        display: none !important;
    }
}

/* Approved answer + explanation card polish. */

/* Final answer-wrap and solution-spacing polish. */

/* Table whose rows are checked (3+ columns): columns size to their text, words
   never break mid-word, and a narrow screen scrolls the table sideways inside
   .pt-table-responsive instead of cutting the last column. */

/* ============================================================
   PAPER SHEET — the question as the printed paper shows it
   (plan Phase 4, approved demo docs/demos/paper-look-demo.html, look A)
   ============================================================ */
#ptApp .pq-sheet {
    --pq-paper: #fefefc;
    --pq-ink: #1a1a1a;
    --pq-line: #dadad4;
    --pq-rule: #9b9384;
    --pq-muted: #6b6457;
    --pq-serif: 'Noto Serif', 'Noto Serif Devanagari', Georgia, 'Times New Roman', serif;
    --pq-sans: 'Inter', 'Noto Sans Devanagari', system-ui, sans-serif;
    background: var(--pq-paper);
    color: var(--pq-ink);
    border: 1px solid var(--pq-line);
    border-radius: 0;
    box-shadow: 0 1px 0 #fff inset, 0 6px 18px rgba(15, 23, 42, 0.08);
    padding: 26px 26px 22px;
    margin: 0 0 24px;
    font-family: var(--pq-serif);
    font-size: 17px;
    line-height: 1.65;
    overflow-wrap: break-word;
}

#ptApp .pq-sheet p {
    margin: 0 0 0.5em;
    font: inherit;
    color: inherit;
    line-height: inherit;
}

/* Source line and language button */
#ptApp .pq-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-family: var(--pq-sans);
    font-size: 12px;
    color: var(--pq-muted);
    border-bottom: 1px solid var(--pq-line);
    padding-bottom: 8px;
    margin-bottom: 14px;
    min-height: 44px;
}

#ptApp .pq-meta .pt-breadcrumb-actions {
    margin-left: auto;
    width: auto !important; /* the older header rule made it full width on phones */
    justify-content: flex-end !important;
}

/* The number hangs at the left; everything else lines up after it. */
#ptApp .pq-qrow {
    display: grid;
    grid-template-columns: 2.2em minmax(0, 1fr);
    column-gap: 0.2em;
}

#ptApp .pq-qrow.pq-nonum {
    grid-template-columns: minmax(0, 1fr);
}

#ptApp .pq-qno {
    font-weight: 700;
}

#ptApp .pq-body > * {
    min-width: 0;
}

#ptApp .pq-sheet .pt-show-en,
#ptApp .pq-sheet .pt-show-hi {
    min-width: 0;
}

/* Lists: label column, then the text */
#ptApp .pq-list {
    list-style: none;
    margin: 0.35em 0 0.55em;
    padding: 0;
}

#ptApp .pq-list li {
    display: grid;
    grid-template-columns: 2.2em minmax(0, 1fr);
    margin: 0.18em 0;
    padding: 0;
}

#ptApp .pq-list li::before {
    content: none;
}

/* A numbered list typed inside the question text */
#ptApp .pq-sheet .pt-stmt-item {
    display: grid;
    grid-template-columns: 2.2em minmax(0, 1fr);
    margin: 0.18em 0;
    padding: 0;
    border: 0;
    background: none;
}

#ptApp .pq-sheet .pt-stmt-num {
    font-weight: 400;
    min-width: 0;
    color: inherit;
}

#ptApp .pq-sheet .pt-stmt-text {
    color: inherit;
}

/* One assertion on its own (assertion → basis): italic, as printed */
#ptApp .pq-assert {
    font-style: italic;
    margin: 0.3em 0 0.5em;
}

#ptApp .pq-ar b {
    font-weight: 700;
}

#ptApp .pq-passage {
    margin-bottom: 0.4em;
}

/* Tables: a ruled grid; List-I / List-II and pairs without lines */
#ptApp .pq-tw {
    max-width: 100%;
    overflow-x: auto;
    margin: 0.5em 0;
}

#ptApp .pq-sheet table {
    border-collapse: collapse;
    font-size: 0.94em;
    margin: 0;
    background: transparent;
    width: auto;
    min-width: 0;
    table-layout: auto;
    border: 0;
    box-shadow: none;
}

#ptApp .pq-sheet th,
#ptApp .pq-sheet td {
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    text-transform: none;
    letter-spacing: 0;
    vertical-align: top;
    text-align: left;
}

#ptApp .pq-grid {
    width: 100%;
}

#ptApp .pq-grid th,
#ptApp .pq-grid td,
#ptApp .pq-sheet .pq-text table th,
#ptApp .pq-sheet .pq-text table td,
#ptApp .pq-sheet .pq-passage table th,
#ptApp .pq-sheet .pq-passage table td {
    border: 1px solid var(--pq-rule);
    padding: 0.3em 0.5em;
}

#ptApp .pq-grid th,
#ptApp .pq-plain th {
    font-weight: 700;
}

#ptApp .pq-plain th,
#ptApp .pq-plain td {
    border: 0;
    padding: 0.18em 1.4em 0.18em 0;
}

#ptApp .pq-plain td.pq-l {
    padding-right: 0.7em;
    white-space: nowrap;
}

#ptApp .pq-plain .pq-gap {
    padding-left: 1.6em;
}

#ptApp .pq-match td:nth-child(2) {
    min-width: 9em;
}

#ptApp .pq-pairs td:nth-child(2) {
    min-width: 7em;
}

#ptApp .pq-pairs td.pq-colon {
    padding-right: 0.7em;
}

/* Options */
#ptApp .pq-opts {
    list-style: none;
    margin: 0.55em 0 0;
    padding: 0;
}

#ptApp .pq-opts li {
    margin: 0;
    padding: 0;
}

#ptApp .pq-opts li::before {
    content: none;
}

#ptApp .pq-opts.pq-grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1.4em;
}

#ptApp button.pq-opt {
    display: grid;
    grid-template-columns: 2.2em minmax(0, 1fr);
    align-items: start;
    width: calc(100% + 0.7em);
    margin: 0 -0.35em;
    padding: 0.22em 0.35em;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: inherit;
    text-align: left;
    cursor: pointer;
    box-shadow: none;
    text-transform: none;
    letter-spacing: 0;
    min-height: 0;
}

/* Hover only while a choice can still be made: after it, right / wrong show. */
#ptApp button.pq-opt:not([disabled]):hover,
#ptApp .pq-codegrid tr.pq-opt:not([aria-disabled]):hover {
    background: #f3eee2;
}

#ptApp button.pq-opt:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
}

#ptApp button.pq-opt.pq-right,
#ptApp .pq-codegrid tr.pq-right {
    background: #d1fae5;
}

#ptApp button.pq-opt.pq-wrong,
#ptApp .pq-codegrid tr.pq-wrong {
    background: #fee2e2;
}

#ptApp button.pq-opt[disabled] {
    cursor: default;
    opacity: 1;
}

#ptApp .pq-ot {
    min-width: 0;
}

#ptApp .pq-opt-img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-top: 4px;
}

#ptApp .pq-opt-img svg {
    max-width: 100%;
    height: auto;
}

/* Code grid: (a) 3 4 1 2 — each row a choice */
#ptApp .pq-codegrid {
    width: auto;
}

#ptApp .pq-codegrid th,
#ptApp .pq-codegrid td {
    border: 0;
    text-align: center;
    padding: 0.12em 1.1em;
}

#ptApp .pq-codegrid td.pq-l {
    text-align: left;
    padding-left: 0.35em;
}

#ptApp .pq-codegrid tr.pq-opt {
    cursor: pointer;
    border-radius: 6px;
}

#ptApp .pq-codegrid tr.pq-opt:focus-visible {
    outline: 2px solid #2563eb;
}

#ptApp .pq-code-h {
    margin-top: 0.5em;
}

/* Figures */
#ptApp .pq-fig {
    text-align: center;
    margin: 0.4em 0;
}

#ptApp .pq-fig svg,
#ptApp .pq-fig img {
    max-width: 100%;
    height: auto;
}

/* Labels at a drawing's edge stay visible. */
#ptApp .pq-fig svg {
    overflow: visible;
}

/* A table written inside the question or passage scrolls sideways on a phone. */
#ptApp .pq-text table,
#ptApp .pq-passage table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    margin: 0.5em 0;
}

/* Exam reference inside the sheet */
#ptApp .pq-sheet .pq-exam {
    font-family: var(--pq-sans);
    padding: 0;
    margin: 0;
}

#ptApp .pq-sheet .pq-exam .pt-exam-box {
    margin: 14px 0 0 !important;
}

/* Where the question is from: plain names, as printed at a paper's foot. */
#ptApp .pq-sheet .pt-exam-reference-list {
    width: 100%;
    text-align: right;
}

#ptApp .pq-sheet .pt-exam-reference-current {
    color: var(--pq-ink);
    font-family: var(--pq-serif);
    font-size: 14px;
    font-weight: 700;
}

#ptApp .pq-sheet .pt-exam-reference-repeat {
    font-family: var(--pq-serif);
    font-size: 13px;
}

/* The paper's buttons: one row on a laptop, three equal buttons on a
   tablet, one under another (full width) on a phone. */
#ptApp .pq-sheet .pt-exam-btns {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin: 8px 0 2px;
}

#ptApp .pq-sheet .pt-exam-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 7px 14px;
    border: 1px solid var(--pq-line);
    border-radius: 8px;
    background: #fff;
    font-family: var(--pq-sans);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    white-space: nowrap;
}

#ptApp .pq-sheet .pt-exam-btn svg {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
}

#ptApp .pq-sheet .pt-exam-btn-pdf {
    color: #b91c1c;
}

#ptApp .pq-sheet .pt-exam-btn-mock {
    color: #047857;
    border-color: #a7d7c5;
}

#ptApp .pq-sheet .pt-exam-btn:not(.pt-btn-disabled):hover {
    background: #f7f3ea;
    text-decoration: none;
}

#ptApp .pq-sheet .pt-exam-btn.pt-btn-disabled {
    opacity: 0.45;
    cursor: default;
}

@media (max-width: 820px) {
    #ptApp .pq-sheet .pt-exam-btns {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    /* Only one of the two Solved Paper buttons shows (the page's language). */
    #ptApp .pq-sheet .pt-exam-btn {
        min-width: 0;
        white-space: normal;
    }
}

@media (max-width: 480px) {
    #ptApp .pq-sheet .pt-exam-btns {
        grid-template-columns: 1fr;
    }

    #ptApp .pq-sheet .pt-exam-btn {
        white-space: nowrap;
    }

    #ptApp .pq-sheet .pt-exam-reference-current {
        font-size: 13px;
    }
}

/* Answer: hidden behind the button until a choice is made */
#ptApp .pq-ansbar {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--pq-line);
    display: flex;
    justify-content: flex-start;
}

#ptApp .pq-ansbar[hidden] {
    display: none;
}

#ptApp .pq-reveal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--pq-sans);
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.3;
    color: #1d4ed8;
    background: #eef4ff;
    border: 1px solid #c7d7fe;
    border-radius: 999px;
    padding: 9px 18px 9px 14px;
    cursor: pointer;
    min-height: 40px;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: none;
    transition: background 0.15s, border-color 0.15s;
}

#ptApp .pq-reveal:hover {
    background: #dbe7ff;
    border-color: #93b4fd;
}

#ptApp .pq-reveal:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

#ptApp .pq-reveal svg {
    width: 18px;
    height: 18px;
    flex: none;
}

/* Answer and explanation read like the solution in a book: same paper,
   a thin rule above, no coloured box (owner, 2026-10-09). */
#ptApp .pq-ans {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--pq-line);
    font-family: var(--pq-serif);
    font-size: 16px;
    line-height: 1.65;
    color: var(--pq-ink);
}

#ptApp .pq-ans[hidden] {
    display: none;
}

#ptApp .pq-ans-h {
    font-weight: 700;
    margin-bottom: 4px;
}

#ptApp .pq-exp {
    margin-top: 8px;
}

#ptApp .pq-exp-h {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    font-weight: 700;
    color: var(--pq-ink);
    margin-bottom: 2px;
}

/* Verified: green tick + word in the right corner (owner picked B, 2026-10-11). */
#ptApp .pq-verified {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    color: #047857;
    font-family: var(--pq-sans);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}

#ptApp .pq-verified-tick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #047857;
    color: #fff;
    flex: none;
}

#ptApp .pq-verified-tick svg {
    width: 12px;
    height: 12px;
}

#ptApp .pq-exp p {
    margin: 0 0 0.55em;
}

#ptApp .pq-exp table {
    border-collapse: collapse;
    margin: 0.4em 0;
    max-width: 100%;
}

#ptApp .pq-exp th,
#ptApp .pq-exp td {
    border: 1px solid var(--pq-rule);
    padding: 0.25em 0.5em;
    vertical-align: top;
}

#ptApp .pq-sources {
    margin-top: 8px;
    font-family: var(--pq-sans);
    font-size: 13px;
    color: var(--pq-muted);
}

#ptApp .pq-source + .pq-source::before {
    content: " · ";
}

/* Share / report / helpful */
#ptApp .pq-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px 16px;
    flex-wrap: wrap;
    margin-top: 14px;
    font-family: var(--pq-sans);
}

#ptApp .pq-foot .pt-sol-footer-actions {
    margin-left: auto;
}

/* Phone */
@media (max-width: 700px) {
    #ptApp .pq-sheet {
        padding: 18px 14px;
        font-size: 16px;
        border-left: 0;
        border-right: 0;
    }

    #ptApp .pq-qrow {
        grid-template-columns: 1.8em minmax(0, 1fr);
    }

    #ptApp .pq-opts.pq-grid2 {
        grid-template-columns: 1fr;
    }

    #ptApp .pq-plain th,
    #ptApp .pq-plain td {
        padding-right: 0.55em;
    }

    #ptApp .pq-plain .pq-gap {
        padding-left: 0.7em;
    }

    #ptApp .pq-plain td.pq-l {
        padding-right: 0.35em;
    }

    #ptApp .pq-match td:nth-child(2),
    #ptApp .pq-pairs td:nth-child(2) {
        min-width: 0;
    }

    #ptApp .pq-reveal {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   RELATED QUESTIONS under the sheet — like a book's list (owner picked
   look B, 2026-10-09): no box, a centred heading between two rules, two
   columns on a laptop; each question reads as a link (blue, ›, underline).
   ============================================================ */
#ptApp .pt-related-section {
    max-width: none;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin-top: 8px;
    overflow: visible;
}

#ptApp .pt-related-section .pyq-related-title {
    display: flex;
    align-items: center;
    gap: 12px;
    background: none;
    border: 0;
    padding: 6px 0 12px;
    text-align: center;
    color: #6b6457;
    font-family: 'Noto Serif', 'Noto Serif Devanagari', Georgia, serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

#ptApp .pt-related-section .pyq-related-title::before,
#ptApp .pt-related-section .pyq-related-title::after {
    content: "";
    flex: 1;
    border-top: 1px solid #dadad4;
}

#ptApp .pt-related-section .pyq-related-list {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 28px;
}

#ptApp .pt-related-section .pyq-related-item {
    position: relative;
    display: grid;
    grid-template-columns: 2.6em minmax(0, 1fr);
    gap: 0;
    padding: 8px 18px 8px 2px;
    border-bottom: 1px solid #e7e2d6;
    background: none;
}

#ptApp .pt-related-section .pyq-related-item::after {
    content: "›";
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    color: #93a4c8;
    font-size: 18px;
    line-height: 1;
}

#ptApp .pt-related-section .pyq-related-item:hover {
    background: #f7f3ea;
}

#ptApp .pt-related-section .pyq-related-item:hover::after {
    color: #1d4ed8;
}

#ptApp .pt-related-section .pyq-related-num {
    min-width: 0;
    color: #1a1a1a;
    font-family: 'Noto Serif', 'Noto Serif Devanagari', Georgia, serif;
    font-size: 14.5px;
    font-weight: 700;
}

#ptApp .pt-related-section .pyq-related-link {
    color: #1e40af;
}

/* The whole row opens the question, not only its words. */
#ptApp .pt-related-section .pyq-related-link::before {
    content: "";
    position: absolute;
    inset: 0;
}

#ptApp .pt-related-section .pyq-related-label {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    color: inherit;
    font-family: 'Noto Serif', 'Noto Serif Devanagari', Georgia, serif;
    font-size: 14.5px;
}

#ptApp .pt-related-section .pyq-related-link:hover,
#ptApp .pt-related-section .pyq-related-link:focus-visible {
    color: #1d4ed8;
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 700px) {
    #ptApp .pt-related-section .pyq-related-list {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* =========================================================
   Google ads (Settings › Ads). Never wider than the page:
   the box is clipped to its column and Google is told not to
   stretch the ad to the full phone width.
   ========================================================= */
#ptApp .pq-ad {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 6px 0 22px;
    overflow: hidden;
    text-align: center;
}

#ptApp .pq-ad__label {
    display: block;
    margin-bottom: 4px;
    color: #94a3b8;
    font: 600 10.5px/1.4 Inter, 'Noto Sans Devanagari', system-ui, sans-serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Room is kept before the ad arrives, so the page does not jump. */
#ptApp .pq-ad__unit {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 280px;
    overflow: hidden;
}

#ptApp .pq-ad iframe {
    max-width: 100% !important;
}

/* Google had nothing to show: give the space back. */
#ptApp .pq-ad:has(ins[data-ad-status="unfilled"]) {
    display: none;
}

#ptApp .pt-related-section .pq-ad-li {
    grid-column: 1 / -1;
    min-width: 0;
    list-style: none;
    margin: 10px 0;
    padding: 0;
}

#ptApp .pt-related-section .pq-ad-li .pq-ad {
    margin: 0;
}

@media (max-width: 480px) {
    #ptApp .pq-ad__unit {
        min-height: 250px;
    }
}

@media print {
    #ptApp .pq-ad,
    #ptApp .pq-ad-li {
        display: none !important;
    }
}

/* The paper line opens the whole paper (answer key page), when it has one. */
#ptApp .pq-sheet .pt-exam-reference-current .pt-exam-reference-link:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Answer opened on a locked question: the box below carries the buttons. */
#ptApp .pq-sheet .pt-exam-btns[hidden] {
    display: none;
}

/* Locked explanation: where to find it, with the prices (approved demo, 2026-10-11). */
#ptApp .pq-lockbox {
    margin-top: 10px;
    padding: 14px;
    border: 1px solid #ecd9a8;
    border-radius: 10px;
    background: #fffaf0;
    font-family: var(--pq-sans);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 12px;
    align-items: start;
}

#ptApp .pq-lock-ic {
    grid-row: span 2;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff1d6;
    color: #8a5a00;
    display: grid;
    place-items: center;
}

#ptApp .pq-lock-ic svg {
    width: 18px;
    height: 18px;
}

#ptApp .pq-lockbox b {
    font-size: 15px;
    color: var(--pq-ink);
}

#ptApp .pq-lockbox p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: #5c5446;
}

#ptApp .pq-lock-btns {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

#ptApp .pq-lockbox .pt-exam-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 7px 14px;
    border: 1px solid var(--pq-line);
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
}

#ptApp .pq-lockbox .pt-exam-btn:hover {
    background: #f7f3ea;
}

#ptApp .pq-lockbox .pt-exam-btn-pdf {
    color: #b91c1c;
}

#ptApp .pq-lockbox .pt-exam-btn-mock {
    color: #047857;
    border-color: #a7d7c5;
}

#ptApp .pq-lockbox .pq-price {
    font-weight: 700;
    color: var(--pq-ink);
}

#ptApp .pq-lock-more {
    grid-column: 1 / -1;
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--pq-muted);
}

#ptApp .pq-lock-more a {
    color: #1d4ed8;
}

#ptApp .pq-locked-note {
    padding: 1px 8px;
    border-radius: 999px;
    background: #fff1d6;
    color: #8a5a00;
    font-family: var(--pq-sans);
    font-size: 11.5px;
    font-weight: 600;
}

@media (max-width: 480px) {
    #ptApp .pq-lock-btns {
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* ── Question paper page: the whole paper as an answer key ── */
#ptApp .pq-paper-head h1 {
    font-family: var(--pq-serif);
    font-size: 24px;
    line-height: 1.3;
    margin: 0 0 4px;
    text-wrap: balance;
}

#ptApp .pq-paper-sub {
    margin: 0 0 14px;
    font-family: var(--pq-sans);
    font-size: 14px;
    color: var(--pq-muted);
}

#ptApp .pq-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: 10px 0 14px;
    padding: 10px 0;
    border-top: 1px solid var(--pq-line);
    border-bottom: 1px solid var(--pq-line);
    font-family: var(--pq-sans);
    font-size: 13px;
    color: #3b352b;
    list-style: none;
}

#ptApp .pq-facts li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-variant-numeric: tabular-nums;
}

#ptApp .pq-facts svg {
    width: 15px;
    height: 15px;
    color: var(--pq-muted);
}

#ptApp .pq-paper-buy {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

#ptApp .pq-paper-buy .pt-exam-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    padding: 8px 16px;
    border: 1px solid var(--pq-line);
    border-radius: 8px;
    background: #fff;
    font-family: var(--pq-sans);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

#ptApp .pq-paper-buy .pt-exam-btn-pdf {
    color: #b91c1c;
}

#ptApp .pq-paper-buy .pt-exam-btn-mock {
    color: #047857;
    border-color: #a7d7c5;
}

#ptApp .pq-paper-buy .pq-price {
    font-weight: 700;
    color: var(--pq-ink);
}

#ptApp .pq-keyq {
    padding: 14px 0;
    border-top: 1px solid #ecebe6;
}

/* Answer key: the options as printed, the right one marked; nothing to click. */
#ptApp span.pq-opt.pq-key {
    display: inline-grid;
    grid-template-columns: 2.2em auto;
    align-items: start;
    margin: 0 -0.35em;
    padding: 0.22em 0.35em;
    border-radius: 6px;
}

#ptApp .pq-codegrid tr.pq-key {
    cursor: default;
}

#ptApp .pq-codegrid tr.pq-key:not(.pq-right):hover {
    background: transparent;
}

#ptApp .pq-opt.pq-key.pq-right {
    background: #d1fae5;
}

#ptApp .pq-keyq .pq-opt.pq-right .pq-ot::after {
    content: "\2713";
    margin-left: 6px;
    font-family: var(--pq-sans);
    font-weight: 700;
    color: #047857;
}

#ptApp .pq-keyq tr.pq-opt.pq-right td:last-child::after {
    content: "\2713";
    margin-left: 6px;
    font-family: var(--pq-sans);
    font-weight: 700;
    color: #047857;
}

#ptApp .pq-keyq .pq-after {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin-top: 6px;
    font-family: var(--pq-sans);
    font-size: 13px;
}

#ptApp .pq-keyq .pq-after a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: none;
}

#ptApp .pq-keyq .pq-after a svg {
    width: 14px;
    height: 14px;
    color: #8a5a00;
}

#ptApp .pq-keyq .pq-after a:hover {
    text-decoration: underline;
}

#ptApp .pq-pill-free {
    padding: 1px 8px;
    border-radius: 999px;
    background: #d1fae5;
    color: #047857;
    font-size: 11.5px;
    font-weight: 600;
}

/* Free explanation opens under its question on the paper page (owner, 2026-10-11). */
#ptApp .pq-keyq .pq-xp {
    margin-top: 6px;
}

#ptApp .pq-keyq .pq-xp > summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    list-style: none;
    font-family: var(--pq-sans);
    font-size: 13px;
    font-weight: 600;
    color: #1d4ed8;
}

#ptApp .pq-keyq .pq-xp > summary::-webkit-details-marker {
    display: none;
}

#ptApp .pq-keyq .pq-xp > summary:focus-visible {
    outline: 2px solid #1d4ed8;
    outline-offset: 2px;
    border-radius: 4px;
}

#ptApp .pq-xp-chev {
    width: 15px;
    height: 15px;
    transition: transform 0.2s ease;
}

#ptApp .pq-xp[open] .pq-xp-chev {
    transform: rotate(180deg);
}

#ptApp .pq-keyq .pq-xp .pq-exp {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--pq-line);
    font-family: var(--pq-serif);
    font-size: 16px;
    line-height: 1.65;
}

/* Language: a bar just before the questions, and a small floating copy once
   that bar is scrolled past, out of the way while the page moves (owner picked C). */
#ptApp .pq-qbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 0;
    border-top: 1px solid var(--pq-line);
    font-family: var(--pq-sans);
    font-size: 14px;
    font-weight: 600;
    color: #3b352b;
}

#ptApp .pq-qbar-n {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#ptApp .pq-qbar-n svg {
    width: 15px;
    height: 15px;
    color: var(--pq-muted);
}

#ptApp .pq-qbar + .pq-keyq {
    border-top: 0;
}

#ptApp .pq-lang-fab {
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 50;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#ptApp .pq-lang-fab[hidden] {
    display: none;
}

#ptApp .pq-lang-fab.is-away {
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    #ptApp .pq-lang-fab {
        transition: none;
    }
}

@media (max-width: 480px) {
    #ptApp .pq-paper-head h1 {
        font-size: 20px;
    }

    #ptApp .pq-paper-buy {
        display: grid;
        grid-template-columns: 1fr;
    }
}
