/* ==========================================================================
   1. Interactive Frontend Assessment Styles
   ========================================================================== */
.diag-app-wrapper {
    max-width: 960px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    color: #0f172a;
}

.diag-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 36px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.06);
}

.diag-badge {
    display: inline-block;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.diag-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 10px;
    color: #0f172a;
}

.diag-subtitle {
    font-size: 15px;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 24px;
}

.diag-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.diag-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #334155;
}

.diag-field input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

.diag-form-actions {
    grid-column: 1 / -1;
    margin-top: 10px;
}

.diag-btn-primary {
    background: #0f172a;
    color: #ffffff;
    border: none;
    padding: 13px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.diag-btn-primary:hover:not(:disabled) {
    background: #1e293b;
}

.diag-btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.diag-btn-secondary {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
}

.diag-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.diag-dim-pill {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 12px;
}

.diag-progress-track {
    height: 8px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 24px;
}

.diag-progress-fill {
    height: 100%;
    background: #2563eb;
    transition: width 0.25s ease;
}

.diag-question-title {
    font-size: 20px;
    line-height: 1.45;
    font-weight: 700;
    margin: 0 0 20px;
    color: #0f172a;
}

.diag-zone-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 10px;
}

.diag-options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.diag-option-card {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 15px;
    line-height: 1.45;
    cursor: pointer;
    transition: all 0.15s ease;
    background: #ffffff;
}

.diag-option-card:hover {
    border-color: #94a3b8;
}

.diag-option-card.selected {
    border-color: #2563eb;
    background: #eff6ff;
    font-weight: 600;
}

.diag-sentiment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.diag-sentiment-pill {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    background: #f8fafc;
}

.diag-sentiment-pill.selected {
    border-color: #d97706;
    background: #fef3c7;
    color: #92400e;
}

.diag-quiz-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
}

/* ==========================================================================
   2. 20-Page A4 Dossier Layout & Typography
   ========================================================================== */
.diag-report-toolbar {
    position: sticky;
    top: 32px;
    z-index: 999;
    background: #0f172a;
    color: #ffffff;
    padding: 14px 24px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.diag-toolbar-actions {
    display: flex;
    gap: 12px;
}

.diag-booklet-wrapper {
    display: flex;
    flex-direction: column;
    gap: 28px;
    align-items: center;
    background: #cbd5e1;
    padding: 28px 12px;
    border-radius: 12px;
}

.diag-pdf-page {
    width: 210mm;
    height: 297mm;
    background: #ffffff;
    box-sizing: border-box;
    padding: 14mm 16mm;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.15);
    page-break-after: always;
    break-after: page;
    overflow: hidden;
}

.diag-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #0f172a;
    padding-bottom: 8px;
    margin-bottom: 14px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #475569;
}

.diag-page-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.diag-page-footer {
    border-top: 1px solid #cbd5e1;
    padding-top: 8px;
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #64748b;
}

/* Cover & Headings */
.diag-cover-hero {
    background: #0f172a;
    color: #ffffff;
    padding: 28px;
    border-radius: 10px;
    margin-bottom: 18px;
}

.diag-cover-kicker {
    font-size: 10px;
    letter-spacing: 0.12em;
    color: #93c5fd;
    font-weight: 700;
    margin-bottom: 8px;
}

.diag-cover-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 10px;
    color: #ffffff;
}

.diag-cover-lead {
    font-size: 13px;
    line-height: 1.5;
    color: #cbd5e1;
    margin: 0;
}

.diag-cover-archetype-box {
    border: 2px solid #1d4ed8;
    background: #eff6ff;
    padding: 18px 22px;
    border-radius: 10px;
    margin-bottom: 18px;
}

.diag-arch-label {
    font-size: 10px;
    font-weight: 800;
    color: #1d4ed8;
    letter-spacing: 0.08em;
}

.diag-arch-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 4px 0 6px;
}

.diag-sec-heading {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px;
}

.diag-sub-heading {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin: 12px 0 8px;
}

.diag-sec-desc {
    font-size: 12px;
    line-height: 1.5;
    color: #334155;
    margin: 0 0 14px;
}

/* Tables */
.diag-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin-bottom: 12px;
}

.diag-table th,
.diag-table td {
    border: 1px solid #cbd5e1;
    padding: 7px 9px;
    text-align: left;
    vertical-align: top;
    line-height: 1.4;
}

.diag-table th {
    background: #f1f5f9;
    font-weight: 700;
    color: #0f172a;
}

.diag-appendix-table td {
    padding: 5px 7px;
    font-size: 10.2px;
}

.diag-app-q {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 2px;
}

.diag-app-a {
    color: #1d4ed8;
    font-size: 9.8px;
}

/* Cards, Callouts & Grids */
.diag-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.diag-stat-card {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px 14px;
}

.diag-stat-card h4 {
    margin: 4px 0 6px;
    font-size: 13px;
    color: #0f172a;
}

.diag-stat-card p {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.45;
    color: #334155;
}

.diag-stat-label {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    color: #2563eb;
}

.diag-callout-box {
    background: #f8fafc;
    border-left: 4px solid #0f172a;
    padding: 12px 16px;
    border-radius: 4px;
}

.diag-callout-box h4,
.diag-callout-box h3 {
    margin: 0 0 6px;
    font-size: 13px;
    color: #0f172a;
}

.diag-callout-box p {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.5;
    color: #334155;
}

.diag-dim-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f1f5f9;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.diag-dim-banner h2 {
    margin: 4px 0 0;
    font-size: 17px;
}

.diag-dim-score-circle {
    background: #0f172a;
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    padding: 10px 16px;
    border-radius: 8px;
}

.diag-compact-list {
    margin: 0;
    padding-left: 16px;
    font-size: 11.5px;
    line-height: 1.55;
}

.diag-chart-frame {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 12px 0;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
}

.diag-signoff-box {
    border: 1px dashed #64748b;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 11px;
    margin-top: auto;
}

.diag-sign-lines {
    display: flex;
    justify-content: space-between;
    margin-top: 18px;
    font-weight: 600;
}

/* ==========================================================================
   3. Exact Print & 20-Page PDF Export Media Rules
   ========================================================================== */
@media print {
    @page {
        size: A4 portrait;
        margin: 0;
    }

    body * {
        visibility: hidden;
    }

    #diag-booklet-container,
    #diag-booklet-container * {
        visibility: visible;
    }

    .no-print,
    .diag-report-toolbar,
    #wpadminbar,
    header:not(.diag-page-header),
    footer:not(.diag-page-footer) {
        display: none !important;
    }

    #diag-booklet-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 210mm;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        gap: 0 !important;
    }

    .diag-pdf-page {
        width: 210mm !important;
        height: 297mm !important;
        margin: 0 !important;
        box-shadow: none !important;
        page-break-after: always !important;
        break-after: page !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}