/* ══════════════════════════════════════════════════════════════════
   Report Styles — Psiphas Personal Reports (Detailed / Matching)
   Based on "דף נתונים" prototype design
   ══════════════════════════════════════════════════════════════════ */

:root {
    --rpt-navy: #1a2f4a;
    --rpt-navy2: #243d5e;
    --rpt-blue: #2e5c8e;
    --rpt-blue2: #3d7ab5;
    --rpt-gold: #b8972a;
    --rpt-gold2: #d4b04a;
    --rpt-line: #dce4ef;
    --rpt-line2: #edf2f8;
    --rpt-bg: #f0f3f8;
    --rpt-card: #fff;
    --rpt-text: #1c2b3a;
    --rpt-muted: #637082;
    --rpt-stripe: #f7f9fc;
    --rpt-green: #1a6b3a;
    --rpt-gbg: #e6f4ec;
    --rpt-font: 'Assistant', 'Arial Hebrew', Arial, sans-serif;
}

/* ── Page Container ────────────────────────────────────────────── */
.rpt-page {
    max-width: 1100px;
    margin: 28px auto;
    background: var(--rpt-card);
    border-radius: 12px;
    box-shadow: 0 4px 32px rgba(0,0,0,.11), 0 1px 4px rgba(0,0,0,.06);
    overflow: hidden;
    font-family: var(--rpt-font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--rpt-text);
}

