/* ═══════════════════════════════════════════════════════════
   Knowledge Hub v2 — image-first cards, animated reveal
   =══════════════════════════════════════════════════════════ */

.kb-page,
.kb-single {
    --kb-emerald:  #10b981;
    --kb-emerald-d:#059669;
    --kb-amber:    #f59e0b;
    --kb-amber-d:  #d97706;
    --kb-violet:   #8b5cf6;
    --kb-violet-d: #6d28d9;
    --kb-sky:      #0ea5e9;
    --kb-sky-d:    #0369a1;
    --kb-rose:     #f43f5e;
    --kb-rose-d:   #be123c;
    --kb-teal:     #14b8a6;
    --kb-teal-d:   #0d9488;
    --kb-navy:     #0f172a;
    --kb-ink:      #1e293b;
    --kb-ink-mut:  #64748b;
    --kb-line:     #e2e8f0;
    --kb-bg:       #f7f9fc;
    --kb-card:     #ffffff;
    --kb-shadow-sm:0 4px 12px rgba(15,23,42,0.06);
    --kb-shadow:   0 12px 28px rgba(15,23,42,0.10);
    --kb-shadow-lg:0 28px 60px rgba(15,23,42,0.16);
    --kb-shadow-xl:0 40px 90px rgba(15,23,42,0.22);

    background: var(--kb-bg);
    color: var(--kb-ink);
    position: relative;
    overflow-x: hidden;
    font-family: 'Tajawal', 'Cairo', system-ui, -apple-system, sans-serif;
    direction: rtl;
}

/* Color-tied CSS variables per section */
.kb-page [class*="--emerald"] { --_c1: var(--kb-emerald); --_c2: var(--kb-emerald-d); --_ct: rgba(16,185,129,0.12); }
.kb-page [class*="--amber"]   { --_c1: var(--kb-amber);   --_c2: var(--kb-amber-d);   --_ct: rgba(245,158,11,0.14); }
.kb-page [class*="--violet"]  { --_c1: var(--kb-violet);  --_c2: var(--kb-violet-d);  --_ct: rgba(139,92,246,0.14); }
.kb-page [class*="--sky"]     { --_c1: var(--kb-sky);     --_c2: var(--kb-sky-d);     --_ct: rgba(14,165,233,0.14); }
.kb-page [class*="--rose"]    { --_c1: var(--kb-rose);    --_c2: var(--kb-rose-d);    --_ct: rgba(244,63,94,0.14); }
.kb-page [class*="--teal"]    { --_c1: var(--kb-teal);    --_c2: var(--kb-teal-d);    --_ct: rgba(20,184,166,0.14); }

/* ═════════════════ SCROLL REVEAL ═════════════════ */
[data-kb-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}
[data-kb-reveal].is-visible { opacity: 1; transform: none; }
/* Stagger inside a list */
.kb-list [data-kb-reveal]:nth-child(2)  { transition-delay: 0.06s; }
.kb-list [data-kb-reveal]:nth-child(3)  { transition-delay: 0.12s; }
.kb-list [data-kb-reveal]:nth-child(4)  { transition-delay: 0.18s; }
.kb-list [data-kb-reveal]:nth-child(5)  { transition-delay: 0.24s; }
.kb-list [data-kb-reveal]:nth-child(6)  { transition-delay: 0.30s; }
.kb-list [data-kb-reveal]:nth-child(n+7){ transition-delay: 0.34s; }
.kb-sections-nav [data-kb-reveal]:nth-child(2) { transition-delay: 0.08s; }
.kb-sections-nav [data-kb-reveal]:nth-child(3) { transition-delay: 0.16s; }
.kb-sections-nav [data-kb-reveal]:nth-child(4) { transition-delay: 0.24s; }
.kb-sections-nav [data-kb-reveal]:nth-child(5) { transition-delay: 0.32s; }

/* ═════════════════ HERO ═════════════════ */
.kb-hero {
    position: relative;
    padding: clamp(120px, 12vw, 180px) 0 clamp(140px, 10vw, 200px);
    color: #fff;
    isolation: isolate;
    overflow: hidden;
    min-height: 720px;
    display: flex;
    align-items: center;
}
.kb-hero__bg {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #0e4d3a 0%, #0f172a 50%, #1e1b4b 100%);
    z-index: -3;
    overflow: hidden;
}
.kb-hero__slides { position: absolute; inset: 0; }
.kb-hero__slide {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity 1.5s ease;
    filter: saturate(0.85);
}
.kb-hero__slide.is-active { opacity: 1; }

/* Photo mosaic (fallback when no admin-uploaded bg) */
.kb-hero__mosaic {
    position: absolute; inset: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 4px;
    filter: brightness(0.35) saturate(0.5);
    opacity: 0.6;
}
.kb-hero__mosaic-tile {
    background-size: cover;
    background-position: center;
    display: block;
}

.kb-hero__overlay {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 60% 80% at 100% 0%,  rgba(139, 92, 246, 0.65), transparent 55%),
        radial-gradient(ellipse 60% 80% at 0% 100%,  rgba(14, 165, 233, 0.60), transparent 55%),
        radial-gradient(ellipse 70% 60% at 50% 50%,  rgba(16, 185, 129, 0.45), transparent 65%),
        linear-gradient(180deg, rgba(6,10,20,0.60) 0%, rgba(6,10,20,0.85) 100%);
}
.kb-hero__grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(to right,  rgba(255,255,255,0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 70% 55% at 50% 50%, #000, transparent 85%);
}
.kb-hero__floaters { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.kb-hero__floater {
    position: absolute;
    color: rgba(255,255,255,0.14);
    font-size: 34px;
    animation: kb-float 8s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.35));
}
.kb-hero__floater--1 { top:  8%; inset-inline-start: 10%; color: rgba(245,158,11,0.42);  font-size: 42px; }
.kb-hero__floater--2 { top: 22%; inset-inline-end:   18%; color: rgba(139,92,246,0.42);   font-size: 28px; animation-delay: -2s; }
.kb-hero__floater--3 { top: 55%; inset-inline-end:    6%; color: rgba(16,185,129,0.42);   font-size: 38px; animation-delay: -4s; }
.kb-hero__floater--4 { top: 70%; inset-inline-start:  8%; color: rgba(14,165,233,0.42);   font-size: 34px; animation-delay: -6s; }
.kb-hero__floater--5 { top: 15%; inset-inline-end:   38%; color: rgba(244,63,94,0.35);   font-size: 22px; animation-delay: -3s; }
.kb-hero__floater--6 { top: 82%; inset-inline-end:   32%; color: rgba(245,158,11,0.35);  font-size: 26px; animation-delay: -5s; }
.kb-hero__floater--7 { top: 40%; inset-inline-start: 20%; color: rgba(20,184,166,0.30);  font-size: 30px; animation-delay: -7s; }
.kb-hero__floater--8 { top: 62%; inset-inline-start: 42%; color: rgba(139,92,246,0.30);  font-size: 24px; animation-delay: -1s; }
@keyframes kb-float {
    0%, 100% { transform: translateY(0) rotate(-8deg); }
    50%      { transform: translateY(-20px) rotate(8deg); }
}

.kb-hero__inner {
    position: relative; z-index: 2;
    max-width: 940px; margin: 0 auto;
    text-align: center;
}

.kb-hero__badge {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 24px;
    background: rgba(255,255,255,0.14);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.28);
    backdrop-filter: blur(14px);
    border-radius: 99px;
    font-size: 14px; font-weight: 800;
    margin-bottom: 24px;
    box-shadow: 0 10px 26px rgba(0,0,0,0.30);
}
.kb-hero__badge i { color: var(--kb-amber); font-size: 15px; }
.kb-hero__badge-dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--kb-amber);
    box-shadow: 0 0 0 0 rgba(245,158,11,0.7);
    animation: kb-pulse 1.8s ease-out infinite;
}
@keyframes kb-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(245,158,11,0.7); }
    100% { box-shadow: 0 0 0 14px rgba(245,158,11,0); }
}

