/* ==========================================================================
   أرحب V4 — Document Design System
   Editorial · Executive · Institutional
   العارض المشترك لكل منتجات التقارير: A4، طباعة أمينة، زوايا حادة كهوية v4،
   ولون وظيفي فقط. الكتل لا تعرف أي منتج.
   ========================================================================== */

@page {
    size: A4 portrait;
    margin: 0;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    border-radius: 0 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

:root {
    --ink: #0f172a;
    --ink-2: #334155;
    --ink-3: #475569;
    --muted: #64748b;
    --hair: #e2e8f0;
    --hair-2: #cbd5e1;
    --wash: #f8fafc;
    --paper: #ffffff;
    --desk: #e9edf2;
    --gold: #a8832f;
    --gold-soft: #f7f1e3;

    --good: #047857;
    --good-soft: #ecfdf5;
    --good-line: #a7f3d0;
    --warn: #b45309;
    --warn-soft: #fffbeb;
    --warn-line: #fde68a;
    --bad: #b91c1c;
    --bad-soft: #fef2f2;
    --bad-line: #fecaca;
    --info: #1d4ed8;
    --info-soft: #eff6ff;
    --info-line: #bfdbfe;

    --doc-accent: #0f5f58;
    --doc-accent-soft: #eef7f5;
    --doc-accent-line: #9fd3c9;

    --font-body: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    --font-display: 'Alexandria', 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    --doc-zoom: 1;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--desk);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 9.6pt;
    line-height: 1.72;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
}

bdi,
.num {
    unicode-bidi: isolate;
    direction: ltr;
    font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------------
   شريط الأدوات (الشاشة فقط)
   ------------------------------------------------------------------------ */

.doc-toolbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--ink);
    color: #fff;
    border-bottom: 2px solid var(--gold);
    font-size: 13px;
}

.doc-toolbar__row {
    max-width: 1180px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.doc-toolbar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    min-width: 0;
}

.doc-toolbar__badge {
    background: var(--gold);
    color: #111;
    font-weight: 800;
    font-size: 11px;
    padding: 2px 8px;
}

.doc-toolbar__title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
    opacity: 0.92;
}

.doc-toolbar__tabs {
    display: flex;
    gap: 2px;
    margin-inline-start: auto;
    background: rgba(255, 255, 255, 0.06);
    padding: 2px;
    flex-wrap: wrap;
}

.doc-toolbar__tabs a {
    color: #cbd5e1;
    text-decoration: none;
    padding: 6px 12px;
    font-weight: 600;
}

.doc-toolbar__tabs a:hover {
    color: #fff;
}

.doc-toolbar__tabs a.is-active {
    background: #fff;
    color: var(--ink);
}

.doc-toolbar__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.doc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: transparent;
    color: #fff;
    font: inherit;
    font-weight: 700;
    padding: 7px 14px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.doc-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.55);
}

.doc-btn:active {
    transform: translateY(1px);
}

.doc-btn--sources::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    margin-inline-end: 2px;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.doc-btn--sources[aria-pressed="true"]::before {
    background: var(--gold);
    box-shadow: 0 0 6px var(--gold);
}

.doc-btn--back::before {
    content: '→';
    display: inline-block;
    font-size: 12px;
    margin-inline-end: 2px;
    opacity: 0.85;
    transition: transform 0.15s ease;
}

.doc-btn--back:hover::before {
    transform: translateX(2px);
}

.doc-btn--gold {
    background: var(--gold);
    border-color: var(--gold);
    color: #111;
}

.doc-btn--gold:hover {
    background: #c29a3e;
    border-color: #c29a3e;
}

.doc-btn--primary:not([data-print])::after {
    content: '←';
    display: inline-block;
    font-size: 12px;
    margin-inline-start: 3px;
    transition: transform 0.15s ease;
}

.doc-btn--primary:not([data-print]):hover::after {
    transform: translateX(-2px);
}

.doc-btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

.doc-btn[aria-pressed="true"] {
    background: #fff;
    color: var(--ink);
    border-color: #fff;
}

.doc-notice {
    background: var(--gold-soft);
    color: #5b4410;
    border-bottom: 1px solid #e8d7ad;
    font-size: 13px;
}

.doc-notice__row {
    max-width: 1180px;
    margin: 0 auto;
    padding: 9px 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.doc-notice a {
    color: #3f2f08;
    font-weight: 800;
}

.doc-legend {
    display: none;
    max-width: 1180px;
    margin: 0 auto;
    padding: 8px 16px 0;
    gap: 16px;
    font-size: 12px;
    color: var(--ink-3);
    flex-wrap: wrap;
}

.show-sources .doc-legend {
    display: flex;
}

.doc-legend span::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-inline-end: 6px;
    vertical-align: -2px;
    border: 2px dotted currentColor;
}

.doc-legend .is-data {
    color: var(--muted);
}

.doc-legend .is-calculated {
    color: var(--info);
}

.doc-legend .is-approved {
    color: #7c3aed;
}

/* ------------------------------------------------------------------------
   الورقة
   ------------------------------------------------------------------------ */

.doc-desk {
    padding: 24px 12px 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.doc-page {
    --lh-bleed-top: 11mm;
    --lh-bleed-x: 15mm;
    --lh-bleed-bottom: 9mm;
    position: relative;
    width: 210mm;
    min-height: 297mm;
    background: var(--paper);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 12px 32px rgba(15, 23, 42, 0.1);
    padding: 11mm 15mm 9mm;
    display: flex;
    flex-direction: column;
    zoom: var(--doc-zoom);
    overflow: hidden;
}

.doc-head {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8mm;
    font-size: 7.8pt;
    line-height: 1.55;
    color: var(--ink-2);
}

.doc-head__authority {
    font-weight: 600;
}

.doc-head__authority div:first-child {
    font-weight: 800;
    color: var(--ink);
}

.doc-head__logo-img {
    display: block;
    width: 38mm;
    height: 17mm;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.doc-head__meta {
    text-align: left;
    direction: rtl;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.doc-head__product {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--doc-accent);
    font-size: 9.5pt;
    letter-spacing: 0.01em;
}

.doc-head__label {
    font-weight: 700;
    color: var(--ink);
}

.doc-rule {
    margin: 4mm 0 6mm;
    height: 0;
    border-top: 0.35mm solid var(--doc-accent);
    position: relative;
}

.doc-rule::after {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 0.6mm;
    width: 26mm;
    border-top: 0.6mm solid var(--gold);
}

.doc-body {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-content: start;
    gap: 5.5mm 7mm;
}

.doc-body > * {
    grid-column: 1 / -1;
    min-width: 0;
    break-inside: avoid;
}

.doc-body > .is-half {
    grid-column: span 1;
}

.doc-foot {
    margin-top: 6mm;
    padding-top: 2.6mm;
    border-top: 0.25mm solid var(--hair-2);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 6mm;
    font-size: 7.2pt;
    color: var(--muted);
}

.doc-foot > :last-child {
    text-align: left;
}

.doc-foot strong {
    color: var(--ink-2);
}

.is-preview .doc-page::after {
    content: 'معاينة — غير مُصدَر';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-32deg);
    font-family: var(--font-display);
    font-size: 58pt;
    font-weight: 900;
    color: rgba(15, 23, 42, 0.065);
    white-space: nowrap;
    pointer-events: none;
    z-index: 5;
}

.is-preview .doc-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(-32deg, transparent 0 60mm, rgba(168, 131, 47, 0.05) 60mm 61mm);
    pointer-events: none;
    z-index: 4;
}

/* ------------------------------------------------------------------------
   عناصر مشتركة
   ------------------------------------------------------------------------ */

.blk-title {
    font-family: var(--font-display);
    font-size: 10.5pt;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 2.4mm;
    display: flex;
    align-items: center;
    gap: 2.5mm;
}

.blk-title::before {
    content: '';
    width: 1.6mm;
    height: 1.6mm;
    background: var(--doc-accent);
    flex: none;
}

.tone-good { --tone: var(--good); --tone-soft: var(--good-soft); --tone-line: var(--good-line); }
.tone-warn { --tone: var(--warn); --tone-soft: var(--warn-soft); --tone-line: var(--warn-line); }
.tone-bad { --tone: var(--bad); --tone-soft: var(--bad-soft); --tone-line: var(--bad-line); }
.tone-info { --tone: var(--info); --tone-soft: var(--info-soft); --tone-line: var(--info-line); }
.tone-accent { --tone: var(--doc-accent); --tone-soft: var(--doc-accent-soft); --tone-line: var(--doc-accent-line); }
.tone-neutral,
.tone-default { --tone: var(--ink-3); --tone-soft: var(--wash); --tone-line: var(--hair-2); }
.tone-good-soft { --tone: #34a37f; --tone-soft: var(--good-soft); --tone-line: var(--good-line); }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 1.2mm;
    padding: 0.4mm 2.2mm;
    font-size: 7.4pt;
    font-weight: 700;
    color: var(--tone);
    background: var(--tone-soft);
    border: 0.25mm solid var(--tone-line);
    white-space: nowrap;
}

.show-sources [data-source="calculated"] {
    outline: 1.5px dotted var(--info);
    outline-offset: 1.5mm;
}

.show-sources [data-source="approved"] {
    outline: 1.5px dotted #7c3aed;
    outline-offset: 1.5mm;
}

/* ------------------------------------------------------------------------
   عنوان القسم
   ------------------------------------------------------------------------ */