/* ── Topbar ────────────────────────────────────────────────────── */
.rpt-topbar {
    background: linear-gradient(135deg, var(--rpt-navy) 0%, var(--rpt-navy2) 100%);
    color: #fff;
    padding: 13px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
[dir="rtl"] .rpt-topbar,
.rpt-topbar {
    padding-inline-start: 10px;
}
.rpt-topbar .tb-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.rpt-topbar .tb-brand img {
    height: 42px;
    max-width: 180px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
}
.rpt-topbar .tb-brand img.rh-org-logo-pill {
    background: #fff;
    border-radius: 6px;
    padding: 4px 10px;
    height: 46px;
}
.rpt-topbar .brand-name {
    font-size: 16.5px;
    font-weight: 700;
    letter-spacing: .02em;
}
.rpt-topbar .brand-sub {
    font-size: 12.1px;
    opacity: .6;
    font-weight: 300;
}
.rpt-topbar .tb-right {
    font-size: 12.7px;
    opacity: .65;
}

/* ── Report Header ─────────────────────────────────────────────── */
.rpt-header {
    display: grid;
    grid-template-columns: 210px 1fr 160px;
    gap: 0;
    padding: 22px 32px 18px;
    border-bottom: 1px solid var(--rpt-line);
    align-items: center;
}
.rpt-header .rh-center {
    text-align: center;
    padding: 0 20px;
}
.rpt-header .report-type {
    font-size: 12.1px;
    font-weight: 600;
    color: var(--rpt-gold);
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.rpt-header .report-org {
    font-size: 17px;
    font-weight: 600;
    color: var(--rpt-navy);
    opacity: .78;
    letter-spacing: .01em;
    line-height: 1.2;
    margin-bottom: 2px;
}
.rpt-header .rh-center h1 {
    font-size: 28.6px;
    font-weight: 800;
    color: var(--rpt-navy);
    letter-spacing: -.02em;
    line-height: 1.1;
    margin: 0;
}
.rpt-header .cand-card {
    background: var(--rpt-line2);
    border: 1px solid var(--rpt-line);
    border-radius: 6px;
    padding: 10px 14px;
}
.rpt-header .cand-card-details { flex: 1; }
.rpt-header .rh-photo {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    align-items: center;
}
.rpt-header .cand-photo,
.rpt-header .id-card-photo {
    width: 160px;
    height: 120px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid var(--rpt-line);
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.rpt-header .cand-card .cttl {
    font-size: 14px;
    font-weight: 700;
    color: var(--rpt-navy);
    letter-spacing: .1em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--rpt-line);
    padding-bottom: 5px;
    margin-bottom: 7px;
}
.rpt-header .cand-card .cf {
    display: flex;
    gap: 6px;
    font-size: 13.8px;
    margin-bottom: 2px;
}
.rpt-header .cand-card .cf .l { color: var(--rpt-muted); }
.rpt-header .cand-card .cf .v { font-weight: 700; color: var(--rpt-navy); }

/* ── Personal Strip ────────────────────────────────────────────── */
.rpt-ps {
    background: var(--rpt-stripe);
    border-bottom: 1px solid var(--rpt-line);
    padding: 9px 32px;
    display: flex;
    column-gap: 28px;
    row-gap: 4px;
    flex-wrap: wrap;
    font-size: 13.2px;
}
.rpt-ps .ps-i {
    display: flex;
    gap: 5px;
}
.rpt-ps .ps-i .l { color: var(--rpt-muted); }
.rpt-ps .ps-i .v { font-weight: 600; }

/* ── Integrity Summary Evaluation Box ─────────────────────────── */
.rpt-integrity-summary {
    margin: 16px 32px;
    border: 2px solid var(--rpt-navy);
    border-radius: 6px;
    text-align: center;
    overflow: hidden;
}
.rpt-integrity-summary-title {
    background: var(--rpt-navy);
    color: #fff;
    font-weight: 700;
    font-size: 14.3px;
    padding: 6px 16px;
    letter-spacing: .03em;
}
.rpt-integrity-summary-body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 24px;
    font-size: 14.3px;
}
.rpt-integrity-summary-text {
    font-weight: 700;
    font-size: 16.5px;
}

/* ── Section ───────────────────────────────────────────────────── */
.rpt-sec {
    padding: 24px 32px 26px;
    border-bottom: 1px solid var(--rpt-line);
}
.rpt-sec:last-of-type { border-bottom: none; }
.rpt-sec-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 9px;
    border-bottom: 2px solid var(--rpt-line);
}
.rpt-sec-head h2 {
    font-size: 14.9px;
    font-weight: 700;
    color: var(--rpt-navy);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0;
}
.rpt-sec-head .sh-meta {
    font-size: 13.2px;
    color: var(--rpt-muted);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

/* ── Exam Meta Bar ─────────────────────────────────────────────── */
.rpt-embar {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding: 9px 14px;
    background: var(--rpt-line2);
    border: 1px solid var(--rpt-line);
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 13.8px;
    align-items: center;
}
.rpt-embar .emi {
    display: flex;
    gap: 5px;
    align-items: center;
}
.rpt-embar .emi .l { color: var(--rpt-muted); }
.rpt-embar .emi .v { font-weight: 600; color: var(--rpt-navy); }
.rpt-embar .score-badge {
    background: var(--rpt-gbg);
    color: var(--rpt-green);
    border: 1px solid #a8d8bc;
    border-radius: 5px;
    padding: 3px 12px;
    font-weight: 800;
    font-size: 16.5px;
}

/* ── Exam Cards ────────────────────────────────────────────────── */
.rpt-exam-cards {
    display: flex;
    flex-direction: column;
    gap: 11px;
}
.rpt-exam-card {
    border: 1px solid var(--rpt-line);
    border-radius: 8px;
    overflow: hidden;
}
.rpt-exam-card:hover {
    box-shadow: 0 2px 12px rgba(26,47,74,.08);
}
.rpt-exam-card .ec-head {
    background: linear-gradient(to left, var(--rpt-line2), #fff);
    border-bottom: 1px solid var(--rpt-line);
    padding: 9px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.rpt-exam-card .ec-name {
    font-size: 14.9px;
    font-weight: 700;
    color: var(--rpt-navy);
}
.rpt-exam-card .ec-traits {
    font-size: 12.7px;
    color: var(--rpt-muted);
}
.rpt-exam-card .ec-body {
    display: flex;
    align-items: stretch;
}
.rpt-exam-card .ec-stats {
    padding: 11px 15px;
    min-width: 220px;
    max-width: 240px;
    border-inline-start: 1px solid var(--rpt-line);
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.rpt-exam-card .stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.8px;
    padding: 3px 0;
    border-bottom: 1px dashed rgba(0,0,0,.05);
}
.rpt-exam-card .stat-row:last-of-type { border-bottom: none; }
.rpt-exam-card .sl { color: var(--rpt-muted); font-size: 13.2px; }
.rpt-exam-card .sv { font-weight: 700; color: var(--rpt-navy); }

/* Tishonit chip */
.tish-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    padding: 2px 9px;
    font-weight: 800;
    font-size: 14.9px;
    min-width: 30px;
}
.tish-chip.hi { background: var(--rpt-green); color: #fff; }
.tish-chip.mid { background: var(--rpt-blue); color: #fff; }
.tish-chip.lo { background: #888; color: #fff; }

/* Tishonit bar */
.rpt-bar-area { margin-top: 9px; }
.rpt-bar-track {
    position: relative;
    height: 8px;
    background: var(--rpt-line);
    border-radius: 4px;
    width: 100%;
    overflow: hidden;
}
.rpt-bar-fill {
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(to left, var(--rpt-blue2), var(--rpt-navy2));
}
.rpt-bar-fill.hi { background: linear-gradient(to left, #2aaa60, #1a6b3a); }
.rpt-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--rpt-muted);
    margin-top: 2px;
}

/* Answers log */
.rpt-exam-card .ec-answers {
    flex: 1;
    padding: 11px 16px;
    display: flex;
    flex-direction: column;
    background: #fff;
    font-size: 12.1px;
    line-height: 1.3;
}
.rpt-exam-card .ec-answers .ans-title {
    font-size: 11.6px;
    color: var(--rpt-muted);
    margin-bottom: 5px;
    font-weight: 500;
}

/* ── Decision Table ────────────────────────────────────────────── */
.rpt-dec-sum {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 9px 14px;
    background: var(--rpt-line2);
    border: 1px solid var(--rpt-line);
    border-radius: 6px;
    font-size: 14.3px;
}
.rpt-dec-sum .item {
    display: flex;
    gap: 6px;
}
.rpt-dec-sum .l { color: var(--rpt-muted); }
.rpt-dec-sum .v { font-weight: 700; color: var(--rpt-navy); }

.rpt-dtable {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.8px;
}
.rpt-dtable thead tr { background: var(--rpt-navy); }
.rpt-dtable thead th {
    padding: 9px 8px;
    color: #fff;
    font-weight: 600;
    font-size: 12.7px;
    text-align: center;
    border: 1px solid rgba(255,255,255,.12);
}
.rpt-dtable thead th:first-child { text-align: start; }
.rpt-dtable tbody td {
    padding: 7px 8px;
    text-align: center;
    border: 1px solid var(--rpt-line);
    vertical-align: middle;
}
.rpt-dtable tbody td:first-child {
    text-align: start;
    font-weight: 500;
}
.rpt-dtable tbody tr:nth-child(even) td { background: var(--rpt-stripe); }
.rpt-dtable tbody tr.decoy td { color: var(--rpt-muted); font-style: italic; }
.rpt-dtable .mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--rpt-navy);
    color: #fff;
    border-radius: 50%;
    font-size: 12.1px;
    font-weight: 700;
}
.rpt-dtable .dash { color: #aaa; }

/* ── Q&A Table (Open Questions / Sentence Complete / Interview) ── */
.rpt-qatable {
    width: 100%;
    border-collapse: collapse;
    font-size: 14.3px;
}
.rpt-qatable tr { border-bottom: 1px solid var(--rpt-line); }
.rpt-qatable tr:last-child { border-bottom: none; }
.rpt-qatable tr:nth-child(even) td,
.rpt-qatable tr:nth-child(even) th { background: var(--rpt-stripe); }
.rpt-qatable th {
    padding: 10px 14px;
    font-weight: 600;
    color: var(--rpt-navy);
    text-align: start;
    width: 36%;
    vertical-align: top;
    line-height: 1.5;
    background: var(--rpt-line2);
    border-inline-start: 3px solid var(--rpt-blue2);
}
.rpt-qatable td {
    padding: 10px 14px;
    vertical-align: top;
    line-height: 1.6;
}
.rpt-qatable .ans-no {
    color: var(--rpt-muted);
    font-style: italic;
}

/* ── Scale / Tendency Tables ───────────────────────────────────── */
.rpt-sctable {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.8px;
}
.rpt-sctable thead th {
    background: var(--rpt-navy);
    color: #fff;
    padding: 8px 12px;
    text-align: start;
    font-weight: 600;
    font-size: 12.7px;
}
.rpt-sctable tbody td {
    padding: 7px 12px;
    border-bottom: 1px solid var(--rpt-line);
    vertical-align: top;
    line-height: 1.5;
}
.rpt-sctable tbody td:first-child {
    text-align: center;
    font-weight: 700;
    color: var(--rpt-muted);
    font-size: 12.1px;
    width: 5%;
}
.rpt-sctable tbody td:nth-child(2) {
    font-weight: 600;
    color: var(--rpt-navy);
    font-size: 13.2px;
    width: 34%;
}
.rpt-sctable tbody td:last-child {
    text-align: center;
    color: var(--rpt-muted);
    font-size: 12.7px;
    width: 10%;
}
.rpt-sctable tbody tr:nth-child(even) td { background: var(--rpt-stripe); }

/* ── MMPI Grid ─────────────────────────────────────────────────── */
.rpt-mmpi-intro {
    font-size: 13.8px;
    color: var(--rpt-muted);
    margin-bottom: 16px;
    padding: 8px 12px;
    border-inline-start: 3px solid var(--rpt-gold2);
    background: #fdf9f0;
    border-radius: 0 4px 4px 0;
}
.rpt-mmpi-domain { margin-bottom: 18px; }
.rpt-mmpi-domain-title {
    font-size: 13.2px;
    font-weight: 700;
    color: var(--rpt-navy);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 7px;
    padding-bottom: 5px;
    border-bottom: 1.5px solid var(--rpt-line);
    display: flex;
    align-items: center;
    gap: 8px;
}
.rpt-mmpi-domain-title::before {
    content: '';
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--rpt-blue2);
    flex-shrink: 0;
}
.rpt-mmpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 5px;
}
.rpt-mmpi-item {
    background: var(--rpt-stripe);
    border: 1px solid var(--rpt-line);
    border-radius: 5px;
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.2px;
}
.rpt-mmpi-item .code {
    font-weight: 700;
    color: var(--rpt-navy);
    font-size: 13.8px;
    direction: ltr;
}
.rpt-mmpi-item .scores {
    display: flex;
    gap: 7px;
    align-items: center;
}
.rpt-mmpi-item .t-score {
    background: var(--rpt-navy);
    color: #fff;
    border-radius: 3px;
    padding: 1px 6px;
    font-size: 12.1px;
    font-weight: 700;
    direction: ltr;
}
.rpt-mmpi-item .pct {
    color: var(--rpt-muted);
    font-size: 12.1px;
    direction: ltr;
}
.rpt-mmpi-item.notable {
    border-color: #f0c840;
    background: #fefaef;
}
.rpt-mmpi-item.notable .t-score { background: #a07010; }

/* ── MMPI HTM Template (3-col grouped tables) ──────────────────── */
/* Used by report.htm templates (e.g. 1602.htm) — sanitizer strips
   the template's own <style> block, so these rules live here. */
.mmpi-3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
    padding-inline: 20px;
}
.mmpi-group {
    display: flex;
    flex-direction: column;
}
.mmpi-group-title {
    font-weight: 700;
    font-size: 0.95em;
    text-align: center;
    margin-bottom: 6px;
    color: var(--rpt-navy);
}
.mmpi-group table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.72em;
}
.mmpi-group table th {
    background: var(--rpt-line2);
    color: var(--rpt-navy);
    font-weight: 700;
    padding: 2px 5px;
    text-align: center;
    border: 1px solid var(--rpt-line);
}
.mmpi-group table td {
    padding: 1px 5px;
    border: 1px solid var(--rpt-line);
    text-align: center;
}
.mmpi-group table td:first-child {
    text-align: center;
    font-weight: 700;
    color: var(--rpt-navy);
    direction: ltr;
}
.mmpi-spacer td {
    height: 6px;
    border: none !important;
    background: transparent !important;
}

/* ── VPQ Scale Scores (Personality) ────────────────────────────── */
.vpq-group {
    border: 1px solid var(--rpt-line);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}
.vpq-group-head {
    background: linear-gradient(135deg, var(--rpt-navy) 0%, var(--rpt-navy2) 100%);
    color: #fff;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.vpq-group-head .vpq-gtitle {
    font-size: 14.3px;
    font-weight: 700;
    letter-spacing: .03em;
}
.vpq-col-headers {
    display: grid;
    grid-template-columns: 80px 1fr 240px 1fr;
    background: var(--rpt-line2);
    border-bottom: 1px solid var(--rpt-line);
    padding: 6px 16px;
    font-size: 12.1px;
    font-weight: 700;
    color: var(--rpt-muted);
}
.vpq-col-headers span:nth-child(2) { text-align: start; }
.vpq-col-headers span:nth-child(3) { text-align: center; }
.vpq-col-headers span:nth-child(4) { text-align: end; }
.vpq-scale-row {
    display: grid;
    grid-template-columns: 80px 1fr 240px 1fr;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--rpt-line);
    transition: background .15s;
}
.vpq-scale-row:last-child { border-bottom: none; }
.vpq-scale-row:hover { background: var(--rpt-stripe); }
.vpq-scale-id {
    display: flex;
    align-items: center;
    gap: 8px;
}
.vpq-scale-id .vpq-abbr {
    font-size: 14.3px;
    font-weight: 800;
    color: var(--rpt-navy);
    min-width: 24px;
}
.vpq-scale-id .vpq-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 24px;
    border-radius: 5px;
    font-size: 13.2px;
    font-weight: 800;
    padding: 0 6px;
}
.vpq-score.vpq-hi,
.vpq-score.vpq-lo,
.vpq-score.vpq-mid { background: #f0f0f0; color: #444; border: 1px solid #ccc; }
.vpq-desc-high {
    font-size: 13.2px;
    color: var(--rpt-text);
    text-align: start;
    padding-inline-end: 12px;
    line-height: 1.5;
}
.vpq-desc-low {
    font-size: 13.2px;
    color: var(--rpt-text);
    text-align: end;
    padding-inline-start: 12px;
    line-height: 1.5;
}
/* Bar container — single div with center line */
.vpq-bar-wrap {
    position: relative;
    height: 22px;
    background: var(--rpt-line2);
    border-radius: 4px;
    overflow: hidden;
}
.vpq-bar-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    transform: translateX(-1px);
    background: var(--rpt-navy);
    opacity: .5;
    z-index: 2;
}
.vpq-ruler-row {
    display: grid;
    grid-template-columns: 80px 1fr 240px 1fr;
    padding: 2px 16px 6px;
}
.vpq-ruler-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10.5px;
    color: var(--rpt-muted);
}
.vpq-ruler-labels span:nth-child(2) {
    font-weight: 700;
    color: var(--rpt-navy);
    position: relative;
}
.vpq-ruler-labels span:nth-child(2)::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -6px;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 5px solid var(--rpt-navy);
    opacity: .55;
}
/* Legacy VPQ butterfly compat */
.rpt-vpq-table { width: 100%; border-collapse: collapse; font-size: 13.8px; }
.rpt-vpq-table td { padding: 4px 6px; border-bottom: 1px solid var(--rpt-line); vertical-align: middle; }
.rpt-vpq-bar { height: 10px; background-color: #7a7a7a; }

/* ── Tendency / Holland / Ramak / Masa / PIP / JobsNetiot Tables ── */
.rpt-tendency-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.8px;
    margin-bottom: 12px;
}
.rpt-tendency-table thead th {
    background: var(--rpt-navy);
    color: #fff;
    padding: 8px 8px;
    font-weight: 600;
    font-size: 12.7px;
    text-align: center;
}
.rpt-tendency-table thead th:first-child { text-align: start; }
.rpt-tendency-table tbody td {
    padding: 6px 8px;
    text-align: center;
    border-bottom: 1px solid var(--rpt-line);
}
.rpt-tendency-table tbody td:first-child { text-align: start; font-weight: 500; }
.rpt-tendency-table tbody tr:nth-child(even) td { background: var(--rpt-stripe); }
.rpt-tendency-table tbody tr.total-row td {
    font-weight: 700;
    background: var(--rpt-line2);
    border-top: 2px solid var(--rpt-line);
}