.kb-hero__title {
    font-size: clamp(30px, 4.8vw, 56px);
    font-weight: 900;
    line-height: 1.15;
    margin: 0 0 18px;
    color: #fff;
    text-shadow: 0 4px 30px rgba(0,0,0,0.5);
    background: linear-gradient(120deg, #fff 20%, #fde68a 55%, var(--kb-amber) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.kb-hero__subtitle {
    font-size: clamp(16px, 1.9vw, 20px);
    font-weight: 700;
    color: rgba(255,255,255,0.94);
    margin: 0 0 22px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.kb-hero__intro {
    font-size: 15.5px; line-height: 1.9;
    color: rgba(255,255,255,0.82);
    max-width: 800px; margin: 0 auto 30px;
}
.kb-hero__intro p:first-child { margin-top: 0; }
.kb-hero__intro p:last-child  { margin-bottom: 0; }

/* Search bar */
.kb-search-wrap { max-width: 640px; margin: 0 auto; }
.kb-search {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 6px 6px 22px;
    background: #fff;
    border-radius: 99px;
    box-shadow: 0 26px 56px rgba(0,0,0,0.40),
                inset 0 0 0 1px rgba(255,255,255,0.20);
    position: relative;
}
.kb-search > i { color: var(--kb-emerald); font-size: 18px; padding-inline-start: 8px; }
.kb-search input {
    flex: 1; background: transparent; border: 0;
    padding: 15px 6px;
    font-size: 15.5px; font-family: inherit;
    color: var(--kb-ink); outline: none;
}
.kb-search input::placeholder { color: var(--kb-ink-mut); }
.kb-search__clear {
    background: rgba(15, 23, 42, 0.06); border: 0;
    width: 40px; height: 40px; border-radius: 50%;
    cursor: pointer; color: var(--kb-ink-mut);
    display: inline-flex; align-items: center; justify-content: center;
    transition: background 0.2s ease;
}
.kb-search__clear:hover { background: rgba(15, 23, 42, 0.14); }
.kb-search__stats {
    margin-top: 12px; font-size: 13px;
    color: rgba(255,255,255,0.80);
    min-height: 20px; text-align: center;
}
.kb-search__stats.is-active { font-weight: 700; }

/* Trending topics ticker */
.kb-hero__topics {
    display: inline-flex; align-items: center;
    gap: 10px; flex-wrap: wrap; justify-content: center;
    margin-top: 24px;
    padding: 12px 20px;
    background: rgba(255,255,255,0.06);
    border: 1px dashed rgba(255,255,255,0.14);
    border-radius: 99px;
    font-size: 13px;
    color: rgba(255,255,255,0.85);
}
.kb-hero__topics-label { color: var(--kb-amber); font-weight: 800; margin-inline-end: 4px; }
.kb-hero__topic {
    padding: 3px 12px;
    background: rgba(255,255,255,0.10);
    border-radius: 99px;
    font-weight: 700;
    transition: background 0.2s ease, transform 0.2s ease;
}
.kb-hero__topic:hover { background: rgba(245,158,11,0.25); transform: translateY(-2px); }

/* Stat pills */
.kb-hero__stats {
    display: flex; justify-content: center; gap: 18px; flex-wrap: wrap;
    margin-top: 34px;
    padding-top: 26px;
    border-top: 1px solid rgba(255,255,255,0.14);
}
.kb-hero__stat {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 12px 20px;
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    color: #fff;
    transition: transform 0.3s ease, background 0.3s ease;
}
.kb-hero__stat:hover { transform: translateY(-3px); background: rgba(255,255,255,0.14); }
.kb-hero__stat-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 12px;
    background: linear-gradient(135deg, var(--kb-amber), var(--kb-amber-d));
    color: #fff; font-size: 18px;
    box-shadow: 0 8px 18px rgba(245,158,11,0.35);
    flex-shrink: 0;
}
.kb-hero__stat-num {
    font-size: 22px; font-weight: 900; color: #fff;
    line-height: 1;
}
.kb-hero__stat-lbl { font-size: 12.5px; font-weight: 700; color: rgba(255,255,255,0.78); }

.kb-hero__wave {
    position: absolute; left: 0; right: 0; bottom: -1px;
    width: 100%; height: 80px;
    color: var(--kb-bg);
    z-index: 3;
    pointer-events: none;
}

/* ═════════════════ Buttons ═════════════════ */
.kb-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 30px;
    border-radius: 14px;
    font-size: 15px; font-weight: 800;
    border: 0; cursor: pointer;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
    line-height: 1; font-family: inherit;
}
.kb-btn--primary {
    background: linear-gradient(135deg, var(--kb-emerald), var(--kb-emerald-d));
    color: #fff;
    box-shadow: 0 14px 30px rgba(16,185,129,0.40);
}
.kb-btn--primary:hover { transform: translateY(-3px); box-shadow: 0 22px 44px rgba(16,185,129,0.55); color: #fff; }
.kb-btn--ghost {
    background: #fff;
    color: var(--kb-emerald-d);
    border: 2px solid var(--kb-emerald);
    box-shadow: var(--kb-shadow-sm);
}
.kb-btn--ghost:hover { background: var(--kb-emerald); color: #fff; transform: translateY(-3px); }
.kb-btn--wa {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #fff;
    box-shadow: 0 10px 22px rgba(37,211,102,0.35);
}
.kb-btn--wa:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgba(37,211,102,0.5); color: #fff; }

/* ═════════════════ Section head ═════════════════ */
.kb-section-wrap,
.kb-section { padding: clamp(64px, 7vw, 100px) 0; position: relative; }
.kb-section__head { text-align: center; margin-bottom: 44px; }
.kb-section__badge {
    display: block;
    align-items: center; gap: 8px;
    padding: 8px 22px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--kb-emerald-d);
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: 99px;
    font-size: 13.5px; font-weight: 800;
    margin: 0 auto 14px;
    width: max-content;
}
.kb-section__badge--emerald { background: rgba(16,185,129,0.14); color: var(--kb-emerald-d); border-color: rgba(16,185,129,0.35); }
.kb-section__badge--amber   { background: rgba(245,158,11,0.14); color: var(--kb-amber-d);   border-color: rgba(245,158,11,0.35); }
.kb-section__badge--violet  { background: rgba(139,92,246,0.14); color: var(--kb-violet-d);  border-color: rgba(139,92,246,0.35); }
.kb-section__badge--sky     { background: rgba(14,165,233,0.14); color: var(--kb-sky-d);     border-color: rgba(14,165,233,0.35); }
.kb-section__badge--rose    { background: rgba(244,63,94,0.14);  color: var(--kb-rose-d);    border-color: rgba(244,63,94,0.35); }
.kb-section__badge--teal    { background: rgba(20,184,166,0.14); color: var(--kb-teal-d);    border-color: rgba(20,184,166,0.35); }

.kb-section__title {
    font-size: clamp(24px, 3.4vw, 40px);
    font-weight: 900;
    color: var(--kb-navy);
    margin: 0 0 12px;
    position: relative;
    display: inline-block;
    padding-bottom: 14px;
    background: linear-gradient(120deg, var(--kb-navy) 30%, var(--_c1, var(--kb-emerald)) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.kb-section__title::after {
    content: '';
    position: absolute; left: 50%; bottom: 0;
    transform: translateX(-50%);
    width: 80px; height: 4px; border-radius: 2px;
    background: linear-gradient(90deg, var(--_c1, var(--kb-emerald)), var(--_c2, var(--kb-emerald-d)));
}
.kb-section__lead {
    font-size: 15.5px;
    color: var(--kb-ink-mut);
    margin: 8px auto 0;
    max-width: 720px;
    line-height: 1.85;
}

/* ═════════════════ Sections nav — photo cards ═════════════════ */
.kb-section-wrap--nav { background: #fff; }
.kb-sections-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.kb-nav-card {
    display: block;
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--kb-shadow);
    text-decoration: none;
    color: var(--kb-ink);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s ease;
    position: relative;
    isolation: isolate;
}
.kb-nav-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--kb-shadow-xl);
    color: var(--kb-ink);
}
.kb-nav-card__cover {
    position: relative;
    aspect-ratio: 4/3;
    background-size: cover;
    background-position: center;
    background-color: var(--_c1);
    overflow: hidden;
}
.kb-nav-card__cover-overlay {
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,0.15), transparent 60%),
        linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.75) 100%),
        linear-gradient(135deg, var(--_c1) 0%, var(--_c2) 100%);
    mix-blend-mode: multiply;
    opacity: 0.75;
    transition: opacity 0.4s ease;
}
.kb-nav-card:hover .kb-nav-card__cover-overlay { opacity: 0.55; }
.kb-nav-card__cover::before {
    /* subtle noise/grain */
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(to right, rgba(255,255,255,0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
}
.kb-nav-card__icon {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex; align-items: center; justify-content: center;
    width: 84px; height: 84px; border-radius: 24px;
    background: rgba(255,255,255,0.18);
    border: 2px solid rgba(255,255,255,0.35);
    backdrop-filter: blur(14px);
    color: #fff; font-size: 36px;
    box-shadow: 0 18px 36px rgba(0,0,0,0.30);
    z-index: 2;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.kb-nav-card:hover .kb-nav-card__icon { transform: translate(-50%, -50%) scale(1.12) rotate(-6deg); }
.kb-nav-card__count-pill {
    position: absolute;
    top: 14px; inset-inline-end: 14px;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(12px);
    border-radius: 99px;
    font-size: 12px; font-weight: 800;
    z-index: 2;
}
.kb-nav-card__count-pill i { font-size: 10px; color: var(--kb-amber); }
.kb-nav-card__body {
    padding: 20px 22px;
    border-top: 4px solid transparent;
    border-image: linear-gradient(90deg, var(--_c1), var(--_c2)) 1;
}
.kb-nav-card__title {
    font-size: 16px; font-weight: 900;
    color: var(--kb-navy);
    line-height: 1.4;
    margin-bottom: 6px;
}
.kb-nav-card__cta {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13px; font-weight: 800;
    color: var(--_c1);
}
.kb-nav-card__cta i { transition: transform 0.3s ease; }
.kb-nav-card:hover .kb-nav-card__cta i { transform: translateX(-6px); }

/* ═════════════════ Sections ═════════════════ */
.kb-section { scroll-margin-top: 100px; overflow: hidden; }
.kb-section--emerald { background: linear-gradient(180deg, #ffffff 0%, rgba(16,185,129,0.06) 100%); }
.kb-section--amber   { background: linear-gradient(180deg, #ffffff 0%, rgba(245,158,11,0.06) 100%); }
.kb-section--sky     { background: linear-gradient(180deg, #ffffff 0%, rgba(14,165,233,0.06) 100%); }
.kb-section--violet  { background: linear-gradient(180deg, #ffffff 0%, rgba(139,92,246,0.06) 100%); }
.kb-section--teal    { background: linear-gradient(180deg, #ffffff 0%, rgba(20,184,166,0.06) 100%); }
.kb-section--rose    { background: linear-gradient(180deg, #ffffff 0%, rgba(244,63,94,0.06) 100%); }
.kb-section--alt.kb-section--emerald { background: linear-gradient(180deg, rgba(16,185,129,0.05) 0%, #ffffff 100%); }
.kb-section--alt.kb-section--amber   { background: linear-gradient(180deg, rgba(245,158,11,0.05) 0%, #ffffff 100%); }
.kb-section--alt.kb-section--sky     { background: linear-gradient(180deg, rgba(14,165,233,0.05) 0%, #ffffff 100%); }
.kb-section--alt.kb-section--violet  { background: linear-gradient(180deg, rgba(139,92,246,0.05) 0%, #ffffff 100%); }
.kb-section--alt.kb-section--teal    { background: linear-gradient(180deg, rgba(20,184,166,0.05) 0%, #ffffff 100%); }

.kb-section__deco {
    position: absolute; pointer-events: none;
    color: var(--_c1);
    opacity: 0.05;
    z-index: 0;
}
.kb-section__deco--1 {
    top: 40px; inset-inline-start: 5%;
    font-size: 260px;
    transform: rotate(-15deg);
    filter: blur(1px);
}
.kb-section__deco--2 {
    bottom: 40px; inset-inline-end: 5%;
    font-size: 180px;
    transform: rotate(15deg);
    opacity: 0.04;
}
.kb-section > .container { position: relative; z-index: 1; }

/* ═════════════════ Article cards with image top ═════════════════ */
.kb-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}
.kb-item { position: relative; }
.kb-item[hidden] { display: none; }
.kb-item__link {
    display: flex; flex-direction: column;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: var(--kb-ink);
    box-shadow: var(--kb-shadow);
    border: 1px solid transparent;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s ease,
                border-color 0.4s ease;
    height: 100%;
}
.kb-item__link:hover {
    transform: translateY(-6px);
    box-shadow: var(--kb-shadow-lg);
    border-color: var(--_c1);
    color: var(--kb-ink);
}
.kb-item__thumb {
    position: relative;
    aspect-ratio: 16/10;
    background-color: var(--_c1);
    background-size: cover;
    background-position: center;
    overflow: hidden;
    isolation: isolate;
}
.kb-item__thumb-overlay {
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.55) 100%),
        linear-gradient(135deg, var(--_c1) 0%, var(--_c2) 100%);
    mix-blend-mode: multiply;
    opacity: 0.72;
    transition: opacity 0.4s ease, transform 0.6s ease;
}
.kb-item__link:hover .kb-item__thumb-overlay { opacity: 0.55; transform: scale(1.05); }
.kb-item__thumb-icon {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex; align-items: center; justify-content: center;
    width: 66px; height: 66px; border-radius: 18px;
    background: rgba(255,255,255,0.18);
    border: 2px solid rgba(255,255,255,0.35);
    backdrop-filter: blur(12px);
    color: #fff; font-size: 28px;
    box-shadow: 0 14px 28px rgba(0,0,0,0.30);
    z-index: 2;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.kb-item__link:hover .kb-item__thumb-icon { transform: translate(-50%, -50%) scale(1.15) rotate(-8deg); }
.kb-item__num {
    position: absolute;
    top: 14px; inset-inline-start: 14px;
    padding: 5px 12px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border-radius: 99px;
    font-size: 11.5px; font-weight: 900;
    z-index: 2;
    border: 1px solid rgba(255,255,255,0.20);
}
.kb-item__badge {
    position: absolute;
    top: 14px; inset-inline-end: 14px;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 12px;
    background: rgba(255,255,255,0.20);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.30);
    backdrop-filter: blur(12px);
    border-radius: 99px;
    font-size: 11px; font-weight: 800;
    z-index: 2;
}
.kb-item__badge i { font-size: 10px; color: var(--kb-amber); }
.kb-item__draft-flag {
    position: absolute;
    bottom: 14px; inset-inline-start: 14px;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 12px;
    background: linear-gradient(135deg, var(--kb-amber), var(--kb-amber-d));
    color: #1a1206;
    border-radius: 99px;
    font-size: 11px; font-weight: 900;
    z-index: 2;
    box-shadow: 0 6px 14px rgba(245,158,11,0.45);
}
.kb-item__body {
    padding: 22px 22px 20px;
    display: flex; flex-direction: column;
    flex: 1;
}
.kb-item__title {
    margin: 0 0 10px;
    font-size: 16.5px; font-weight: 900;
    color: var(--kb-navy);
    line-height: 1.45;
    transition: color 0.3s ease;
}
.kb-item__link:hover .kb-item__title { color: var(--_c1); }
.kb-item__excerpt {
    margin: 0 0 16px;
    font-size: 13.5px; color: var(--kb-ink-mut);
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* Tag chips on cards */
.kb-item__tags {
    display: flex; flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0 4px;
}
.kb-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px;
    background: var(--_ct, rgba(16,185,129,0.10));
    color: var(--_c1, var(--kb-emerald-d));
    border: 1px solid transparent;
    border-radius: 99px;
    font-size: 11px; font-weight: 700;
    text-decoration: none;
    line-height: 1.5;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}
.kb-chip:hover {
    background: var(--_c1);
    color: #fff;
    transform: translateY(-1px);
}
.kb-chip i { font-size: 9px; opacity: 0.7; }
.kb-chip--more {
    background: rgba(15,23,42,0.06);
    color: var(--kb-ink-mut);
    font-weight: 900;
}
.kb-chip--more:hover { background: rgba(15,23,42,0.12); color: var(--kb-navy); transform: none; }

.kb-item__foot {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px dashed var(--kb-line);
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px;
}
.kb-item__meta {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700;
    color: var(--kb-ink-mut);
}
.kb-item__meta i { color: var(--_c1); font-size: 12px; }
.kb-item__cta {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.5px; font-weight: 800;
    color: var(--_c1);
    transition: transform 0.3s ease;
}
.kb-item__cta i { transition: transform 0.3s ease; }
.kb-item__link:hover .kb-item__cta i { transform: translateX(-4px); }

.kb-empty,
.kb-empty-search {
    padding: 50px 40px;
    text-align: center;
    background: #fff;
    border: 1px dashed var(--kb-line);
    border-radius: 22px;
    color: var(--kb-ink-mut);
}
.kb-empty i,
.kb-empty-search i { font-size: 32px; color: var(--_c1, var(--kb-amber)); margin-bottom: 12px; display: block; }
.kb-empty-search p { margin: 0; font-weight: 700; font-size: 15px; }

/* ═════════════════ Final CTA ═════════════════ */
.kb-cta { padding: 60px 0 70px; }
.kb-cta__card {
    max-width: 860px; margin: 0 auto;
    text-align: center;
    padding: 52px clamp(24px, 4vw, 56px);
    background: linear-gradient(135deg, #f0fdf4 0%, #fef3c7 50%, #ede9fe 100%);
    border-radius: 28px;
    border: 1px solid rgba(16,185,129,0.20);
    box-shadow: var(--kb-shadow-lg);
    position: relative;
    overflow: hidden;
}
.kb-cta__glow {
    position: absolute; inset: -50px;
    background: radial-gradient(circle, rgba(16,185,129,0.18), transparent 60%);
    filter: blur(60px);
    z-index: 0;
    pointer-events: none;
}
.kb-cta__card > * { position: relative; z-index: 1; }
.kb-cta__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 76px; height: 76px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--kb-emerald), var(--kb-amber));
    color: #fff;
    font-size: 30px;
    margin: 0 auto 20px;
    box-shadow: 0 16px 32px rgba(16,185,129,0.30);
}
.kb-cta__title {
    font-size: clamp(24px, 2.8vw, 32px);
    font-weight: 900;
    color: var(--kb-navy);
    margin: 0 0 12px;
}
.kb-cta__desc {
    font-size: 15.5px; color: var(--kb-ink-mut);
    line-height: 1.85; margin: 0 0 24px;
}

/* ═══════════════════════════════════════════════════════════
   ARTICLE POPUP MODAL
   =══════════════════════════════════════════════════════════ */
.kb-modal {
    position: fixed; inset: 0;
    background: rgba(8, 12, 24, 0.72);
    backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 40px 20px;
    opacity: 0; pointer-events: none;
    transition: opacity 0.28s ease;
    overflow-y: auto;
    --_c1: var(--kb-emerald);
    --_c2: var(--kb-emerald-d);
}
.kb-modal[hidden] { display: none; }
.kb-modal.is-open { opacity: 1; pointer-events: auto; }

.kb-modal__card {
    position: relative;
    max-width: 860px;
    width: 100%;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.5);
    overflow: hidden;
    transform: scale(0.94) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    margin: auto 0;
}
.kb-modal.is-open .kb-modal__card { transform: none; }

.kb-modal__close {
    position: absolute;
    top: 18px;
    inset-inline-end: 18px;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--kb-navy);
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 18px;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.30);
    z-index: 3;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
    backdrop-filter: blur(10px);
}
.kb-modal__close:hover {
    background: var(--_c1);
    color: #fff;
    transform: scale(1.08) rotate(90deg);
}

/* Thumbnail header */
.kb-modal__thumb {
    position: relative;
    aspect-ratio: 21/9;
    background-color: var(--_c1);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.kb-modal__thumb-overlay {
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, transparent 20%, rgba(0,0,0,0.55) 100%),
        linear-gradient(135deg, var(--_c1) 0%, var(--_c2) 100%);
    mix-blend-mode: multiply;
    opacity: 0.72;
}
.kb-modal__thumb-icon {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex; align-items: center; justify-content: center;
    width: 84px; height: 84px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.38);
    backdrop-filter: blur(14px);
    color: #fff;
    font-size: 36px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
}
.kb-modal__chapter {
    position: absolute;
    top: 18px; inset-inline-start: 18px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border-radius: 99px;
    font-size: 12px; font-weight: 900;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.22);
}
.kb-modal__cat {
    position: absolute;
    bottom: 18px; inset-inline-start: 18px;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.20);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(12px);
    border-radius: 99px;
    font-size: 12.5px; font-weight: 800;
    z-index: 2;
}
.kb-modal__cat i { color: var(--kb-amber); font-size: 11px; }

/* Body */
.kb-modal__body {
    padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 44px) clamp(24px, 3vw, 36px);
}
.kb-modal__title {
    margin: 0 0 14px;
    font-size: clamp(22px, 2.6vw, 30px);
    font-weight: 900;
    line-height: 1.4;
    color: var(--kb-navy);
}
.kb-modal__meta {
    display: flex; gap: 14px; flex-wrap: wrap;
    color: var(--kb-ink-mut);
    font-size: 13px; font-weight: 700;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px dashed var(--kb-line);
}
.kb-modal__meta span { display: inline-flex; align-items: center; gap: 6px; }
.kb-modal__meta i { color: var(--_c1); font-size: 12px; }
.kb-modal__meta-draft {
    padding: 3px 10px;
    background: rgba(245, 158, 11, 0.14);
    color: var(--kb-amber-d);
    border-radius: 99px;
    font-weight: 900;
}
.kb-modal__meta-draft i { color: var(--kb-amber-d) !important; }

.kb-modal__content {
    font-size: 15.5px;
    line-height: 2;
    color: var(--kb-ink);
}
.kb-modal__content > *:first-child { margin-top: 0; }
.kb-modal__content > *:last-child  { margin-bottom: 0; }
.kb-modal__content h2 { font-size: clamp(19px, 2.2vw, 24px); margin: 26px 0 12px; color: var(--kb-navy); font-weight: 900; }
.kb-modal__content h3 { font-size: clamp(17px, 1.9vw, 21px); margin: 22px 0 10px; color: var(--kb-navy); font-weight: 900; }
.kb-modal__content p  { margin: 0 0 16px; }
.kb-modal__content ul,
.kb-modal__content ol { margin: 0 0 16px; padding-inline-start: 22px; }
.kb-modal__content li { margin: 0 0 6px; }
.kb-modal__content a  { color: var(--_c1); font-weight: 700; }
.kb-modal__content img { max-width: 100%; height: auto; border-radius: 12px; margin: 16px 0; }
.kb-modal__content blockquote {
    margin: 20px 0;
    padding: 16px 20px;
    border-inline-start: 4px solid var(--_c1);
    background: rgba(15, 23, 42, 0.04);
    border-radius: 10px;
    font-style: italic;
    color: var(--kb-ink);
}

/* Placeholder state (draft article, empty content) */
.kb-modal__placeholder {
    text-align: center;
    padding: 30px 20px;
}
.kb-modal__placeholder i {
    font-size: 42px;
    color: var(--_c1);
    display: block;
    margin-bottom: 14px;
}
.kb-modal__placeholder h3 {
    margin: 0 0 8px;
    font-size: 20px; font-weight: 900;
    color: var(--kb-navy);
}
.kb-modal__placeholder p {
    color: var(--kb-ink-mut);
    font-size: 14.5px;
    margin: 0 0 16px;
}
.kb-modal__placeholder blockquote {
    display: inline-block;
    margin: 12px 0 0;
    padding: 12px 18px;
    background: rgba(15, 23, 42, 0.04);
    border-radius: 12px;
    font-size: 13.5px;
    color: var(--kb-ink-mut);
    font-style: italic;
    max-width: 480px;
}

/* Tags row inside the modal */
.kb-modal__tags {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 8px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px dashed var(--kb-line);
}
.kb-modal__tags[hidden] { display: none; }
.kb-modal__tags-label {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 800;
    color: var(--kb-navy);
    margin-inline-end: 4px;
}
.kb-modal__tags-label i { color: var(--_c1); font-size: 12px; }
.kb-modal__tags .kb-chip { font-size: 12px; padding: 4px 12px; }

.kb-modal__foot {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px dashed var(--kb-line);
    display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end;
}
.kb-modal__foot .kb-btn--primary {
    background: linear-gradient(135deg, var(--_c1), var(--_c2));
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.20);
}
.kb-modal__foot .kb-btn--primary:hover {
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.32);
}
.kb-modal__foot .kb-btn--ghost {
    color: var(--kb-ink);
    border-color: var(--kb-line);
}
.kb-modal__foot .kb-btn--ghost:hover {
    background: var(--kb-line);
    color: var(--kb-navy);
    border-color: var(--kb-line);
}

@media (max-width: 640px) {
    .kb-modal { padding: 20px 12px; }
    .kb-modal__thumb { aspect-ratio: 16/10; }
    .kb-modal__thumb-icon { width: 64px; height: 64px; font-size: 28px; }
    .kb-modal__foot { flex-direction: column; }
    .kb-modal__foot .kb-btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .kb-modal, .kb-modal__card, .kb-modal__close { transition: none !important; }
}

/* Cursor hint on cards (they now open a modal, but the anchor still works for right-click) */
.kb-item__link[data-kb-open] { cursor: pointer; }

/* ═══════════════════════════════════════════════════════════
   SINGLE ARTICLE — magazine layout
   =══════════════════════════════════════════════════════════ */
.kb-single { padding-bottom: 60px; overflow-x: clip; }
.kb-single [class*="--emerald"] { --_c1: var(--kb-emerald); --_c2: var(--kb-emerald-d); --_ct: rgba(16,185,129,0.14); }
.kb-single [class*="--amber"]   { --_c1: var(--kb-amber);   --_c2: var(--kb-amber-d);   --_ct: rgba(245,158,11,0.16); }
.kb-single [class*="--violet"]  { --_c1: var(--kb-violet);  --_c2: var(--kb-violet-d);  --_ct: rgba(139,92,246,0.16); }
.kb-single [class*="--sky"]     { --_c1: var(--kb-sky);     --_c2: var(--kb-sky-d);     --_ct: rgba(14,165,233,0.16); }
.kb-single [class*="--rose"]    { --_c1: var(--kb-rose);    --_c2: var(--kb-rose-d);    --_ct: rgba(244,63,94,0.16); }
.kb-single [class*="--teal"]    { --_c1: var(--kb-teal);    --_c2: var(--kb-teal-d);    --_ct: rgba(20,184,166,0.16); }
.kb-single.kb-single--emerald   { --_c1: var(--kb-emerald); --_c2: var(--kb-emerald-d); --_ct: rgba(16,185,129,0.14); }
.kb-single.kb-single--amber     { --_c1: var(--kb-amber);   --_c2: var(--kb-amber-d);   --_ct: rgba(245,158,11,0.16); }
.kb-single.kb-single--violet    { --_c1: var(--kb-violet);  --_c2: var(--kb-violet-d);  --_ct: rgba(139,92,246,0.16); }
.kb-single.kb-single--sky       { --_c1: var(--kb-sky);     --_c2: var(--kb-sky-d);     --_ct: rgba(14,165,233,0.16); }
.kb-single.kb-single--rose      { --_c1: var(--kb-rose);    --_c2: var(--kb-rose-d);    --_ct: rgba(244,63,94,0.16); }
.kb-single.kb-single--teal      { --_c1: var(--kb-teal);    --_c2: var(--kb-teal-d);    --_ct: rgba(20,184,166,0.16); }

/* ─── Reading progress bar ─── */
.kb-single__progress {
    position: fixed; top: 0; inset-inline: 0;
    height: 4px; z-index: 9999;
    background: rgba(15,23,42,0.06);
    pointer-events: none;
}
.kb-single__progress > span {
    display: block; width: 0; height: 100%;
    background: linear-gradient(90deg, var(--_c1), var(--_c2));
    box-shadow: 0 0 12px var(--_c1);
    transition: width 0.08s linear;
}

/* ─── HERO ─── */
.kb-single__hero {
    position: relative;
    padding: clamp(110px, 12vw, 170px) 0 clamp(90px, 8vw, 130px);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
    min-height: clamp(420px, 60vh, 620px);
    display: flex; align-items: center;
}
.kb-single__hero-photo {
    position: absolute; inset: -8%;
    background-size: cover; background-position: center;
    filter: blur(14px) saturate(0.85) brightness(0.55);
    transform: scale(1.15);
    z-index: -3;
    animation: kbSingleHeroDrift 24s ease-in-out infinite alternate;
}
@keyframes kbSingleHeroDrift {
    0%   { transform: scale(1.15) translate(0, 0); }
    100% { transform: scale(1.22) translate(-2%, -3%); }
}
.kb-single__hero-veil {
    position: absolute; inset: 0; z-index: -2;
    background:
        radial-gradient(ellipse 90% 100% at 50% 100%, rgba(0,0,0,0.55) 0%, transparent 70%),
        linear-gradient(180deg, rgba(15,23,42,0.30) 0%, rgba(15,23,42,0.70) 100%);
}
.kb-single__hero-bg {
    position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(ellipse 60% 80% at 100% 0%, var(--_ct) 0%, transparent 55%),
        radial-gradient(ellipse 50% 60% at 0% 100%, rgba(255,255,255,0.08) 0%, transparent 60%);
    mix-blend-mode: soft-light;
}
.kb-single__hero-bg::after {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(to right,  rgba(255,255,255,0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 70% 80% at 50% 40%, #000, transparent 90%);
}
/* fallback (no photo) */
.kb-single__hero:not(:has(.kb-single__hero-photo)) .kb-single__hero-veil {
    background: linear-gradient(135deg, var(--_c1) 0%, var(--_c2) 55%, #0f172a 130%);
}

.kb-single__crumbs {
    display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px;
    padding: 9px 20px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.24);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-radius: 99px;
    font-size: 12.5px; font-weight: 700;
    color: rgba(255,255,255,0.92);
    margin-bottom: 20px;
}
.kb-single__crumbs a { color: rgba(255,255,255,0.92); text-decoration: none; transition: color 0.2s ease; }
.kb-single__crumbs a:hover { color: #fde68a; }
.kb-single__crumbs-sep { opacity: 0.55; }
.kb-single__crumbs-current { color: #fde68a; font-weight: 800; }

.kb-single__cat-chip {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--_c1), var(--_c2));
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 99px;
    font-size: 13.5px; font-weight: 800;
    text-decoration: none;
    margin-bottom: 22px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.30), 0 0 0 6px rgba(255,255,255,0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.kb-single__cat-chip:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0,0,0,0.35), 0 0 0 6px rgba(255,255,255,0.08); color: #fff; }
.kb-single__cat-chip i { color: #fff; font-size: 14px; }

.kb-single__title {
    font-size: clamp(28px, 4.2vw, 52px);
    font-weight: 900;
    line-height: 1.25;
    margin: 0 0 20px;
    color: #fff;
    text-shadow: 0 6px 30px rgba(0,0,0,0.40);
    max-width: 1000px;
    letter-spacing: -0.01em;
}
.kb-single__lede {
    max-width: 780px;
    font-size: clamp(15px, 1.5vw, 18.5px);
    line-height: 1.75;
    color: rgba(255,255,255,0.88);
    margin: 0 0 26px;
    font-weight: 500;
    text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.kb-single__meta {
    display: flex; gap: 10px; flex-wrap: wrap;
    color: rgba(255,255,255,0.95);
    font-size: 13px; font-weight: 700;
}
.kb-single__meta-item {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 99px;
}
.kb-single__meta-item i { color: #fde68a; font-size: 12px; }

.kb-single__scroll-cue {
    position: absolute;
    bottom: 24px; left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.55);
    font-size: 20px;
    animation: kbBounce 2s ease-in-out infinite;
}
@keyframes kbBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(8px); }
}

/* ─── BODY GRID ─── */
.kb-single__wrap { margin-top: -60px; position: relative; z-index: 2; padding-bottom: 20px; }
.kb-single__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
    align-items: start;
}
.kb-single__main { position: relative; min-width: 0; }

/* ─── Fixed floating share bar (desktop) ─── */
.kb-single__share-float {
    position: fixed;
    top: 50%; right: 18px;
    transform: translateY(-50%);
    z-index: 100;
    display: flex; flex-direction: column; gap: 10px; align-items: center;
    padding: 14px 10px;
    background: rgba(255,255,255,0.75);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    backdrop-filter: blur(20px) saturate(1.6);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 999px;
    box-shadow:
        0 20px 40px rgba(15,23,42,0.10),
        0 8px 16px rgba(15,23,42,0.06),
        inset 0 1px 0 rgba(255,255,255,0.8);
    animation: kbShareIn 0.5s ease 0.2s both;
}
@keyframes kbShareIn {
    from { opacity: 0; transform: translate(30px, -50%); }
    to   { opacity: 1; transform: translate(0, -50%); }
}
.kb-single__share-label {
    font-size: 10.5px; font-weight: 800;
    color: var(--_c1);
    letter-spacing: 0.16em; text-transform: uppercase;
    margin-bottom: 2px;
    padding: 4px 10px;
    background: var(--_ct);
    border-radius: 99px;
}
.kb-single__share-btn {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 50%;
    background: #fff;
    border: 1px solid var(--kb-line);
    color: var(--kb-ink);
    font-size: 15px; text-decoration: none;
    box-shadow: 0 2px 6px rgba(15,23,42,0.06);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
}
.kb-single__share-btn:hover {
    transform: translateY(-2px) scale(1.12);
    box-shadow: 0 10px 24px rgba(15,23,42,0.18);
}
.kb-single__share-btn:active { transform: translateY(0) scale(0.95); }
.kb-single__share-btn--wa:hover   { background: #25d366; color: #fff; border-color: #25d366; }
.kb-single__share-btn--fb:hover   { background: #1877f2; color: #fff; border-color: #1877f2; }
.kb-single__share-btn--tw:hover   { background: #0f172a; color: #fff; border-color: #0f172a; }
.kb-single__share-btn--li:hover   { background: #0a66c2; color: #fff; border-color: #0a66c2; }
.kb-single__share-btn--copy:hover { background: var(--_c1); color: #fff; border-color: var(--_c1); }
.kb-single__share-btn.is-copied   { background: var(--_c1); color: #fff; border-color: var(--_c1); }
/* Tooltip on hover */
.kb-single__share-btn[title] { position: relative; }
.kb-single__share-btn[title]::after {
    content: attr(title);
    position: absolute;
    top: 50%; right: calc(100% + 12px);
    transform: translateY(-50%) translateX(6px);
    padding: 5px 10px;
    background: var(--kb-navy);
    color: #fff;
    font-size: 11px; font-weight: 800;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 5;
}
.kb-single__share-btn[title]::before {
    content: '';
    position: absolute;
    top: 50%; right: calc(100% + 6px);
    transform: translateY(-50%) translateX(6px);
    border: 5px solid transparent;
    border-inline-start-color: var(--kb-navy);
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 5;
}
.kb-single__share-btn[title]:hover::after,
.kb-single__share-btn[title]:hover::before {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* ─── CONTENT CARD ─── */
.kb-single__content {
    background: #fff;
    border-radius: 24px;
    padding: clamp(28px, 4vw, 56px) clamp(24px, 4vw, 52px);
    box-shadow: var(--kb-shadow);
    border: 1px solid var(--kb-line);
    font-size: 16.5px;
    line-height: 2.05;
    color: var(--kb-ink);
    position: relative;
}
.kb-single__content::before {
    content: '';
    position: absolute;
    top: 0; right: 40px;
    width: 60px; height: 4px;
    background: linear-gradient(90deg, var(--_c1), var(--_c2));
    border-radius: 0 0 4px 4px;
}

/* Drop-cap on first paragraph */
.kb-single__content > p:first-of-type::first-letter {
    float: right;
    font-size: 3.6em;
    font-weight: 900;
    line-height: 0.92;
    padding: 4px 12px 0 12px;
    margin: 4px 0 0 12px;
    color: var(--_c1);
    background: var(--_ct);
    border-radius: 12px;
}

.kb-single__content h2 {
    position: relative;
    font-size: clamp(22px, 2.6vw, 30px);
    margin: 40px 0 18px;
    padding-inline-end: 18px;
    color: var(--kb-navy);
    font-weight: 900;
    line-height: 1.35;
}
.kb-single__content h2::before {
    content: '';
    position: absolute;
    top: 8px; right: -18px;
    width: 5px; height: calc(100% - 12px);
    background: linear-gradient(180deg, var(--_c1), var(--_c2));
    border-radius: 4px;
}
.kb-single__content h3 {
    font-size: clamp(19px, 2.1vw, 25px);
    margin: 32px 0 14px;
    color: var(--kb-navy);
    font-weight: 900;
    display: flex; align-items: baseline; gap: 12px;
}
.kb-single__content h3::before {
    content: '';
    width: 12px; height: 12px; border-radius: 4px;
    background: var(--_c1);
    flex-shrink: 0;
    transform: rotate(45deg);
}
.kb-single__content h4 {
    font-size: 18px; margin: 24px 0 12px; color: var(--kb-navy); font-weight: 800;
}
.kb-single__content p  { margin: 0 0 20px; }
.kb-single__content ul, .kb-single__content ol {
    margin: 0 0 22px;
    padding-inline-start: 8px;
    list-style: none;
}
.kb-single__content ul li,
.kb-single__content ol li {
    position: relative;
    padding-inline-start: 28px;
    margin: 0 0 12px;
    line-height: 1.9;
}
.kb-single__content ul li::before {
    content: '';
    position: absolute;
    top: 12px; right: 6px;
    width: 10px; height: 10px;
    background: linear-gradient(135deg, var(--_c1), var(--_c2));
    border-radius: 3px;
    transform: rotate(45deg);
    box-shadow: 0 0 0 3px var(--_ct);
}
.kb-single__content ol { counter-reset: kbol; }
.kb-single__content ol li { counter-increment: kbol; padding-inline-start: 40px; }
.kb-single__content ol li::before {
    content: counter(kbol);
    position: absolute;
    top: 4px; right: 0;
    width: 26px; height: 26px;
    background: linear-gradient(135deg, var(--_c1), var(--_c2));
    color: #fff;
    border-radius: 8px;
    font-size: 12.5px; font-weight: 900;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.10);
}
.kb-single__content a {
    color: var(--_c2);
    font-weight: 700;
    text-decoration: none;
    background-image: linear-gradient(var(--_c1), var(--_c1));
    background-size: 100% 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    padding-bottom: 2px;
    transition: color 0.2s ease, background-size 0.2s ease;
}
.kb-single__content a:hover { color: #fff; background-size: 100% 100%; background-image: linear-gradient(var(--_c1), var(--_c1)); border-radius: 4px; padding: 2px 6px; }

.kb-single__content img {
    max-width: 100%; height: auto; border-radius: 16px;
    margin: 26px 0;
    box-shadow: var(--kb-shadow);
    border: 1px solid var(--kb-line);
}
.kb-single__content blockquote {
    position: relative;
    margin: 30px 0;
    padding: 28px 60px 24px 28px;
    background: linear-gradient(135deg, var(--_ct) 0%, rgba(255,255,255,0) 100%);
    border-inline-end: 4px solid var(--_c1);
    border-radius: 16px;
    font-size: 17px;
    font-weight: 600;
    color: var(--kb-navy);
    line-height: 1.9;
}
.kb-single__content blockquote::before {
    content: '\f10e';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 14px; right: 20px;
    font-size: 30px;
    color: var(--_c1);
    opacity: 0.45;
}
.kb-single__content blockquote p:last-child { margin-bottom: 0; }
.kb-single__content strong { color: var(--kb-navy); font-weight: 900; }
.kb-single__content code {
    padding: 2px 8px; border-radius: 6px;
    background: var(--_ct);
    color: var(--_c2);
    font-size: 0.9em;
    font-family: 'Consolas', 'Menlo', monospace;
    direction: ltr; display: inline-block;
}
.kb-single__content pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 14px;
    overflow-x: auto;
    margin: 24px 0;
    font-family: 'Consolas', 'Menlo', monospace;
    line-height: 1.7;
    direction: ltr; text-align: left;
}
.kb-single__content pre code { background: transparent; color: inherit; padding: 0; }
.kb-single__content hr {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--kb-line), transparent);
    margin: 34px 0;
}
.kb-single__content table {
    width: 100%; border-collapse: collapse; margin: 24px 0;
    border-radius: 12px; overflow: hidden;
    border: 1px solid var(--kb-line);
    font-size: 14.5px;
}
.kb-single__content th {
    background: var(--_ct);
    color: var(--kb-navy);
    font-weight: 900;
    padding: 12px 16px; text-align: start;
}
.kb-single__content td {
    padding: 12px 16px;
    border-top: 1px solid var(--kb-line);
}
.kb-single__content tr:nth-child(even) td { background: rgba(15,23,42,0.02); }

.kb-single__placeholder { text-align: center; padding: 40px 20px; }
.kb-single__placeholder i { font-size: 44px; color: var(--_c1, var(--kb-amber)); margin-bottom: 14px; display: block; }
.kb-single__placeholder h3 { margin: 0 0 8px; font-size: 22px; color: var(--kb-navy); display: block; }
.kb-single__placeholder h3::before { content: none; }
.kb-single__placeholder p  { color: var(--kb-ink-mut); margin: 0 0 20px; }

/* ─── Tags ─── */
.kb-single__tags {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 8px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px dashed var(--kb-line);
}
.kb-single__tags-label {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13.5px; font-weight: 800;
    color: var(--kb-navy);
    margin-inline-end: 4px;
}
.kb-single__tags-label i { color: var(--_c1); font-size: 12px; }
.kb-single__tags .kb-chip { font-size: 12.5px; padding: 5px 14px; }

/* ─── Inline share (mobile) ─── */
.kb-single__share-inline {
    display: none;
    margin-top: 20px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--kb-line);
    border-radius: 18px;
    box-shadow: var(--kb-shadow-sm);
}
.kb-single__share-inline-label {
    display: block;
    font-size: 13px; font-weight: 800; color: var(--kb-navy);
    margin-bottom: 12px;
}
.kb-single__share-inline-label i { color: var(--_c1); margin-inline-end: 6px; }
.kb-single__share-inline-btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* ─── Prev / Next pager ─── */
.kb-single__pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 30px;
}
.kb-single__pager-item {
    display: flex; flex-direction: column;
    gap: 8px;
    padding: 20px 22px;
    background: #fff;
    border: 1px solid var(--kb-line);
    border-radius: 18px;
    text-decoration: none;
    color: var(--kb-ink);
    box-shadow: var(--kb-shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    min-height: 92px;
}
.kb-single__pager-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--kb-shadow);
    border-color: var(--_c1);
}
.kb-single__pager-item--next { text-align: start; }
.kb-single__pager-item--prev { text-align: end; }
.kb-single__pager-item--empty { visibility: hidden; }
.kb-single__pager-dir {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 11.5px; font-weight: 800;
    color: var(--_c1);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.kb-single__pager-item--prev .kb-single__pager-dir { justify-content: flex-end; }
.kb-single__pager-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14.5px; font-weight: 800;
    color: var(--kb-navy);
    line-height: 1.5;
}

/* ─── CTA card ─── */
.kb-single__cta { margin: 30px 0 0; }
.kb-single__cta-card {
    position: relative;
    text-align: center;
    padding: 40px clamp(20px, 4vw, 44px);
    background: linear-gradient(135deg, var(--_ct) 0%, #fff 100%);
    border-radius: 24px;
    border: 1px solid var(--kb-line);
    box-shadow: var(--kb-shadow-sm);
    overflow: hidden;
    isolation: isolate;
}
.kb-single__cta-card::before {
    content: '';
    position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(circle 200px at 100% 0%, var(--_c1), transparent 70%),
        radial-gradient(circle 200px at 0% 100%, var(--_c2), transparent 70%);
    opacity: 0.10;
}
.kb-single__cta-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 66px; height: 66px; border-radius: 20px;
    background: linear-gradient(135deg, var(--_c1), var(--_c2));
    color: #fff; font-size: 26px;
    margin-bottom: 16px;
    box-shadow: 0 14px 28px rgba(0,0,0,0.18);
}
.kb-single__cta-card h3 { margin: 0 0 8px; font-size: 24px; font-weight: 900; color: var(--kb-navy); }
.kb-single__cta-card p  { margin: 0 0 22px; color: var(--kb-ink-mut); font-size: 15px; }
.kb-single__cta-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ═════ SIDEBAR ═════ */
.kb-single__side {
    position: sticky;
    top: 20px;
    display: flex; flex-direction: column;
    gap: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--_c1) transparent;
}
.kb-single__side::-webkit-scrollbar { width: 6px; }
.kb-single__side::-webkit-scrollbar-thumb { background: var(--_c1); border-radius: 3px; }

/* ─── TOC — larger & more readable ─── */
.kb-single__toc {
    background: #fff;
    border: 1px solid var(--kb-line);
    border-radius: 20px;
    padding: 26px 28px;
    box-shadow: var(--kb-shadow-sm);
    position: relative;
    overflow: hidden;
}
.kb-single__toc::before {
    content: '';
    position: absolute;
    top: 0; inset-inline-start: 0;
    width: 5px; height: 100%;
    background: linear-gradient(180deg, var(--_c1), var(--_c2));
}
.kb-single__toc-title {
    display: flex; align-items: center; gap: 12px;
    margin: 0 0 20px;
    padding: 8px 14px;
    font-size: 15px; font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, var(--_c1), var(--_c2));
    border-radius: 12px;
    box-shadow: 0 8px 18px -6px var(--_c1);
    width: fit-content;
}
.kb-single__toc-title i { color: #fff; font-size: 16px; }
.kb-single__toc-nav ol {
    list-style: none;
    padding: 0; margin: 0;
    counter-reset: kbtoc;
}
.kb-single__toc-nav li { margin: 0 0 6px; }
.kb-single__toc-nav li:last-child { margin-bottom: 0; }
.kb-single__toc-nav a {
    counter-increment: kbtoc;
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--kb-ink);
    font-size: 14.5px; font-weight: 700;
    line-height: 1.65;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    position: relative;
}
.kb-single__toc-nav a::before {
    content: counter(kbtoc, decimal-leading-zero);
    flex-shrink: 0;
    font-size: 12.5px;
    font-weight: 900;
    color: var(--_c1);
    background: var(--_ct);
    padding: 5px 9px;
    border-radius: 8px;
    min-width: 32px;
    text-align: center;
    line-height: 1.4;
    transition: background 0.2s ease, color 0.2s ease;
}
.kb-single__toc-nav a:hover  { background: rgba(15,23,42,0.03); color: var(--kb-navy); transform: translateX(-2px); }
.kb-single__toc-nav a.is-active {
    background: var(--_ct);
    color: var(--_c2);
    font-weight: 800;
}
.kb-single__toc-nav a.is-active::before { background: var(--_c1); color: #fff; }
.kb-single__toc-nav li.is-h3 a { padding-inline-start: 28px; font-size: 13.5px; padding-block: 9px; }
.kb-single__toc-nav li.is-h3 a::before { display: none; }
.kb-single__toc-nav li.is-h3 a::after {
    content: '';
    position: absolute;
    inset-inline-start: 16px; top: 18px;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--_c1); opacity: 0.55;
}

/* ─── Related section — FULL-WIDTH at end of article ─── */
.kb-related-section {
    margin: 40px 0 0;
    padding: 32px clamp(20px, 3vw, 40px);
    background: #fff;
    border: 1px solid var(--kb-line);
    border-radius: 24px;
    box-shadow: var(--kb-shadow-sm);
    position: relative;
    overflow: hidden;
}
.kb-related-section::before {
    content: '';
    position: absolute;
    top: 0; inset-inline-start: 0;
    width: 100%; height: 5px;
    background: linear-gradient(90deg, var(--_c1), var(--_c2));
}
.kb-related-section__head {
    display: flex; align-items: center; gap: 16px;
    margin: 0 0 26px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--kb-line);
}
.kb-related-section__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 54px; height: 54px; border-radius: 16px;
    background: linear-gradient(135deg, var(--_c1), var(--_c2));
    color: #fff; font-size: 22px;
    flex-shrink: 0;
    box-shadow: 0 10px 22px -6px var(--_c1);
}
.kb-related-section__title {
    margin: 0 0 4px;
    font-size: clamp(20px, 2vw, 24px);
    font-weight: 900;
    color: var(--kb-navy);
    line-height: 1.35;
}
.kb-related-section__sub {
    margin: 0;
    font-size: 13.5px;
    color: var(--kb-ink-mut);
    font-weight: 600;
}
.kb-related-section__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.kb-related-card {
    display: flex; flex-direction: column;
    background: #fff;
    border: 1px solid var(--kb-line);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: var(--kb-ink);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
    box-shadow: 0 2px 6px rgba(15,23,42,0.04);
}
.kb-related-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -14px rgba(15,23,42,0.20);
    border-color: var(--_c1);
}
.kb-related-card__thumb {
    position: relative;
    height: 160px;
    background: linear-gradient(135deg, var(--_c1) 0%, var(--_c2) 100%);
    background-size: cover;
    background-position: center;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.85);
    font-size: 46px;
    overflow: hidden;
}
.kb-related-card__thumb::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.35) 100%);
    opacity: 0; transition: opacity 0.3s ease;
}
.kb-related-card:hover .kb-related-card__thumb::after { opacity: 1; }
.kb-related-card__time {
    position: absolute;
    top: 12px; inset-inline-start: 12px;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px;
    background: rgba(0,0,0,0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 11px; font-weight: 800;
    border-radius: 99px;
    z-index: 2;
}
.kb-related-card__time i { color: var(--_c1); font-size: 10px; }
.kb-related-card__body {
    display: flex; flex-direction: column;
    gap: 14px;
    padding: 18px 20px 20px;
    flex: 1;
}
.kb-related-card__title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    font-size: 15px; font-weight: 800;
    color: var(--kb-navy);
    line-height: 1.5;
    flex: 1;
    transition: color 0.25s ease;
}
.kb-related-card:hover .kb-related-card__title { color: var(--_c2); }
.kb-related-card__cta {
    display: inline-flex; align-items: center; gap: 6px;
    align-self: flex-start;
    padding: 6px 14px;
    background: var(--_ct);
    color: var(--_c2);
    font-size: 12.5px; font-weight: 800;
    border-radius: 99px;
    transition: background 0.25s ease, color 0.25s ease, gap 0.25s ease;
}
.kb-related-card:hover .kb-related-card__cta {
    background: var(--_c1); color: #fff; gap: 10px;
}

/* ─── Related ─── */
.kb-single__related {
    background: #fff;
    border: 1px solid var(--kb-line);
    border-radius: 18px;
    padding: 20px 22px;
    box-shadow: var(--kb-shadow-sm);
}
.kb-single__related-title {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 14px;
    font-size: 15px; font-weight: 900;
    color: var(--kb-navy);
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--kb-line);
}
.kb-single__related-title i { color: var(--_c1); }
.kb-single__related-list { list-style: none; padding: 0; margin: 0; }
.kb-single__related-list li { margin: 0; }
.kb-single__related-list a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 6px;
    text-decoration: none;
    color: var(--kb-ink);
    border-bottom: 1px dashed var(--kb-line);
    transition: background 0.2s ease;
}
.kb-single__related-list li:last-child a { border-bottom: 0; }
.kb-single__related-list a:hover { background: rgba(15,23,42,0.03); }
.kb-single__related-list a:hover .kb-single__related-name { color: var(--_c2); }
.kb-single__related-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 52px; height: 52px; border-radius: 12px;
    background: var(--_ct);
    color: var(--_c1);
    font-size: 16px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}
.kb-single__related-icon img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.kb-single__related-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.kb-single__related-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13.5px; font-weight: 700;
    line-height: 1.5;
    color: var(--kb-navy);
    transition: color 0.2s ease;
}
.kb-single__related-time {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 700;
    color: var(--kb-ink-mut);
}
.kb-single__related-time i { color: var(--_c1); font-size: 10px; }
.kb-single__related-arrow { color: var(--_c1); font-size: 11px; flex-shrink: 0; }