.blk-section {
    display: flex;
    align-items: flex-end;
    gap: 4mm;
    margin-top: 1mm;
}

.blk-section__text {
    flex: none;
}

.blk-section__kicker {
    display: block;
    font-size: 7.4pt;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.04em;
}

.blk-section__title {
    font-family: var(--font-display);
    font-size: 14.5pt;
    font-weight: 800;
    color: var(--doc-accent);
    line-height: 1.3;
    margin: 0;
}

.blk-section__rule {
    flex: 1;
    border-bottom: 0.25mm solid var(--hair-2);
    margin-bottom: 1.6mm;
}

/* ------------------------------------------------------------------------
   الواجهة (Hero)
   ------------------------------------------------------------------------ */

.blk-hero__cover {
    height: 78mm;
    margin-bottom: 5mm;
    position: relative;
    background: var(--doc-accent-soft);
}

.blk-hero__cover--compact {
    height: 54mm;
}

.blk-hero__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blk-hero__cover::after {
    content: '';
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 1.2mm;
    background: linear-gradient(to left, var(--doc-accent) 0 72%, var(--gold) 72% 100%);
}

.blk-hero__body {
    border-inline-start: 1.2mm solid var(--doc-accent);
    padding-inline-start: 5mm;
}

.blk-hero__kicker {
    font-size: 8pt;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.03em;
}

.blk-hero__title {
    font-family: var(--font-display);
    font-size: 21pt;
    font-weight: 800;
    line-height: 1.35;
    margin: 1mm 0 0;
    color: var(--ink);
    text-wrap: balance;
}

.blk-hero__lead {
    margin: 2.5mm 0 0;
    font-size: 10.6pt;
    color: var(--ink-2);
    line-height: 1.7;
}

.blk-hero__badges {
    margin-top: 3mm;
    display: flex;
    gap: 2mm;
    flex-wrap: wrap;
}

.blk-hero__facts {
    margin-top: 5mm;
    display: flex;
    flex-wrap: wrap;
    border-top: 0.25mm solid var(--hair);
    border-bottom: 0.25mm solid var(--hair);
}

.blk-hero__fact {
    padding: 2.2mm 4mm;
    border-inline-end: 0.25mm solid var(--hair);
    min-width: 0;
}

.blk-hero__fact:last-child {
    border-inline-end: 0;
}

.blk-hero__fact span {
    display: block;
    font-size: 7pt;
    color: var(--muted);
    font-weight: 600;
}

.blk-hero__fact strong {
    font-size: 9pt;
    font-weight: 700;
    color: var(--ink);
}

.blk-hero__fact em {
    display: block;
    font-style: normal;
    font-size: 7.6pt;
    color: var(--gold);
    font-weight: 600;
}

/* ------------------------------------------------------------------------
   بطاقات المؤشرات
   ------------------------------------------------------------------------ */

.blk-metrics {
    display: grid;
    grid-template-columns: repeat(var(--cols, 4), 1fr);
    gap: 3mm;
}

.blk-metric {
    background: var(--wash);
    border-top: 0.8mm solid var(--tone);
    padding: 3mm 3.5mm 2.8mm;
}

.blk-metric__label {
    font-size: 7.6pt;
    font-weight: 700;
    color: var(--ink-3);
}

.blk-metric__value {
    font-family: var(--font-display);
    font-size: 19pt;
    font-weight: 800;
    color: var(--tone);
    line-height: 1.25;
    margin-top: 0.6mm;
}

.blk-metric__unit {
    font-size: 8.5pt;
    font-weight: 700;
    color: var(--ink-3);
    margin-inline-start: 1mm;
}

.blk-metric__note {
    font-size: 7.2pt;
    color: var(--muted);
}

/* ------------------------------------------------------------------------
   الملخص والنص
   ------------------------------------------------------------------------ */

.blk-summary {
    background: var(--doc-accent-soft);
    border-inline-start: 0.8mm solid var(--doc-accent);
    padding: 4mm 5mm;
}

.blk-summary p,
.blk-narrative p {
    margin: 0 0 2mm;
}

.blk-summary p {
    font-size: 10pt;
    color: var(--ink);
    line-height: 1.8;
}

.blk-summary p:last-of-type,
.blk-narrative p:last-child {
    margin-bottom: 0;
}

.blk-summary__highlights {
    margin-top: 3mm;
    display: flex;
    flex-wrap: wrap;
    gap: 2mm;
}

.blk-narrative {
    color: var(--ink-2);
}

.blk-bullets {
    margin: 0;
    padding: 0;
    list-style: none;
}

.blk-bullets li {
    position: relative;
    padding-inline-start: 5mm;
    margin-bottom: 1.2mm;
}

.blk-bullets li::before {
    content: '';
    position: absolute;
    inset-inline-start: 0.6mm;
    top: 2.3mm;
    width: 1.6mm;
    height: 1.6mm;
    background: var(--doc-accent);
}

.blk-callout {
    background: var(--tone-soft);
    border: 0.25mm solid var(--tone-line);
    border-inline-start: 1mm solid var(--tone);
    padding: 3.2mm 4.5mm;
}

.blk-callout__title {
    font-weight: 800;
    color: var(--tone);
    font-size: 9pt;
    margin-bottom: 1mm;
}

.blk-callout p {
    margin: 0;
    color: var(--ink-2);
}

.blk-quote {
    position: relative;
    padding: 3mm 12mm 3mm 4mm;
    font-family: var(--font-display);
    font-size: 11pt;
    color: var(--ink);
}

.blk-quote::before {
    content: '”';
    position: absolute;
    inset-inline-start: 0;
    top: -6mm;
    font-size: 40pt;
    color: var(--doc-accent-line);
}

/* ------------------------------------------------------------------------
   الأهداف
   ------------------------------------------------------------------------ */

.blk-goals__row {
    display: grid;
    grid-template-columns: 6mm 1fr auto;
    gap: 3mm;
    align-items: start;
    padding: 2.2mm 0;
    border-bottom: 0.25mm solid var(--hair);
}

.blk-goals__row:last-child {
    border-bottom: 0;
}

.blk-goals__icon {
    width: 6mm;
    height: 6mm;
    display: grid;
    place-items: center;
    background: var(--tone-soft);
    color: var(--tone);
    border: 0.25mm solid var(--tone-line);
    font-weight: 800;
    font-size: 8pt;
    line-height: 1;
}

.blk-goals__text {
    color: var(--ink);
    font-weight: 600;
}

.blk-goals__note {
    display: block;
    font-weight: 400;
    font-size: 8pt;
    color: var(--muted);
}

.blk-tally {
    display: flex;
    height: 2.2mm;
    margin: 0 0 1.5mm;
    background: var(--hair);
}

.blk-tally span {
    display: block;
    height: 100%;
    background: var(--tone);
}

.blk-tally-legend {
    display: flex;
    gap: 4mm;
    font-size: 7.4pt;
    color: var(--ink-3);
    margin-bottom: 1.5mm;
    flex-wrap: wrap;
}

.blk-tally-legend i {
    display: inline-block;
    width: 2.2mm;
    height: 2.2mm;
    background: var(--tone);
    margin-inline-end: 1.2mm;
    vertical-align: -0.2mm;
}

/* ------------------------------------------------------------------------
   الخط الزمني
   ------------------------------------------------------------------------ */

.blk-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.blk-timeline::before {
    content: '';
    position: absolute;
    inset-inline-start: 2.2mm;
    top: 2mm;
    bottom: 2mm;
    border-inline-start: 0.35mm solid var(--doc-accent-line);
}

.blk-timeline li {
    position: relative;
    padding-inline-start: 8mm;
    padding-bottom: 2.4mm;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 3mm;
    align-items: baseline;
}

.blk-timeline li::before {
    content: '';
    position: absolute;
    inset-inline-start: 0.9mm;
    top: 1.5mm;
    width: 2.6mm;
    height: 2.6mm;
    background: var(--paper);
    border: 0.6mm solid var(--doc-accent);
}

.blk-timeline li:first-child::before {
    background: var(--doc-accent);
}

.blk-timeline__when {
    font-size: 7.6pt;
    font-weight: 700;
    color: var(--gold);
    white-space: nowrap;
    min-width: 16mm;
}

.blk-timeline__title {
    font-weight: 700;
    color: var(--ink);
}

.blk-timeline__note {
    grid-column: 2;
    font-size: 8pt;
    color: var(--muted);
}

/* ------------------------------------------------------------------------
   الأعمدة والمقارنة والمقياس
   ------------------------------------------------------------------------ */

.blk-bars__row {
    display: grid;
    grid-template-columns: minmax(18mm, 34%) 1fr auto;
    gap: 2.5mm;
    align-items: center;
    margin-bottom: 1.8mm;
    font-size: 8.4pt;
}