/* ── NeoPIR / PAI Domain Layout ────────────────────────────────── */
.rpt-domain-section { margin-bottom: 16px; }
.rpt-domain-title {
    font-size: 13.2px;
    font-weight: 700;
    color: var(--rpt-navy);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 7px;
    padding-bottom: 5px;
    border-bottom: 1.5px solid var(--rpt-line);
    display: flex;
    align-items: center;
    gap: 8px;
}
.rpt-domain-title::before {
    content: '';
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--rpt-blue2);
    flex-shrink: 0;
}
.rpt-scale-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 5px;
}
.rpt-scale-item {
    background: var(--rpt-stripe);
    border: 1px solid var(--rpt-line);
    border-radius: 5px;
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.2px;
}
.rpt-scale-item .scale-name {
    font-weight: 700;
    color: var(--rpt-navy);
    font-size: 13.8px;
}
.rpt-scale-item .scale-scores {
    display: flex;
    gap: 7px;
    align-items: center;
}
.rpt-scale-item .scale-tish {
    background: var(--rpt-navy);
    color: #fff;
    border-radius: 3px;
    padding: 1px 6px;
    font-size: 12.1px;
    font-weight: 700;
}
.rpt-scale-item .scale-score {
    color: var(--rpt-muted);
    font-size: 12.1px;
}