/* ─── Side CTA ─── */
.kb-single__side-cta {
    text-align: center;
    padding: 24px 20px;
    background: linear-gradient(160deg, #25d366 0%, #128c7e 100%);
    color: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(37,211,102,0.30);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.kb-single__side-cta::before {
    content: '\f232';
    font-family: 'Font Awesome 5 Brands';
    font-weight: 400;
    position: absolute; z-index: -1;
    bottom: -20px; left: -10px;
    font-size: 100px;
    color: rgba(255,255,255,0.10);
}
.kb-single__side-cta-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 50px; height: 50px; border-radius: 14px;
    background: rgba(255,255,255,0.20);
    font-size: 22px;
    margin-bottom: 10px;
}
.kb-single__side-cta h4 { margin: 0 0 6px; font-size: 17px; font-weight: 900; color: #fff; }
.kb-single__side-cta p { margin: 0 0 16px; font-size: 13px; color: rgba(255,255,255,0.90); line-height: 1.6; }
.kb-single__side-cta-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 22px;
    background: #fff;
    color: #128c7e;
    font-size: 13.5px; font-weight: 900;
    border-radius: 99px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kb-single__side-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.20); color: #128c7e; }

/* ─── Toast ─── */
.kb-single__toast {
    position: fixed;
    bottom: 30px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 24px;
    background: var(--kb-navy);
    color: #fff;
    font-size: 14px; font-weight: 700;
    border-radius: 99px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.30);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}