.blk-bars__label {
    color: var(--ink-2);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blk-bars__track {
    display: block;
    height: 3.4mm;
    background: var(--wash);
    border: 0.2mm solid var(--hair);
}

.blk-bars__fill {
    display: block;
    height: 100%;
    background: var(--doc-accent);
}

.blk-bars__row:nth-child(2n) .blk-bars__fill {
    background: color-mix(in srgb, var(--doc-accent) 72%, white);
}

.blk-bars__value {
    font-weight: 700;
    color: var(--ink);
    font-size: 8pt;
}

.blk-caption {
    font-size: 7.4pt;
    color: var(--muted);
    margin-top: 1mm;
}

.blk-compare {
    width: 100%;
    border-collapse: collapse;
    font-size: 8.6pt;
}

.blk-compare th {
    text-align: right;
    font-size: 7.4pt;
    color: var(--muted);
    font-weight: 700;
    padding: 1.5mm 2mm;
    border-bottom: 0.35mm solid var(--ink-2);
}

.blk-compare td {
    padding: 2.6mm 2mm;
    border-bottom: 0.25mm solid var(--hair);
    vertical-align: middle;
}

.blk-compare__label {
    font-weight: 700;
    color: var(--ink);
    width: 30%;
}

.blk-compare__num {
    font-weight: 700;
    white-space: nowrap;
}

.blk-compare__before {
    color: var(--muted);
}

.blk-dumbbell {
    position: relative;
    height: 5mm;
    min-width: 38mm;
}

.blk-dumbbell__track {
    position: absolute;
    top: 50%;
    inset-inline: 0;
    border-top: 0.25mm solid var(--hair-2);
}

.blk-dumbbell__span {
    position: absolute;
    top: calc(50% - 0.6mm);
    height: 1.2mm;
    background: var(--tone);
    opacity: 0.35;
}

.blk-dumbbell__dot {
    position: absolute;
    top: calc(50% - 1.5mm);
    width: 3mm;
    height: 3mm;
    margin-inline-start: -1.5mm;
    background: var(--paper);
    border: 0.6mm solid var(--muted);
}

.blk-dumbbell__dot--after {
    background: var(--tone);
    border-color: var(--tone);
}

.blk-dumbbell__target {
    position: absolute;
    top: 0;
    bottom: 0;
    border-inline-start: 0.5mm dashed var(--gold);
}

.blk-gauge {
    display: grid;
    grid-template-columns: 34mm 1fr;
    gap: 4mm;
    align-items: center;
    padding: 3mm;
    background: var(--wash);
    border: 0.25mm solid var(--hair);
    height: 100%;
}

.blk-gauge svg {
    width: 34mm;
    height: 34mm;
    display: block;
}

.blk-gauge__value {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 15pt;
    fill: var(--ink);
}

.blk-gauge__caption {
    font-size: 8pt;
    color: var(--ink-3);
    margin-bottom: 1.5mm;
}

.blk-gauge__legend {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 7.6pt;
    color: var(--ink-2);
}

.blk-gauge__legend li {
    display: flex;
    justify-content: space-between;
    gap: 3mm;
    padding: 0.4mm 0;
}

.blk-gauge__legend i {
    display: inline-block;
    width: 2.2mm;
    height: 2.2mm;
    background: var(--tone);
    margin-inline-end: 1.4mm;
}

/* ------------------------------------------------------------------------
   الأثر
   ------------------------------------------------------------------------ */

.blk-impact {
    border: 0.25mm solid var(--tone-line);
    border-inline-start: 1.4mm solid var(--tone);
    background: linear-gradient(to left, var(--tone-soft), var(--paper) 70%);
    padding: 4mm 5mm;
}

.blk-impact__head {
    display: flex;
    align-items: center;
    gap: 4mm;
    flex-wrap: wrap;
}

.blk-impact__label {
    font-family: var(--font-display);
    font-size: 15pt;
    font-weight: 800;
    color: var(--tone);
}

.blk-impact__meter {
    display: flex;
    gap: 0.8mm;
}

.blk-impact__meter span {
    width: 7mm;
    height: 2mm;
    background: var(--hair);
}

.blk-impact__meter span.is-on {
    background: var(--tone);
}

.blk-impact__confidence {
    margin-inline-start: auto;
    font-size: 7.6pt;
    color: var(--muted);
    font-weight: 600;
}

.blk-impact__statement {
    margin: 2mm 0 2.5mm;
    color: var(--ink-2);
}

.blk-reasons {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.4mm 6mm;
}

.blk-reasons li {
    display: flex;
    gap: 2mm;
    font-size: 8.4pt;
    color: var(--ink-2);
}

.blk-reasons b {
    color: var(--tone);
    flex: none;
}

/* ------------------------------------------------------------------------
   القوائم والأشخاص والجداول
   ------------------------------------------------------------------------ */

.blk-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.blk-list li {
    display: grid;
    grid-template-columns: 5mm 1fr;
    gap: 2mm;
    padding: 1.2mm 0;
    color: var(--ink-2);
}

.blk-list__mark {
    width: 5mm;
    height: 5mm;
    display: grid;
    place-items: center;
    font-size: 7.6pt;
    font-weight: 800;
    color: var(--tone);
    background: var(--tone-soft);
    border: 0.25mm solid var(--tone-line);
    line-height: 1;
    margin-top: 0.4mm;
}

.blk-list--bullet .blk-list__mark {
    background: transparent;
    border: 0;
    font-size: 11pt;
}

.blk-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 1.6mm;
}

.blk-chips span {
    padding: 0.8mm 3mm;
    background: var(--doc-accent-soft);
    border: 0.25mm solid var(--doc-accent-line);
    color: var(--doc-accent);
    font-weight: 700;
    font-size: 8pt;
}

.blk-people {
    display: grid;
    grid-template-columns: repeat(var(--cols, 2), 1fr);
    gap: 1.6mm 5mm;
}

.blk-person {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 3mm;
    padding: 1.6mm 0;
    border-bottom: 0.25mm dotted var(--hair-2);
}

.blk-person strong {
    color: var(--ink);
}

.blk-person span {
    font-size: 8pt;
    color: var(--muted);
    text-align: left;
}

.blk-honor {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5mm;
}

.blk-honor__card {
    border: 0.25mm solid var(--hair-2);
    border-top: 0.8mm solid var(--gold);
    padding: 2.5mm 3mm;
    background: var(--paper);
}

.blk-honor__card strong {
    display: block;
    color: var(--ink);
    font-size: 9pt;
}

.blk-honor__card span {
    font-size: 7.6pt;
    color: var(--muted);
}

.blk-podium {
    display: grid;
    grid-template-columns: 1fr 1.15fr 1fr;
    align-items: end;
    gap: 3mm;
    margin-bottom: 3mm;
}

.blk-podium__step {
    text-align: center;
    padding: 3mm 2mm;
    background: var(--wash);
    border: 0.25mm solid var(--hair-2);
    border-top: 1.2mm solid var(--medal, var(--gold));
}

.blk-podium__step--1 {
    --medal: #b8912f;
    padding-top: 6mm;
    background: var(--gold-soft);
}

.blk-podium__step--2 {
    --medal: #8a94a6;
}

.blk-podium__step--3 {
    --medal: #a86a3d;
}

.blk-podium__rank {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 16pt;
    color: var(--medal);
    line-height: 1;
}

.blk-podium__step strong {
    display: block;
    margin-top: 1.5mm;
    color: var(--ink);
}

.blk-podium__step span {
    font-size: 7.6pt;
    color: var(--muted);
}

.blk-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8.6pt;
}

.blk-table th {
    text-align: right;
    background: var(--ink);
    color: #fff;
    font-weight: 700;
    font-size: 7.6pt;
    padding: 1.8mm 2.5mm;
}

.blk-table td {
    padding: 2mm 2.5mm;
    border-bottom: 0.25mm solid var(--hair);
    color: var(--ink-2);
    vertical-align: top;
}

.blk-table tr:nth-child(even) td {
    background: var(--wash);
}

.blk-table__index {
    width: 8mm;
    color: var(--doc-accent);
    font-weight: 800;
}

.blk-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2mm 5mm;
}

.blk-facts div {
    border-bottom: 0.25mm solid var(--hair);
    padding: 1.4mm 0;
}

.blk-facts span {
    display: block;
    font-size: 7.2pt;
    color: var(--muted);
}

.blk-facts strong {
    color: var(--ink);
}

/* ------------------------------------------------------------------------
   معرض الشواهد
   ------------------------------------------------------------------------ */

.blk-gallery {
    display: grid;
    gap: 3mm;
}

.blk-gallery figure {
    margin: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.blk-gallery__frame {
    flex: 1;
    min-height: 0;
    background: var(--wash);
    overflow: hidden;
}

.blk-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blk-gallery figcaption {
    font-size: 7.4pt;
    color: var(--ink-3);
    padding-top: 1.2mm;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-top: 0.6mm solid var(--doc-accent);
    margin-top: 1mm;
}

.blk-gallery--single { grid-template-columns: 1fr; grid-auto-rows: 100mm; }
.blk-gallery--duo { grid-template-columns: 1fr 1fr; grid-auto-rows: 72mm; }
.blk-gallery--duo-tall { grid-template-columns: 1fr 1fr; grid-auto-rows: 108mm; }
.blk-gallery--trio { grid-template-columns: 1.7fr 1fr; grid-template-rows: 58mm 58mm; }
.blk-gallery--trio figure:first-child { grid-row: 1 / span 2; }
.blk-gallery--quad { grid-template-columns: 1fr 1fr; grid-auto-rows: 62mm; }
.blk-gallery--feature { grid-template-columns: repeat(4, 1fr); grid-template-rows: 74mm 42mm; }
.blk-gallery--feature figure:first-child { grid-column: 1 / -1; }
.blk-gallery--grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 56mm; }
.blk-gallery--strip { grid-template-columns: repeat(var(--cols, 4), 1fr); grid-auto-rows: 34mm; }
.blk-gallery--strip figcaption { display: none; }

/* ------------------------------------------------------------------------
   الاعتماد
   ------------------------------------------------------------------------ */

