/*
 * 🧰 صافي التحصيل · نقطة التعادل · عروض الباقات — ما يخصّها وحدَها.
 * الحقولُ والنتيجةُ والنسبُ والشريطُ والجدولُ من site-blog.css (vc-) و site-profit-calculator.css (pc-) — شكلٌ واحدٌ لكلّ الحاسبات.
 * ⛔ لا أصنافَ تبدأ بـ«bi-» أو «ri-» — حارسُ الأيقونات يمسح القوالب.
 */

/* تخطيطان: بلا خيار وضع (نقطة التعادل) · وبلا جدول (الباقات) — منطقةٌ فارغةٌ تُبقي فجوتَها */
.vc.pc.tk-nomode {
    grid-template-areas: "fields" "res" "scen";
}
.vc.pc.tk-noscen {
    grid-template-areas: "mode" "fields" "res";
}
.tk-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    min-width: 0;
}
.tk-group[hidden] {
    display: none;
}
.pc-pcts.tk-one {
    grid-template-columns: minmax(0, 1fr);
}
.tk-rows {
    margin-top: 10px;
}
.tk-unit {
    color: var(--muted);
    font-size: 14px;
    font-weight: 400;
}
.tk-example {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

/* الرقمُ الأوّل: نقطةُ التعادل بخطٍّ كبير */
.tk-hero {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg);
}
.tk-hero p {
    margin: 0;
}
.tk-hero-k {
    color: var(--ink);
    font-weight: 500;
}
.tk-hero-v {
    color: var(--ink);
    font-size: 40px;
    font-weight: 700;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
}
.tk-hero-v span {
    color: var(--muted);
    font-size: 16px;
    font-weight: 500;
}
.tk-hero-f {
    color: var(--muted);
    font-size: 14px;
}

/* الرسم: SVG بمقياسٍ واحد — اتّجاهُه من اليسار (الكمّيّةُ تزيد يميناً)، و«text-anchor» تنقلب في صفحةٍ عربيّة لولا ذلك */
.tk-chart {
    margin-top: 16px;
    padding: 12px 12px 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg);
}
.tk-chart svg {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 640 / 280;
    direction: ltr;
}
.be-axis { stroke: var(--line-strong); stroke-width: 1; }
.be-rev { stroke: var(--pc-profit); stroke-width: 3; stroke-linecap: round; }
.be-cost { stroke: var(--pc-cost); stroke-width: 3; stroke-linecap: round; }
.be-fixed { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 6 5; }
.be-guide { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 4; }
.be-dot { fill: var(--bg); stroke: var(--ink); stroke-width: 2.5; }
.be-tick { fill: var(--muted); font-size: 19px; font-variant-numeric: tabular-nums; }
.be-tick-be { fill: var(--ink); font-weight: 700; }
.be-caption { fill: var(--muted); font-size: 17px; }
.tk-chart-legend {
    margin-top: 6px;
}
.tk-sw-rev { background: var(--pc-profit); }
.tk-sw-cost { background: var(--pc-cost); }
.tk-sw-fixed { background: var(--muted); }

/* منتجاتُ الباقة: صفٌّ لكلّ منتج بثلاث خانات — أصغرُ من حقول الحاسبة كي تتّسع لثلاثٍ على 320px (و16px كي لا يكبّر سفاري) */
.tk-items-h {
    margin: 0 0 8px;
    color: var(--ink);
    font-weight: 500;
}
.tk-items-head,
.tk-item {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px 8px;
}
.tk-items-head span {
    color: var(--muted);
    font-size: 13px;
}
.tk-item + .tk-item {
    margin-top: 10px;
}
.tk-item-n {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}
.tk-cell {
    min-width: 0;
}
.tk-cell input {
    width: 100%;
    height: 44px;
    padding: 0 10px;
    border: 1px solid var(--faint);
    border-radius: 10px;
    background: var(--bg);
    color: var(--ink);
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.tk-cell input:focus-visible {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}
.tk-cell input[aria-invalid="true"] {
    border-color: var(--vc-err);
    color: var(--vc-err);
}
.tk-cell .vc-msg {
    margin-top: 4px;
    font-size: 12.5px;
    line-height: 1.5;
}
.tk-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (min-width: 768px) {
    .vc.pc.tk-nomode {
        grid-template-rows: auto auto;
        grid-template-areas: "fields res" "scen scen";
    }
    .vc.pc.tk-noscen {
        grid-template-rows: auto 1fr;
        grid-template-areas: "mode res" "fields res";
    }
}
@media (max-width: 767.98px) {
    .tk-hero-v {
        font-size: 32px;
    }
}