/* ── Ratification Table ────────────────────────────────────────── */
.rpt-ratification-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.8px;
}
.rpt-ratification-table thead th {
    background: var(--rpt-navy);
    color: #fff;
    padding: 8px 8px;
    font-weight: 600;
    font-size: 12.7px;
    text-align: center;
}
.rpt-ratification-table tbody td {
    padding: 6px 8px;
    text-align: center;
    border-bottom: 1px solid var(--rpt-line);
}
.rpt-ratification-table tbody tr:nth-child(even) td { background: var(--rpt-stripe); }

/* ── Typing Exam Card ──────────────────────────────────────────── */
.rpt-typing-card {
    background: var(--rpt-line2);
    border: 1px solid var(--rpt-line);
    border-radius: 6px;
    padding: 10px 14px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 13.8px;
    margin-bottom: 12px;
}
.rpt-typing-card .typing-item {
    display: flex;
    gap: 5px;
}
.rpt-typing-card .typing-item .l { color: var(--rpt-muted); }
.rpt-typing-card .typing-item .v { font-weight: 700; color: var(--rpt-navy); }

/* ── Footer ────────────────────────────────────────────────────── */
.rpt-footer {
    background: var(--rpt-line2);
    border-top: 1px solid var(--rpt-line);
    padding: 12px 32px;
    display: flex;
    justify-content: space-between;
    font-size: 12.7px;
    color: var(--rpt-muted);
}