.blk-signatures {
    display: grid;
    grid-template-columns: 1fr 34mm 1fr;
    gap: 8mm;
    align-items: end;
    padding-top: 4mm;
    margin-top: 2mm;
    border-top: 0.25mm solid var(--hair);
}

.blk-sign__role {
    font-size: 7.8pt;
    color: var(--muted);
    font-weight: 700;
}

.blk-sign__name {
    font-weight: 800;
    color: var(--ink);
    min-height: 5.5mm;
}

.blk-sign__line {
    margin-top: 9mm;
    border-top: 0.3mm solid var(--ink-2);
    font-size: 7pt;
    color: var(--muted);
    padding-top: 1mm;
}

.blk-seal {
    width: 30mm;
    height: 30mm;
    border: 0.4mm dashed var(--hair-2);
    display: grid;
    place-items: center;
    color: var(--hair-2);
    font-size: 8pt;
    font-weight: 700;
    margin: 0 auto;
}

/* ------------------------------------------------------------------------
   الشاشات الصغيرة
   ------------------------------------------------------------------------ */

@media screen and (max-width: 840px) {
    .doc-desk {
        padding: 12px 8px 40px;
    }

    .doc-toolbar {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
    }

    .doc-toolbar__row {
        padding: 9px 12px 7px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    /* الطبقة 1: الهوية وعنوان الوثيقة */
    .doc-toolbar__brand {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
    }

    .doc-toolbar__badge {
        font-size: 11px;
        font-weight: 800;
        padding: 2px 7px;
        flex-shrink: 0;
        line-height: 1.4;
        letter-spacing: 0.02em;
    }

    .doc-toolbar__title {
        flex: 1;
        min-width: 0;
        max-width: none;
        font-size: 13.5px;
        font-weight: 700;
        color: #f8fafc;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.35;
    }

    /* الطبقة 2: أزرار التحكم والإجراء الرئيسي */
    .doc-toolbar__actions {
        display: flex;
        align-items: center;
        gap: 6px;
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 1px;
    }

    .doc-toolbar__actions::-webkit-scrollbar {
        display: none;
    }

    .doc-toolbar__actions .doc-btn {
        font-size: 11.5px;
        padding: 6px 9px;
        gap: 5px;
        line-height: 1.25;
        flex-shrink: 0;
    }

    .doc-toolbar__actions .doc-btn--back {
        order: 1;
        flex: 0 1 auto;
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .doc-toolbar__actions .doc-btn--sources {
        order: 2;
        flex: 0 0 auto;
    }

    .doc-toolbar__actions .doc-btn--card {
        order: 3;
        flex: 0 0 auto;
    }

    .doc-toolbar__actions .doc-btn--primary,
    .doc-toolbar__actions .doc-btn--gold {
        order: 4;
        flex: 1 0 auto;
        justify-content: center;
        text-align: center;
        font-size: 12px;
        font-weight: 800;
        padding: 6px 14px;
    }

    /* الطبقة 3: تبويبات المخرجات (شريط مقسم سلس) */
    .doc-toolbar__tabs {
        margin-inline-start: 0;
        width: 100%;
        display: flex;
        align-items: center;
        gap: 2px;
        padding: 3px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.1);
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .doc-toolbar__tabs::-webkit-scrollbar {
        display: none;
    }

    .doc-toolbar__tabs a {
        flex: 1 0 auto;
        text-align: center;
        padding: 6px 10px;
        font-size: 12px;
        font-weight: 600;
        color: #94a3b8;
        white-space: nowrap;
        text-decoration: none;
        border-radius: 0;
    }

    .doc-toolbar__tabs a:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.08);
    }

    .doc-toolbar__tabs a.is-active {
        background: #ffffff;
        color: var(--ink);
        font-weight: 800;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    }

    /* تنبيه النموذج على الجوال */
    .doc-notice__row {
        padding: 7px 12px;
        font-size: 11.5px;
        gap: 8px;
        flex-wrap: nowrap;
        justify-content: space-between;
    }

    .doc-notice__row span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
    }

    .doc-notice__row a {
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* دليل مصادر المحتوى على الجوال */
    .doc-legend {
        padding: 6px 12px 0;
        gap: 10px;
        font-size: 11px;
    }
}

/* تحسينات إضافية للشاشات شديدة الصغر (380px فأقل) */
@media screen and (max-width: 380px) {
    .doc-toolbar__row {
        padding: 7px 10px 5px;
        gap: 6px;
    }

    .doc-toolbar__title {
        font-size: 12.5px;
    }

    .doc-toolbar__actions .doc-btn {
        font-size: 11px;
        padding: 5px 7px;
        gap: 4px;
    }

    .doc-toolbar__actions .doc-btn--primary,
    .doc-toolbar__actions .doc-btn--gold {
        font-size: 11.5px;
        padding: 5px 10px;
    }

    .doc-toolbar__tabs a {
        padding: 5px 8px;
        font-size: 11.5px;
    }
}

/* ------------------------------------------------------------------------
   الطباعة
   ------------------------------------------------------------------------ */

/* الإصدار الأول لمسار التقدم (يبقى حتى تُنشر الخطة العلاجية الجديدة). */
.blk-progress {
    padding: 5mm 5.5mm 4mm;
    border: .25mm solid var(--line);
    border-radius: 3mm;
    background: linear-gradient(145deg, #fff 0%, var(--doc-accent-soft) 145%);
    break-inside: avoid;
}

.blk-progress__head,
.blk-progress__dates,
.blk-progress__legend {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3mm;
}

.blk-progress__head h3 { margin: 0; font-size: 11pt; color: var(--ink); }
.blk-progress__legend { justify-content: flex-end; font-size: 7.2pt; color: var(--muted); }
.blk-progress__legend span::before { content: ""; display: inline-block; width: 6mm; border-top: .55mm solid var(--doc-accent); margin-inline-end: 1.5mm; vertical-align: middle; }
.blk-progress__legend .is-aim::before { border-top-color: var(--gold); border-top-style: dashed; }
.blk-progress__chart { width: 100%; height: 48mm; overflow: visible; margin-top: 2mm; }
.blk-progress__chart .axis { stroke: var(--line); stroke-width: .35; }
.blk-progress__chart .aim { fill: none; stroke: var(--gold); stroke-width: 1.15; stroke-dasharray: 3 2; }
.blk-progress__chart .actual { fill: none; stroke: var(--doc-accent); stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.blk-progress__chart .dot { fill: #fff; stroke: var(--doc-accent); stroke-width: .8; }
.blk-progress__chart text { fill: var(--ink); font-family: inherit; font-size: 4.2px; font-weight: 700; }
.blk-progress__dates { border-top: .2mm solid var(--line); padding-top: 1.5mm; color: var(--muted); font-size: 7.2pt; }
.blk-progress__dates strong { color: var(--doc-accent); }

.doc-print-blocked {
    display: none;
}

/* ------------------------------------------------------------------------
   جدول البيانات، بند جدول الأعمال، المهام حسب المسؤول
   ------------------------------------------------------------------------ */

.blk-table--data {
    table-layout: fixed;
}

.blk-table--data th.is-center,
.blk-table--data td.is-center {
    text-align: center;
}

.blk-table__sub {
    display: block;
    margin-top: 0.4mm;
    font-size: 7.4pt;
    color: var(--muted);
}

.blk-table--sign td {
    height: 9mm;
    vertical-align: middle;
}

.blk-table--sign tr:nth-child(even) td {
    background: transparent;
}

.blk-badge {
    display: inline-block;
    padding: 0.3mm 2.2mm;
    border-radius: 10mm;
    background: var(--tone-soft);
    border: 0.25mm solid var(--tone-line);
    color: var(--tone);
    font-size: 7.4pt;
    font-weight: 700;
    white-space: nowrap;
}

.blk-agenda {
    border: 0.25mm solid var(--hair-2);
    border-inline-start: 1mm solid var(--doc-accent);
    padding: 3.2mm 4mm 3.4mm;
    background: var(--paper);
}

.blk-agenda__head {
    display: flex;
    gap: 3mm;
    align-items: flex-start;
}

.blk-agenda__num {
    flex: none;
    display: grid;
    place-items: center;
    width: 7mm;
    height: 7mm;
    background: var(--doc-accent);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 9pt;
}

.blk-agenda__title {
    margin: 0.6mm 0 0;
    font-family: var(--font-display);
    font-size: 10.4pt;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.5;
}

.blk-agenda__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0 4mm;
    font-size: 7.6pt;
    color: var(--muted);
}

.blk-agenda__body {
    margin-top: 2mm;
    color: var(--ink-2);
}

.blk-agenda__body p {
    margin: 0 0 1.4mm;
}

.blk-agenda__decisions {
    margin-top: 2.4mm;
    padding: 2.4mm 3mm;
    background: var(--doc-accent-soft);
}

.blk-agenda__label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 8.4pt;
    color: var(--doc-accent);
    margin-bottom: 1mm;
}

.blk-agenda__decisions ol {
    margin: 0;
    padding-inline-start: 5mm;
}

.blk-agenda__decisions li {
    padding: 0.8mm 0;
    border-bottom: 0.2mm dashed var(--doc-accent-line);
}

.blk-agenda__decisions li:last-child {
    border-bottom: 0;
}

.blk-agenda__text {
    display: block;
    color: var(--ink);
    font-weight: 600;
}

.blk-agenda__who {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6mm 4mm;
    font-size: 7.6pt;
    color: var(--muted);
}

.blk-agenda__who strong {
    color: var(--ink-2);
}

.blk-tasks {
    display: grid;
    gap: 3mm;
}

.blk-tasks__group {
    border: 0.25mm solid var(--hair-2);
    break-inside: avoid;
}

.blk-tasks__group header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 3mm;
    padding: 1.8mm 3mm;
    background: var(--doc-accent-soft);
    border-bottom: 0.25mm solid var(--doc-accent-line);
}