.kb-single__toast i { color: #34d399; font-size: 18px; }
.kb-single__toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═════════════════ Single responsive ═════════════════ */
@media (max-width: 1280px) {
    .kb-single__share-float { right: 10px; padding: 12px 8px; gap: 8px; }
    .kb-single__share-float .kb-single__share-btn { width: 38px; height: 38px; font-size: 14px; }
    .kb-single__share-label { font-size: 9.5px; padding: 3px 8px; }
    .kb-related-section__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
    .kb-single__grid { grid-template-columns: 1fr; }
    .kb-single__side {
        position: static;
        max-height: none;
        overflow: visible;
        order: 2;
        margin-top: 20px;
    }
    .kb-single__share-float { display: none; }
    .kb-single__share-inline { display: block; }
    /* TOC visible now on tablet too */
}
@media (max-width: 720px) {
    .kb-related-section__grid { grid-template-columns: 1fr; }
    .kb-related-card__thumb { height: 180px; }
}
@media (max-width: 640px) {
    .kb-single__wrap { margin-top: -40px; }
    .kb-single__content { padding: 24px 20px; }
    .kb-single__content > p:first-of-type::first-letter { font-size: 3em; padding: 2px 8px; margin: 2px 0 0 8px; }
    .kb-single__content blockquote { padding: 22px 50px 20px 20px; }
    .kb-single__pager { grid-template-columns: 1fr; }
    .kb-single__cta-actions .kb-btn { flex: 1; justify-content: center; }
    .kb-single__meta { gap: 8px; }
    .kb-single__meta-item { padding: 6px 12px; font-size: 12px; }
    .kb-single__toc { padding: 22px 20px; }
    .kb-single__toc-nav a { font-size: 13.5px; padding: 10px 12px; }
    .kb-related-section { padding: 24px 20px; }
    .kb-related-section__head { gap: 12px; }
    .kb-related-section__icon { width: 46px; height: 46px; font-size: 18px; }
}

/* ═════════════════ Responsive ═════════════════ */
@media (max-width: 900px) {
    .kb-hero__stats { gap: 12px; }
    .kb-hero__stat { padding: 10px 14px; }
    .kb-hero__stat-icon { width: 36px; height: 36px; font-size: 16px; }
    .kb-hero__stat-num { font-size: 18px; }
    .kb-list { grid-template-columns: 1fr; }
    .kb-single__cta-actions .kb-btn { flex: 1; justify-content: center; }
    .kb-section__deco--1 { font-size: 180px; }
    .kb-section__deco--2 { display: none; }
}
@media (max-width: 640px) {
    .kb-hero { padding-top: 80px; padding-bottom: 100px; min-height: 620px; }
    .kb-hero__floater { display: none; }
    .kb-hero__mosaic { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); }
    .kb-search { padding: 4px 4px 4px 14px; }
    .kb-search input { padding: 12px 4px; font-size: 14px; }
    .kb-hero__topics { display: none; }
    .kb-nav-card__icon { width: 68px; height: 68px; font-size: 28px; }
    .kb-item__thumb-icon { width: 54px; height: 54px; font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    [data-kb-reveal] { opacity: 1; transform: none; transition: none; }
    .kb-hero__slide, .kb-hero__floater, .kb-hero__badge-dot { animation: none !important; transition: none !important; }
}