/* ── Exam Grades Table ─────────────────────────────────────────── */
.rpt-exams-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.8px;
    margin-bottom: 8px;
}
.rpt-exams-table thead th {
    background: linear-gradient(135deg, var(--rpt-navy) 0%, var(--rpt-navy2) 100%);
    color: #fff;
    padding: 9px 8px;
    font-weight: 600;
    font-size: 12.1px;
    text-align: center;
    white-space: nowrap;
    letter-spacing: .03em;
}
.rpt-exams-table thead th:first-child {
    text-align: start;
    border-radius: 0 6px 0 0;
}
.rpt-exams-table thead th:last-child {
    border-radius: 6px 0 0 0;
}
.rpt-exams-table tbody td {
    padding: 7px 8px;
    border-bottom: none;
    vertical-align: middle;
    font-size: 13.8px;
}
.rpt-exams-table tbody td:first-child {
    color: var(--rpt-navy);
}
/* Tishonit bar inside table */
.rpt-exams-table .tish-bar {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to left, var(--rpt-blue2), var(--rpt-navy2));
}
/* Mistakes bar inside table */
.rpt-exams-table .mistakes-bar {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to left, #c07818, #e8a830);
}
.rpt-exams-table .bar-track {
    position: relative;
    height: 8px;
    background: var(--rpt-line);
    border-radius: 4px;
    overflow: hidden;
}
/* Score highlight */
.rpt-exams-table .tish-val {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 14.3px;
    background: var(--rpt-navy);
    color: #fff;
    padding: 0 5px;
}
.rpt-exams-table .base-tish {
    color: var(--rpt-blue2);
    font-weight: 400;
    font-size: 12.1px;
    margin-inline-start: 2px;
}