.blk-tasks__group header strong {
    font-family: var(--font-display);
    font-size: 9.6pt;
    color: var(--doc-accent);
}

.blk-tasks__group header span {
    font-size: 7.6pt;
    color: var(--muted);
}

.blk-tasks__group ul {
    list-style: none;
    margin: 0;
    padding: 0 3mm;
}

.blk-tasks__group li {
    display: grid;
    grid-template-columns: 5mm 1fr auto;
    gap: 2.5mm;
    align-items: start;
    padding: 1.6mm 0;
    border-bottom: 0.2mm solid var(--hair);
}

.blk-tasks__group li:last-child {
    border-bottom: 0;
}

.blk-tasks__box {
    width: 4mm;
    height: 4mm;
    margin-top: 0.6mm;
    border: 0.35mm solid var(--ink-3);
    display: grid;
    place-items: center;
    font-size: 7pt;
    color: var(--good);
    font-weight: 900;
}

.blk-tasks__text {
    color: var(--ink);
}

.blk-tasks__due {
    font-size: 7.8pt;
    font-weight: 700;
    color: var(--ink-2);
    white-space: nowrap;
}

.blk-tasks__group li.is-overdue .blk-tasks__due {
    color: var(--bad);
}

.blk-tasks__group li.is-done .blk-tasks__text {
    color: var(--muted);
    text-decoration: line-through;
}

@media print {
    html,
    body {
        background: #fff;
    }

    .no-print,
    .doc-toolbar,
    .doc-notice,
    .doc-legend {
        display: none !important;
    }

    .doc-desk {
        padding: 0;
        gap: 0;
        display: block;
    }

    /*
     * الوجه ورقة واحدة بالضبط: فرق أجزاء من المليمتر بين المرقّم والمتصفح يُمتص
     * في أسفل المتن بدل أن يدفع التذييل إلى ورقة فارغة (كما تظهر على الشاشة).
     */
    .doc-page {
        zoom: 1;
        box-shadow: none;
        margin: 0;
        height: 297mm;
        min-height: 297mm;
        max-height: 297mm;
        page-break-after: always;
        break-after: page;
        overflow: hidden;
    }

    .doc-page .doc-body {
        min-height: 0;
        overflow: hidden;
    }

    .doc-page:last-child {
        page-break-after: auto;
        break-after: auto;
    }

    .show-sources [data-source] {
        outline: none;
    }

    .is-preview .doc-desk {
        display: none;
    }

    .is-preview .doc-print-blocked {
        display: block;
        padding: 40mm 20mm;
        text-align: center;
        font-size: 14pt;
    }
}

/* ------------------------------------------------------------------------
   العرض المضمَّن: الصفحة الأولى فقط داخل إطار في معرض النماذج
   ------------------------------------------------------------------------ */

body.is-embed {
    background: var(--paper);
    overflow: hidden;
}

.is-embed .doc-desk {
    padding: 0;
    gap: 0;
    align-items: flex-start;
}

.is-embed .doc-page {
    box-shadow: none;
}