/* Exam group separator row */
.rpt-exams-table tr.exam-sep td {
    height: 4px;
    padding: 0;
    border-bottom: none;
    background: var(--rpt-stripe);
    border-top: 1px solid var(--rpt-line);
}
.rpt-exams-table tr.exam-sep:last-child td {
    display: none;
}

/* ── Page Break ────────────────────────────────────────────────── */
.rpt-pg-break {
    border: none;
    border-top: 2px dashed var(--rpt-line);
    margin: 0;
}

/* ── Alert badges ──────────────────────────────────────────────── */
.rpt-badge-red {
    color: #c00;
    font-weight: 700;
    font-size: 12.1px;
}
.rpt-badge-warn {
    color: #b8600a;
    font-weight: 700;
}

/* ══════════════════════════════════════════════════════════════════
   INTEGRITY REPORT STYLES
   Based on "יושרה" prototype design (navy/teal/gold accent)
   ══════════════════════════════════════════════════════════════════ */

/* ── Integrity info cards ──────────────────────────────────────── */
.rpt-info-card {
    border: 1px solid var(--rpt-line);
    border-radius: 8px;
    background: var(--rpt-line2);
    padding: 12px 14px;
}
.rpt-info-card .card-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--rpt-navy);
    letter-spacing: .1em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--rpt-line);
    padding-bottom: 5px;
    margin-bottom: 7px;
}
.rpt-info-cards {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.rpt-info-cards > .rpt-info-card { flex: 1; }

/* ── Summary badge (overall pass/fail) ─────────────────────────── */
.rpt-summary-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
}
.rpt-summary-badge.pass { background: #1b7a40; box-shadow: 0 2px 8px rgba(27,122,64,.35); }
.rpt-summary-badge.fail { background: #b83228; box-shadow: 0 2px 8px rgba(184,50,40,.35); }
.rpt-summary-badge.warn { background: #c07818; box-shadow: 0 2px 8px rgba(192,120,24,.35); }

/* ── Remarks alert box ─────────────────────────────────────────── */
.rpt-remarks-alert {
    border: 2px solid #d94a3c;
    border-radius: 8px;
    background: #fef2f1;
    padding: 14px 18px;
    margin-bottom: 16px;
}
.rpt-remarks-alert .remarks-title {
    color: #b83228;
    font-size: 12.1px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(217,74,60,.2);
    padding-bottom: 6px;
    margin-bottom: 8px;
}
.rpt-remarks-alert .remarks-text {
    color: #5c1a14;
    font-size: 14.3px;
    font-weight: 500;
    line-height: 1.7;
}

/* ── Outstanding components table ──────────────────────────────── */
.rpt-outstanding-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.8px;
}
.rpt-outstanding-table thead th {
    background: var(--rpt-navy);
    color: #fff;
    font-size: 12.1px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 11px 12px;
    border: none;
}
.rpt-outstanding-table thead th:first-child { border-radius: 0 6px 0 0; }
.rpt-outstanding-table thead th:last-child { border-radius: 6px 0 0 0; }
.rpt-outstanding-table tbody th {
    font-size: 13.8px;
    font-weight: 700;
    color: var(--rpt-navy);
    padding: 10px 12px;
    border-bottom: 1px solid var(--rpt-line);
    text-align: start;
    vertical-align: top;
    background: transparent;
}
.rpt-outstanding-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--rpt-line);
    vertical-align: middle;
    font-size: 13.8px;
}
.rpt-outstanding-table tbody tr:nth-child(even) th,
.rpt-outstanding-table tbody tr:nth-child(even) td { background: var(--rpt-stripe); }