/* مسار التقدم (الإصدار 2): القياسات على تواريخها، والمسار المتوقع، وخط المستهدف. */
.blk-progress--v2 { break-inside: avoid; border: .25mm solid var(--line); background: #fff; padding: 3mm 3.5mm 2.5mm; }
.blk-progress--v2.is-half { padding: 2.5mm 3mm 2mm; }
.blk-progress--v2 .blk-progress__head { display: flex; align-items: center; justify-content: space-between; gap: 3mm; }
.blk-progress--v2 .blk-progress__head h3 { margin: 0; font-size: 10.5pt; color: var(--ink); }
.blk-progress--v2 .blk-progress__badge { font-size: 7pt; font-weight: 700; padding: .6mm 2mm; border: .25mm solid currentColor; white-space: nowrap; }
.blk-progress--v2 .blk-progress__badge.tone-good { color: #166534; background: #f0fdf4; }
.blk-progress--v2 .blk-progress__badge.tone-warn { color: #92400e; background: #fffbeb; }
.blk-progress--v2 .blk-progress__badge.tone-bad { color: #991b1b; background: #fef2f2; }
.blk-progress--v2 .blk-progress__badge.tone-info, .blk-progress--v2 .blk-progress__badge.tone-neutral { color: #334155; background: #f8fafc; }
.blk-progress--v2 .blk-progress__chart { display: block; width: 100%; height: auto; margin-top: 1.5mm; overflow: visible; direction: ltr; }
.blk-progress--v2 .blk-progress__chart .grid { stroke: #e8edf2; stroke-width: .6; }
.blk-progress--v2 .blk-progress__chart .axis-label { fill: #8a94a3; font-size: 7.5px; font-family: inherit; font-weight: 400; }
.blk-progress--v2 .blk-progress__chart .target { stroke: #15803d; stroke-width: .9; stroke-dasharray: 1.5 2.5; }
.blk-progress--v2 .blk-progress__chart .target-label { fill: #15803d; font-size: 7.5px; font-weight: 700; font-family: inherit; }
.blk-progress--v2 .blk-progress__chart .aim { fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-dasharray: 5 3; }
.blk-progress--v2 .blk-progress__chart .actual { fill: none; stroke: var(--doc-accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.blk-progress--v2 .blk-progress__chart .dot { fill: #fff; stroke: var(--doc-accent); stroke-width: 1.6; }
.blk-progress--v2 .blk-progress__chart .dot.is-baseline { fill: var(--doc-accent); }
.blk-progress--v2 .blk-progress__chart .value { fill: var(--ink); font-size: 8px; font-weight: 700; font-family: inherit; }
.blk-progress--v2 .blk-progress__chart .date { fill: #64748b; font-size: 7.2px; font-weight: 400; font-family: inherit; }
.blk-progress--v2 .blk-progress__legend { display: flex; gap: 4mm; justify-content: center; margin-top: 1mm; font-size: 6.8pt; color: var(--muted); }
.blk-progress--v2 .blk-progress__legend span::before { content: ""; display: inline-block; width: 5.5mm; border-top: .6mm solid var(--doc-accent); margin-inline-end: 1.3mm; vertical-align: middle; }
.blk-progress--v2 .blk-progress__legend .is-aim::before { border-top-color: var(--gold); border-top-style: dashed; }
.blk-progress--v2 .blk-progress__legend .is-target::before { border-top-color: #15803d; border-top-style: dotted; }
.blk-progress--v2 .blk-caption { margin-top: 1.2mm; }

/* ------------------------------------------------------------------------
   القرار وخطواته: بطاقة تطبيق من صفحة واحدة
   ------------------------------------------------------------------------ */

.doc-body:has(> .blk-decision) { gap: 3.6mm 6mm; }
.blk-locked { display: block; height: 2.1mm; margin: .9mm 0; background: linear-gradient(90deg, #e2e8f0, #eef2f6); }

.blk-decision__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 5mm; padding-bottom: 1.8mm; }
.blk-decision__kicker { font-family: var(--font-display); font-size: 7.4pt; font-weight: 700; color: var(--doc-accent); }
.blk-decision__title { margin: .3mm 0 0; font-family: var(--font-display); font-size: 13.6pt; font-weight: 800; line-height: 1.35; color: var(--ink); }
.blk-decision__facts { display: flex; margin: 0; flex: none; border: .25mm solid var(--hair-2); }
.blk-decision__facts div { padding: .8mm 2.6mm; border-inline-start: .25mm solid var(--hair-2); }
.blk-decision__facts div:first-child { border-inline-start: 0; }
.blk-decision__facts dt { font-size: 6.2pt; color: var(--muted); line-height: 1.3; }
.blk-decision__facts dd { margin: 0; font-size: 8pt; font-weight: 700; color: var(--ink); white-space: nowrap; line-height: 1.4; }
.blk-decision__choice { display: flex; flex-wrap: wrap; align-items: center; gap: 1mm 3mm; padding: 2.2mm 3.6mm; background: var(--doc-accent); color: #fff; }
.blk-decision__label { font-size: 7.2pt; font-weight: 600; opacity: .85; }
.blk-decision__label::after { content: ':'; }
.blk-decision__name { font-family: var(--font-display); font-size: 12.2pt; font-weight: 800; line-height: 1.35; }
.blk-decision__with { display: flex; flex-wrap: wrap; gap: 1.4mm; }
.blk-decision__with span { padding: .2mm 2mm; border: .25mm solid rgba(255, 255, 255, .55); font-size: 7.2pt; font-weight: 600; }
.blk-decision__with span::before { content: '+ '; opacity: .7; }
.blk-decision__why { padding: 1.8mm 3.6mm 2mm; background: var(--doc-accent-soft); border: .25mm solid var(--doc-accent-line); border-top: 0; }
.blk-decision__why-title { display: inline; font-family: var(--font-display); font-size: 8pt; font-weight: 700; color: var(--doc-accent); margin-inline-end: 1.5mm; }
.blk-decision__lead { display: inline; margin: 0; color: var(--ink); font-weight: 600; font-size: 8.6pt; }
.blk-decision__reasons { margin: 1mm 0 0; padding: 0; list-style: none; }
.blk-decision__reasons li { position: relative; padding-inline-start: 3.2mm; color: var(--ink-2); font-size: 8.2pt; line-height: 1.5; }
.blk-decision__reasons li::before { content: ''; position: absolute; inset-inline-start: 0; top: 1.75mm; width: 1.3mm; height: 1.3mm; background: var(--doc-accent); }

.blk-steps__table { border: .25mm solid var(--hair-2); }
.blk-steps__row { display: grid; grid-template-columns: 14mm 1.3fr .72fr; border-top: .25mm solid var(--hair); }
.blk-steps__row > span { padding: .9mm 2.2mm; font-size: 8.2pt; line-height: 1.45; color: var(--ink-2); }
.blk-steps__row > span + span { border-inline-start: .25mm solid var(--hair); }
.blk-steps__row--head { border-top: 0; background: var(--ink); }
.blk-steps__row--head > span { padding-block: .8mm; color: #fff; font-size: 7.2pt; font-weight: 700; }
.blk-steps__row--head > span + span { border-inline-start-color: rgba(255, 255, 255, .18); }
.blk-steps__time { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: var(--wash); white-space: nowrap; }
.blk-steps__time bdi { font-family: var(--font-display); font-size: 8.8pt; font-weight: 800; color: var(--doc-accent); line-height: 1.3; }
.blk-steps__time small { font-size: 6.4pt; color: var(--muted); line-height: 1.2; }
.blk-steps__lead strong { color: var(--ink); font-weight: 700; }
.blk-steps__lead strong::after { content: ' — '; font-weight: 400; color: var(--muted); }
.blk-steps__lead em { display: block; font-style: normal; font-size: 7pt; color: var(--muted); }
.blk-steps__row.tone-accent .blk-steps__time { background: var(--doc-accent); }
.blk-steps__row.tone-accent .blk-steps__time bdi,
.blk-steps__row.tone-accent .blk-steps__time small { color: #fff; }
.blk-steps__row.tone-accent > span:not(.blk-steps__time) { background: var(--doc-accent-soft); }
.blk-steps__row.tone-neutral > span:not(.blk-steps__time) { color: var(--ink-3); }

.blk-question { display: grid; grid-template-columns: 1fr 56mm; gap: 4mm; border: .25mm solid var(--hair-2); border-top: .7mm solid var(--doc-accent); padding: 2mm 3.2mm 2.4mm; }
.blk-question .blk-title { margin-bottom: 0; }
.blk-question__method { font-size: 7pt; color: var(--muted); margin-bottom: 1mm; }
.blk-question__stem { margin: 0 0 1.2mm; font-weight: 700; color: var(--ink); font-size: 8.8pt; }
.blk-question__options { display: grid; grid-template-columns: repeat(var(--opts, 2), 1fr); gap: 1mm 2.4mm; }
.blk-question__options span { display: flex; gap: 1.6mm; align-items: baseline; padding: .6mm 1.8mm; border: .25mm solid var(--hair-2); font-size: 8.2pt; color: var(--ink-2); }
.blk-question__options b { flex: none; color: var(--doc-accent); font-family: var(--font-display); }
.blk-question__options .is-answer { border-color: var(--good-line); background: var(--good-soft); }
.blk-question__options .is-answer b::after { content: ' ✓'; color: var(--good); }
.blk-question__options.is-locked span { align-items: center; }
.blk-question__options.is-locked .blk-locked { margin: 0; flex: 1; }
.blk-question__why { margin: 1.2mm 0 0; font-size: 7.4pt; line-height: 1.5; color: var(--ink-3); }
.blk-question__why strong { color: var(--ink-2); }
.blk-question__spec { padding: 1.6mm 2.4mm; border: .3mm dashed var(--doc-accent-line); background: #fff; }
.blk-question__spec span { font-size: 6.8pt; font-weight: 700; color: var(--doc-accent); }
.blk-question__spec p { margin: .3mm 0 0; color: var(--ink-2); font-size: 8.4pt; }
.blk-question__aside { display: grid; gap: 1.6mm; align-content: start; }
.blk-question__note { padding: 1.3mm 2.4mm; background: var(--tone-soft); border-inline-start: .9mm solid var(--tone); }
.blk-question__note span { display: block; font-size: 7pt; font-weight: 800; color: var(--tone); }
.blk-question__note p { margin: .2mm 0 0; font-size: 7.8pt; color: var(--ink-2); line-height: 1.45; }

.blk-branches .blk-title { margin-bottom: 1.4mm; }
.blk-branches__grid { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 2.6mm; }
.blk-branches__item { border: .25mm solid var(--tone-line); border-top: .9mm solid var(--tone); background: #fff; padding: 1.5mm 2.4mm 1.8mm; }
.blk-branches__label { display: block; font-family: var(--font-display); font-size: 7.8pt; font-weight: 700; color: var(--tone); margin-bottom: .3mm; }
.blk-branches__item p { margin: 0; font-size: 7.9pt; line-height: 1.5; color: var(--ink-2); }

.blk-columns { display: grid; grid-template-columns: repeat(var(--cols), 1fr); border-top: .25mm solid var(--hair-2); padding-top: 1.8mm; gap: 4mm; }
.blk-columns h4 { margin: 0 0 .6mm; font-family: var(--font-display); font-size: 7.8pt; font-weight: 700; color: var(--doc-accent); }
.blk-columns ul { margin: 0; padding: 0; list-style: none; }
.blk-columns li { position: relative; padding-inline-start: 2.8mm; font-size: 7.7pt; line-height: 1.45; color: var(--ink-2); margin-bottom: .3mm; }
.blk-columns li::before { content: '•'; position: absolute; inset-inline-start: 0; color: var(--doc-accent); }

/* بطاقات الخروج: أربع في الصفحة بخطوط قص. */
.doc-body:has(> .blk-tickets),
.doc-body:has(> .blk-answer-cards),
.doc-body:has(> .blk-exit-guide),
.doc-body:has(> .blk-exit-roster) { align-content: stretch; }
.blk-tickets { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; height: 100%; min-height: 200mm; border: .3mm dashed #94a3b8; }
.blk-ticket { display: flex; flex-direction: column; padding: 4mm 4.5mm; border-inline-start: .3mm dashed #94a3b8; border-top: .3mm dashed #94a3b8; }
.blk-ticket:nth-child(odd) { border-inline-start: 0; }
.blk-ticket:nth-child(-n + 2) { border-top: 0; }
.blk-ticket__head { display: flex; flex-direction: column; gap: .4mm; padding-bottom: 1.8mm; border-bottom: .5mm solid var(--doc-accent); }
.blk-ticket__head strong { font-family: var(--font-display); font-size: 11pt; color: var(--doc-accent); }
.blk-ticket__head span { font-size: 8pt; color: var(--ink-3); }
.blk-ticket__howto { font-size: 7.2pt !important; font-weight: 600; color: var(--ink-2) !important; line-height: 1.45; }
.blk-ticket__who { display: grid; grid-template-columns: 1.6fr 1fr; gap: 3mm; margin: 2.4mm 0 1.6mm; font-size: 8pt; color: var(--ink-3); }
.blk-ticket__who span { display: flex; gap: 1.5mm; align-items: flex-end; }
.blk-ticket__who i { flex: 1; border-bottom: .25mm solid var(--hair-2); height: 4mm; }
.blk-ticket__q { margin-top: 1.6mm; }
.blk-ticket__q p { margin: 0; display: flex; gap: 1.8mm; font-size: 8.8pt; font-weight: 600; color: var(--ink); line-height: 1.55; }
.blk-ticket__q b { flex: none; display: grid; place-items: center; width: 4.6mm; height: 4.6mm; background: var(--doc-accent); color: #fff; font-size: 7.2pt; }
.blk-ticket__lines { height: calc(var(--lines) * 5.5mm); background: repeating-linear-gradient(to bottom, var(--paper) 0 5.2mm, var(--hair-2) 5.2mm 5.45mm); }
.blk-ticket__conf,
.blk-ticket__mark { display: flex; flex-wrap: wrap; gap: 1.2mm 3.4mm; padding-top: 1.6mm; font-size: 7.4pt; color: var(--ink-3); }
.blk-ticket__conf { margin-top: auto; }
.blk-ticket__conf span:first-child,
.blk-ticket__mark span:first-child { font-weight: 700; color: var(--ink-2); }
.blk-ticket__conf i,
.blk-ticket__mark i { display: inline-block; width: 3mm; height: 3mm; border: .3mm solid var(--ink-3); border-radius: 50% !important; margin-inline-end: 1mm; vertical-align: -.5mm; }
.blk-ticket__mark { border-top: .25mm dashed var(--hair-2); margin-top: 1.2mm; }
.blk-ticket__mark i { border-radius: 0.4mm !important; }
.blk-ticket__foot { margin-top: 1.2mm; font-size: 6.8pt; color: var(--muted); }

/* دليل المعلم لفرز الخروج */
.blk-exit-guide { display: flex; flex-direction: column; gap: 4mm; height: 100%; min-height: 200mm; padding: 1mm 0; }
.blk-exit-guide__head h1 { margin: 0; font-family: var(--font-display); font-size: 16pt; color: var(--doc-accent); }
.blk-exit-guide__kicker { margin: 0 0 1mm; font-size: 8pt; font-weight: 700; color: #b45309; letter-spacing: .02em; }
.blk-exit-guide__sub { margin: 1mm 0 0; font-size: 9pt; color: var(--ink-3); }
.blk-exit-guide__block { padding: 3mm 3.5mm; border: .3mm solid var(--hair-2); border-radius: 1.5mm; background: #fff; }
.blk-exit-guide__block h2 { margin: 0 0 2mm; font-family: var(--font-display); font-size: 10pt; color: var(--ink); }
.blk-exit-guide__q { margin: 0 0 1.5mm; display: flex; gap: 2mm; font-size: 10pt; font-weight: 600; line-height: 1.5; color: var(--ink); }
.blk-exit-guide__q b { flex: none; display: grid; place-items: center; width: 5mm; height: 5mm; background: var(--doc-accent); color: #fff; font-size: 8pt; }
.blk-exit-guide__hint { margin: 1.5mm 0 0; font-size: 8pt; color: var(--ink-3); }
.blk-exit-guide__answer-lines { height: 28mm; background: repeating-linear-gradient(to bottom, var(--paper) 0 6.5mm, var(--hair-2) 6.5mm 6.75mm); }
.blk-exit-guide__answer { margin: 1.5mm 0 0; font-size: 9.5pt; color: var(--ink-2); }
.blk-exit-guide__steps { margin: 0; padding-inline-start: 5mm; font-size: 9pt; line-height: 1.55; color: var(--ink-2); }
.blk-exit-guide__counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3mm; margin-top: 3mm; }
.blk-exit-guide__count { display: flex; flex-direction: column; gap: 2mm; padding: 2.5mm; border: .3mm dashed var(--doc-accent); border-radius: 1.2mm; text-align: center; }
.blk-exit-guide__count strong { font-size: 10pt; color: var(--doc-accent); }
.blk-exit-guide__count span { display: block; height: 10mm; border-bottom: .35mm solid var(--ink-3); }
.blk-exit-guide__tip { margin: auto 0 0; padding: 2.5mm 3mm; background: color-mix(in srgb, var(--doc-accent) 8%, #fff); border-radius: 1.2mm; font-size: 9pt; font-weight: 600; color: var(--ink-2); }

/* ورقة خروج بلا قص */
.blk-exit-roster { display: flex; flex-direction: column; gap: 3mm; height: 100%; min-height: 200mm; }
.blk-exit-roster__head h1 { margin: 0; font-family: var(--font-display); font-size: 14pt; color: var(--doc-accent); }
.blk-exit-roster__head p { margin: .8mm 0 0; font-size: 8.5pt; color: var(--ink-3); }
.blk-exit-roster__q p { margin: 0 0 1mm; display: flex; gap: 1.8mm; font-size: 9.2pt; font-weight: 600; line-height: 1.45; }
.blk-exit-roster__q b { flex: none; display: grid; place-items: center; width: 4.4mm; height: 4.4mm; background: var(--doc-accent); color: #fff; font-size: 7pt; }
.blk-exit-roster__table { width: 100%; border-collapse: collapse; font-size: 8pt; }
.blk-exit-roster__table th,
.blk-exit-roster__table td { border: .25mm solid var(--hair-2); padding: 1.6mm 1.8mm; vertical-align: middle; }
.blk-exit-roster__table th { background: color-mix(in srgb, var(--doc-accent) 10%, #fff); font-weight: 700; color: var(--ink-2); text-align: center; }
.blk-exit-roster__table .is-num { width: 8mm; text-align: center; color: var(--ink-3); }
.blk-exit-roster__table .is-name { width: 42mm; }
.blk-exit-roster__table .is-write { height: 9mm; }
.blk-exit-roster__table .is-level { width: 16mm; text-align: center; }
.blk-exit-roster__table .is-level i { display: inline-block; width: 3.4mm; height: 3.4mm; border: .3mm solid var(--ink-3); border-radius: 0.4mm; }
.blk-exit-roster__foot { margin: auto 0 0; font-size: 7pt; color: var(--muted); }

.blk-answer-cards { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr 1fr; height: 100%; min-height: 200mm; border: .3mm dashed #94a3b8; }
.blk-answer-cards__guide { grid-column: 1 / -1; padding: 3.5mm 4mm; border-bottom: .3mm dashed #94a3b8; background: color-mix(in srgb, var(--doc-accent) 6%, #fff); }
.blk-answer-cards__title { margin: 0 0 2mm; font-family: var(--font-display); font-size: 10pt; font-weight: 700; color: var(--doc-accent); }
.blk-answer-cards__steps { margin: 0; padding-inline-start: 5mm; font-size: 8pt; line-height: 1.55; color: var(--ink-2); }
.blk-answer-cards__steps li { margin-bottom: 1.2mm; }
.blk-answer-card { display: grid; place-items: center; border-inline-start: .3mm dashed #94a3b8; border-top: .3mm dashed #94a3b8; }
.blk-answer-card:nth-child(2),
.blk-answer-card:nth-child(4) { border-inline-start: 0; }
.blk-answer-card:nth-child(2),
.blk-answer-card:nth-child(3) { border-top: 0; }
.blk-answer-card span { font-family: var(--font-display); font-size: 120pt; font-weight: 900; line-height: 1; color: var(--doc-accent); }
.blk-answer-cards__note--solo { grid-column: 1 / -1; margin: 0; padding: 2mm 3mm; border-bottom: .3mm dashed #94a3b8; font-size: 7.6pt; color: var(--muted); text-align: center; }

/* ------------------------------------------------------------------------
   توزيع المستويات: مكدس، حلقة، أعمدة متقابلة، خريطة أولويات
   لوحة متباعدة محسوبة التباين: طرف «ممتاز» الفيروزي، وطرف «ضعيف» البرتقالي
   المحمر، و«جيد» رمادي محايد في الوسط؛ والنسبة مكتوبة دائمًا بجانب اللون.
   ------------------------------------------------------------------------ */

.lv-excellent { --lv: #0b5d55; --lv-ink: #ffffff; }
.lv-very_good { --lv: #3c9a8b; --lv-ink: #0f172a; }
.lv-good { --lv: #d3d0c8; --lv-ink: #0f172a; }
.lv-acceptable { --lv: #eb9a5c; --lv-ink: #0f172a; }
.lv-weak { --lv: #b83c29; --lv-ink: #ffffff; }

.blk-stack__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1mm 4mm;
    margin: -0.6mm 0 2mm;
    font-size: 7.6pt;
    color: var(--ink-2);
}

.blk-stack__legend span,
.blk-donut__legend span,
.blk-diverge__side {
    display: inline-flex;
    align-items: center;
    gap: 1.4mm;
}

.blk-stack__legend i,
.blk-donut__legend i,
.blk-diverge__side i {
    width: 2.6mm;
    height: 2.6mm;
    background: var(--lv, var(--doc-accent));
    flex: none;
}

.blk-stack__row {
    display: grid;
    grid-template-columns: minmax(20mm, 27%) 1fr auto;
    gap: 2.5mm;
    align-items: center;
    margin-bottom: 1.3mm;
    font-size: 8.2pt;
}

.blk-stack.is-half .blk-stack__row {
    grid-template-columns: minmax(16mm, 32%) 1fr auto;
}

.blk-stack__label {
    color: var(--ink-2);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blk-stack__label em {
    font-style: normal;
    color: var(--muted);
    font-weight: 500;
    font-size: 7pt;
    margin-inline-start: 1.2mm;
}

.blk-stack__bar {
    display: flex;
    gap: 0.45mm;
    height: 4.4mm;
    background: var(--paper);
}

.blk-stack__seg {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0.6mm;
    background: var(--lv);
    color: var(--lv-ink);
    font-size: 6.8pt;
    font-weight: 700;
    overflow: hidden;
}

.blk-stack__value {
    font-size: 7.8pt;
    font-weight: 700;
    color: var(--ink);
    min-width: 9mm;
    text-align: left;
}

.blk-donut__body {
    display: grid;
    grid-template-columns: 32mm 1fr;
    gap: 4mm;
    align-items: center;
}

.blk-donut svg {
    width: 32mm;
    height: 32mm;
    display: block;
}

.blk-donut__seg {
    stroke: var(--lv);
}

.blk-donut__value {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 800;
    fill: var(--ink);
}

.blk-donut__label {
    font-size: 7px;
    font-weight: 600;
    fill: var(--muted);
}

.blk-donut__legend {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 7.8pt;
}

.blk-donut__legend li {
    display: grid;
    grid-template-columns: 1fr auto 11mm;
    gap: 2mm;
    padding: 0.7mm 0;
    border-bottom: 0.2mm solid var(--hair);
    color: var(--ink-2);
}

.blk-donut__legend bdi {
    font-weight: 700;
    color: var(--ink);
    text-align: left;
}

.blk-donut__share {
    color: var(--muted) !important;
    font-weight: 600 !important;
}

.blk-diverge__head,
.blk-diverge__row,
.blk-diverge__axis {
    display: grid;
    grid-template-columns: minmax(20mm, 24%) 1fr 1fr;
    align-items: center;
}

.blk-diverge__head {
    font-size: 7.6pt;
    color: var(--ink-2);
    font-weight: 600;
    margin-bottom: 1.2mm;
}

.blk-diverge__side.is-start { --lv: #0b5d55; justify-content: flex-start; padding-inline-start: 1mm; }
.blk-diverge__side.is-end { --lv: #b83c29; justify-content: flex-start; padding-inline-start: 1mm; }

.blk-diverge__row {
    margin-bottom: 1.1mm;
    font-size: 8.2pt;
}

.blk-diverge__label {
    color: var(--ink-2);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-inline-end: 2mm;
}

.blk-diverge__track {
    display: flex;
    align-items: center;
    gap: 1.2mm;
    height: 4mm;
}

/* الجهة الأولى تنمو من الخط المركزي نحو اليمين، والثانية نحو اليسار. */
.blk-diverge__track.is-start {
    flex-direction: row-reverse;
    justify-content: flex-start;
    border-inline-end: 0.3mm solid var(--ink-3);
    padding-inline-end: 0;
}

.blk-diverge__track.is-end {
    justify-content: flex-start;
}

.blk-diverge__track.is-start .blk-diverge__fill { background: #0b5d55; }
.blk-diverge__track.is-end .blk-diverge__fill { background: #b83c29; }

.blk-diverge__fill {
    display: block;
    height: 100%;
    min-width: 0.4mm;
}

.blk-diverge__value {
    font-size: 7.4pt;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
}

.blk-diverge__axis {
    font-size: 6.6pt;
    color: var(--muted);
    margin-top: 0.4mm;
}

.blk-diverge__axis > span {
    display: flex;
    justify-content: space-between;
    border-top: 0.2mm solid var(--hair-2);
    padding-top: 0.4mm;
}

.blk-quad__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.4mm;
}

.blk-quad__cell {
    border: 0.25mm solid var(--tone-line);
    border-inline-start: 1.1mm solid var(--tone);
    background: var(--tone-soft);
    padding: 2.4mm 3mm 2.6mm;
}

.blk-quad__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 2mm;
    font-family: var(--font-display);
    font-size: 9pt;
    color: var(--tone);
}

.blk-quad__head span {
    font-size: 8pt;
    font-weight: 800;
}

.blk-quad__hint {
    margin: 0.4mm 0 1.4mm;
    font-size: 7.2pt;
    color: var(--ink-3);
    line-height: 1.55;
}

.blk-quad__cell ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8mm 3mm;
    font-size: 8pt;
}

.blk-quad__cell li {
    display: flex;
    justify-content: space-between;
    gap: 1.5mm;
    color: var(--ink);
    font-weight: 600;
    border-bottom: 0.2mm dotted var(--tone-line);
}

.blk-quad__cell li bdi {
    color: var(--ink-3);
    font-weight: 700;
}

.blk-quad__empty {
    margin: 0;
    font-size: 7.6pt;
    color: var(--muted);
}

/* «حِصّة»: أنماط الحصة في منحناها، وحالات أدلة بطاقة الملاحظة. */
.lv-mode-launch { --lv: #94a3b8; --lv-ink: #0f172a; }
.lv-mode-teach { --lv: #1f4e79; --lv-ink: #ffffff; }
.lv-mode-practice { --lv: #0b8a6f; --lv-ink: #ffffff; }
.lv-mode-check { --lv: #d98b2b; --lv-ink: #0f172a; }
.lv-ev-planned { --lv: #0b8a6f; --lv-ink: #ffffff; }
.lv-ev-conditional { --lv: #d9a441; --lv-ink: #0f172a; }
.lv-ev-outside { --lv: #cbd5e1; --lv-ink: #0f172a; }

/* «حِصّة»: قراءة مريحة على A4 مع فصل واضح بين الترويسة والمحتوى. */
body.document-character-hissa {
    font-size: 10.5pt;
    line-height: 1.68;
}

.document-character-hissa .lh--official,
.document-character-hissa .lh--centered,
.document-character-hissa .lh--modern,
.document-character-hissa .lh--minimal,
.document-character-hissa .lh--compact,
.document-character-hissa .lh--band {
    flex: none;
    margin-bottom: 9mm;
}

.document-character-hissa .blk-table {
    font-size: 10pt;
    line-height: 1.55;
}

.document-character-hissa .blk-table th {
    font-size: 9pt;
    padding: 1.8mm 2.5mm;
}

.document-character-hissa .blk-table td {
    padding: 2.1mm 2.5mm;
}

.document-character-hissa .blk-table__sub,
.document-character-hissa .blk-caption {
    font-size: 8.5pt;
    line-height: 1.55;
}

.document-character-hissa .blk-metric__label,
.document-character-hissa .blk-metric__note,
.document-character-hissa .pill,
.document-character-hissa .blk-badge,
.document-character-hissa .blk-stack__seg,
.document-character-hissa .blk-stack__value,
.document-character-hissa .blk-donut__share,
.document-character-hissa .blk-sign__line {
    font-size: 8.5pt;
}

/* شارات مرحلة الدليل قد تحمل أسماء طويلة؛ تُلف داخل عمودها بدل أن تتداخل مع نص الشاهد. */
.document-character-hissa.document-variant-visitor .blk-table--data .blk-badge {
    box-sizing: border-box;
    max-width: 100%;
    padding-inline: 1.2mm;
    white-space: normal;
    line-height: 1.35;
    overflow-wrap: break-word;
}

.document-character-hissa .blk-sign__role {
    font-size: 9pt;
}

.document-character-hissa .blk-donut__label {
    font-size: 11px;
}

.document-character-hissa .blk-hero__fact span,
.document-character-hissa .blk-hero__fact em,
.document-character-hissa .blk-question__method,
.document-character-hissa .blk-question__note span {
    font-size: 8.5pt;
}

.document-character-hissa .blk-hero__fact strong,
.document-character-hissa .blk-callout p,
.document-character-hissa .blk-bullets,
.document-character-hissa .blk-question__stem {
    font-size: 10.5pt;
}

.document-character-hissa .blk-callout__title,
.document-character-hissa .blk-columns h4,
.document-character-hissa .blk-branches__label {
    font-size: 9.5pt;
}

.document-character-hissa .blk-columns li,
.document-character-hissa .blk-branches__item p,
.document-character-hissa .blk-question__note p,
.document-character-hissa .blk-question__why {
    font-size: 9.2pt;
    line-height: 1.55;
}

.document-character-hissa .blk-decision__facts dt,
.document-character-hissa .blk-decision__label,
.document-character-hissa .blk-decision__with span,
.document-character-hissa .blk-steps__row--head > span,
.document-character-hissa .blk-steps__lead em,
.document-character-hissa .blk-question__spec span {
    font-size: 8pt;
}

.document-character-hissa .blk-decision__facts dd,
.document-character-hissa .blk-decision__reasons li,
.document-character-hissa .blk-steps__row > span,
.document-character-hissa .blk-question__options span,
.document-character-hissa .blk-question__spec p {
    font-size: 9.5pt;
}

.document-character-hissa .blk-decision__lead,
.document-character-hissa .blk-steps__time bdi {
    font-size: 10pt;
}

.document-character-hissa .blk-steps__time small {
    font-size: 8pt;
}

.document-character-hissa.document-variant-worksheet .blk-callout__title,
.document-character-hissa.document-variant-answers .blk-callout__title {
    font-size: 11pt;
}

.document-character-hissa.document-variant-worksheet .blk-callout p,
.document-character-hissa.document-variant-worksheet .blk-bullets,
.document-character-hissa.document-variant-answers .blk-callout p,
.document-character-hissa.document-variant-answers .blk-bullets {
    font-size: 11.5pt;
    line-height: 1.75;
}

.document-character-hissa.document-variant-exit .blk-ticket__head strong {
    font-size: 13pt;
}

.document-character-hissa.document-variant-exit .blk-ticket {
    padding: 2mm 4mm;
}

.document-character-hissa.document-variant-exit .blk-ticket__head {
    padding-bottom: 1.2mm;
}

.document-character-hissa.document-variant-exit .blk-ticket__head span {
    font-size: 9.5pt;
}

.document-character-hissa.document-variant-exit .blk-ticket__howto,
.document-character-hissa.document-variant-exit .blk-ticket__conf,
.document-character-hissa.document-variant-exit .blk-ticket__mark {
    font-size: 9pt !important;
    line-height: 1.5;
}

.document-character-hissa.document-variant-exit .blk-ticket__who {
    margin: 1.4mm 0 1mm;
    font-size: 9.5pt;
}

.document-character-hissa.document-variant-exit .blk-ticket__q {
    margin-top: 1mm;
}

.document-character-hissa.document-variant-exit .blk-ticket__q p {
    font-size: 11.5pt;
    line-height: 1.55;
}

.document-character-hissa.document-variant-exit .blk-ticket__q b {
    width: 5mm;
    height: 5mm;
    font-size: 9pt;
}

.document-character-hissa.document-variant-exit .blk-ticket__lines {
    height: calc(var(--lines) * 4.5mm);
    background: repeating-linear-gradient(to bottom, var(--paper) 0 4.25mm, var(--hair-2) 4.25mm 4.5mm);
}

.document-character-hissa.document-variant-exit .blk-ticket__conf,
.document-character-hissa.document-variant-exit .blk-ticket__mark {
    padding-top: 1mm;
}

.document-character-hissa.document-variant-exit .blk-ticket__mark {
    margin-top: .8mm;
}

.document-character-hissa.document-variant-exit .blk-ticket__foot {
    margin-top: .8mm;
    font-size: 8.2pt;
}

/* صفحة ملاحظات الزائر الأخيرة مخصصة للكتابة اليدوية بعد الطباعة. */
.document-character-hissa.document-variant-visitor .doc-page:last-child .blk-table--sign td {
    height: 25mm;
    vertical-align: top;
}