/* ── Evaluation icon badges ────────────────────────────────────── */
.rpt-eval-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}
.rpt-eval-badge.ok { background: #1b7a40; }
.rpt-eval-badge.warn { background: #1b7a40; }
.rpt-eval-badge.fail { background: #b83228; }

/* ── Risk bar (5-segment pill) ─────────────────────────────────── */
.rpt-risk-bar {
    display: flex;
    flex-direction: row;
    gap: 2px;
    width: 100%;
    height: 14px;
    overflow: hidden;
    background: #eef2f7;
    border-radius: 6px;
    padding: 2px;
}
.rpt-risk-bar .seg {
    flex: 1;
    height: 100%;
    background: #d8e4f0;
    border-radius: 0;
}
.rpt-risk-bar .seg:first-child { border-radius: 0 6px 6px 0; }
.rpt-risk-bar .seg:last-child { border-radius: 6px 0 0 6px; }
/* Legacy behavior: single bar marker at the risk level position */
.rpt-risk-bar.level-1 .seg-1 { background: #1b7a40; }
.rpt-risk-bar.level-2 .seg-2 { background: #1b7a40; }
.rpt-risk-bar.level-3 .seg-3 { background: #1b7a40; }
.rpt-risk-bar.level-4 .seg-4 { background: #1b7a40; }
.rpt-risk-bar.level-5 .seg-5 { background: #e90d0d; }

/* ── Section header with teal accent ───────────────────────────── */
.rpt-section-header {
    padding: 10px 8px 8px;
    margin: 0 0 8px;
    border-bottom: 1px solid black;
    background: transparent;
    font-size: 16.5px;
    font-weight: 700;
    color: var(--rpt-navy);
}

/* ── Personality components layout ─────────────────────────────── */
.rpt-personality-section {
    padding: 16px 0;
    border-bottom: 1px solid var(--rpt-line);
}
.rpt-personality-section:last-child { border-bottom: none; }
.rpt-personality-name {
    font-size: 13.8px;
    font-weight: 700;
    color: #1b8090;
    min-width: 140px;
}
.rpt-personality-text {
    font-size: 14.3px;
    color: var(--rpt-text);
    line-height: 1.7;
}

/* ── Content sections (important/additional phrases) ───────────── */
.rpt-content-section-header {
    text-align: center;
    padding: 5px 4px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: var(--rpt-navy);
    letter-spacing: .04em;
    border-radius: 4px;
    margin-bottom: 12px;
    width: 100%;
}
.rpt-content-section-header--split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: center;
}
.rpt-content-section-header--split .rpt-content-section-side {
    flex: 1;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .04em;
    min-width: 0;
    text-align: center;
}
.rpt-content-section-header--split .rpt-content-section-name {
    flex: 0 0 auto;
    text-align: center;
    font-size: 15px;
}
.rpt-content-columns {
    display: flex;
    gap: 16px;
}
.rpt-content-col {
    flex: 1;
    padding: 0 8px;
}
.rpt-content-col-title {
    font-size: 15.4px;
    font-weight: 700;
    color: var(--rpt-navy);
    letter-spacing: .06em;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--rpt-line);
}
.rpt-content-phrase {
    font-size: 14.3px;
    color: var(--rpt-text);
    line-height: 1.7;
    display: block;
    margin-bottom: 4px;
}

/* ── Corrections / Contradictions ──────────────────────────────── */
.rpt-correction-group { margin-bottom: 12px; }
.rpt-correction-group h3 {
    font-size: 13.2px;
    font-weight: 700;
    color: var(--rpt-navy);
    margin: 0 0 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--rpt-line);
}
.rpt-correction-item {
    border: 1px solid var(--rpt-line);
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 8px;
    background: var(--rpt-stripe);
}
.rpt-correction-item .q-label {
    font-weight: 700;
    font-size: 13.2px;
    color: var(--rpt-navy);
}
.rpt-correction-answers {
    display: flex;
    gap: 16px;
    margin-top: 6px;
}
.rpt-correction-answers > div { flex: 1; }
.rpt-correction-answers .ans-label {
    font-weight: 700;
    font-size: 12.1px;
    color: var(--rpt-muted);
    margin-bottom: 2px;
}

/* ── Slow Response items ───────────────────────────────────────── */
.rpt-slow-group { margin-bottom: 12px; }
.rpt-slow-group h3 {
    font-size: 13.2px;
    font-weight: 700;
    color: var(--rpt-navy);
    margin: 0 0 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--rpt-line);
}
.rpt-slow-item {
    padding: 8px 14px;
    border-bottom: 1px solid var(--rpt-line);
    font-size: 13.8px;
}
.rpt-slow-item:last-child { border-bottom: none; }
.rpt-slow-item .slow-time {
    color: var(--rpt-muted);
    font-size: 12.1px;
    font-weight: 600;
}

/* ── Contradiction pairs ───────────────────────────────────────── */
.rpt-contradiction-pair {
    display: flex;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px solid var(--rpt-line);
    font-size: 14.3px;
    line-height: 1.6;
}
.rpt-contradiction-pair > div { flex: 1; }
.rpt-contradiction-pair:last-child { border-bottom: none; }

/* ── Print ─────────────────────────────────────────────────────── */
@page { margin: 5mm; }
@media print {
    html, body { background: #fff; margin: 0; padding: 0; width: 100%; overflow-x: hidden; }
    /* Reset MudBlazor layout wrappers so report is centered on page */
    .mud-rtl-provider { width: 100% !important; overflow: hidden !important; }
    .mud-layout { display: block !important; width: 100% !important; }
    .mud-main-content { padding: 0 !important; width: 100% !important; }
    .report-content { width: 100%; }
    .rpt-page { box-shadow: none; margin: 0; border-radius: 0; padding: 0; overflow: hidden; width: 100%; max-width: 100%; }
    .rpt-topbar,
    .rpt-dtable thead,
    .rpt-sctable thead,
    .rpt-tendency-table thead,
    .rpt-ratification-table thead,
    .rpt-outstanding-table thead {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .tish-chip,
    .rpt-bar-fill,
    .vpq-bar-wrap,
    .rpt-vpq-bar,
    .rpt-mmpi-item .t-score,
    .mmpi-group table th,
    .rpt-scale-item .scale-tish,
    .rpt-dtable .mark,
    .rpt-eval-badge,
    .rpt-summary-badge,
    .rpt-risk-bar .seg,
    .rpt-remarks-alert,
    .rpt-integrity-summary-title,
    .rpt-content-section-header {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* IRT chart cell: stick to physical left in RTL pages, physical right in LTR pages */
[dir="rtl"] .irt-chart-cell { text-align: -webkit-left; }
[dir="ltr"] .irt-chart-cell { text-align: -webkit-right; }
