/* ==========================================================
   LIVING EFFECTS: Pustaka Ceria International
   Master v3.1 — Single-file Cinematic Edition
   ========================================================== */

/* ==========================================
   1. PRELOADER
   ========================================== */
#kd-preloader {
    transition: opacity 0.6s ease-out, visibility 0.6s;
}
#kd-preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ==========================================
   2. GLASSMORPHISM PREMIUM
   ========================================== */
.glass-panel {
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
[data-theme="dark"] .glass-panel {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.glass-chip {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* ==========================================
   3. TEXT GRADIENT ANIMASI
   ========================================== */
.text-gradient {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 30%, #fbbf24 70%, #f87171 100%);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 6s ease infinite;
    font-weight: 900;
    filter: drop-shadow(0 0 18px rgba(167, 139, 250, 0.35));
}
@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ==========================================
   4. KARTU 3D TILT + CARD SPOTLIGHT
   ========================================== */
.kd-tilt-card {
    position: relative;
    transform-style: preserve-3d;
    will-change: transform;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.kd-tilt-card .kd-pop-cover,
.kd-tilt-card .card-image {
    transform: translateZ(25px);
}
.kd-tilt-card::after {
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%),
                rgba(96, 165, 250, 0.16), rgba(167, 139, 250, 0.08) 45%, transparent 70%);
}
.kd-tilt-card:hover::after { opacity: 1; }

.kd-item, .grid-item .card {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}
.kd-item:hover, .grid-item .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.2);
}

/* ==========================================
   5. HERO BASE + SLIDER FALLBACK
   ========================================== */
.kd-hero-pro {
    position: relative;
    min-height: 650px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #fff;
}

.hero-bg-slider {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
}
.hero-slide {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: heroSlide 20s infinite ease-in-out; /* DIUBAH: 15s jadi 20s untuk 4 slide */
}
.slide-1 {
    background: linear-gradient(135deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.65) 100%), url('../assets/images/slide1.jpg');
    background-size: cover; background-position: center;
    animation-delay: 0s;
}
.slide-2 {
    background: linear-gradient(135deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.65) 100%), url('../assets/images/slide2.jpg');
    background-size: cover; background-position: center;
    animation-delay: 5s;
}
.slide-3 {
    background: linear-gradient(135deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.65) 100%), url('../assets/images/slide3.jpg');
    background-size: cover; background-position: center;
    animation-delay: 10s;
}
.slide-4 {
    background: linear-gradient(135deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.65) 100%), url('../assets/images/slide4.jpg');
    background-size: cover; background-position: center;
    animation-delay: 15s;
}
.hero-bg-slider::after {
    content: '';
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(3px);
}
@keyframes heroSlide {
    0%   { opacity: 0; transform: scale(1.08); }
    5%   { opacity: 1; transform: scale(1); }      /* Fade in (1 detik) */
    25%  { opacity: 1; transform: scale(1); }      /* Hold (4 detik) -> Total 5 detik per slide */
    30%  { opacity: 0; transform: scale(1.08); }   /* Fade out (1 detik) */
    100% { opacity: 0; transform: scale(1.08); }   /* Wait for next cycle (14 detik) -> Total 20 detik */
}

/* ==========================================
   6. HERO LAYERING
   ========================================== */
/* Layer 0: crossfade + Ken Burns */
.kd-hero-layer {
    position: absolute; inset: 0; z-index: 0;
    background-size: cover; background-position: center;
    opacity: 0; transform: scale(1.1);
    filter: brightness(0.55) saturate(0.85) contrast(1.05);
    transition: opacity 1.8s ease-in-out, transform 10s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}
.kd-hero-layer.is-active { opacity: 1; transform: scale(1); }

/* Layer 1: overlay gelap + vignette */
.kd-hero-overlay {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background:
        linear-gradient(180deg, rgba(2,6,23,.62) 0%, rgba(2,6,23,.38) 45%, rgba(2,6,23,.82) 100%),
        radial-gradient(120% 90% at 50% 15%, rgba(2,6,23,0) 35%, rgba(2,6,23,.60) 100%);
}

/* Layer 1b: AURORA ambient glow */
.kd-aurora {
    position: absolute; inset: -20%; z-index: 1;
    pointer-events: none;
    filter: blur(55px);
    opacity: 0.5;
}
.kd-aurora span {
    position: absolute;
    width: 45vmax; height: 45vmax;
    border-radius: 50%;
    animation: kdAurora 26s ease-in-out infinite alternate;
}
.kd-aurora span:nth-child(1) {
    top: -10%; left: -5%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.30), transparent 60%);
}
.kd-aurora span:nth-child(2) {
    top: 20%; right: -10%;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.26), transparent 60%);
    animation-delay: -8s; animation-duration: 32s;
}
.kd-aurora span:nth-child(3) {
    bottom: -15%; left: 30%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.16), transparent 60%);
    animation-delay: -16s; animation-duration: 38s;
}
@keyframes kdAurora {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(6vmax, -4vmax, 0) scale(1.15); }
    100% { transform: translate3d(-5vmax, 4vmax, 0) scale(0.95); }
}

/* Layer 2: ikon mengambang */
.hero-floating-icons {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}
.float-icon-1, .float-icon-2, .float-icon-3, .float-icon-4, .float-icon-5 {
    position: absolute;
    color: rgba(255, 255, 255, 0.12);
    animation: floatIcon 25s infinite linear;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
    transition: translate 0.4s ease-out;
}
.float-icon-1 { font-size: 9rem;  top: 10%; left: 5%;  animation-duration: 30s; }
.float-icon-2 { font-size: 7rem;  top: 65%; left: 85%; animation-duration: 35s; animation-delay: -5s; }
.float-icon-3 { font-size: 11rem; top: 75%; left: 10%; animation-duration: 40s; animation-delay: -10s; }
.float-icon-4 { font-size: 8rem;  top: 15%; left: 80%; animation-duration: 32s; animation-delay: -15s; }
.float-icon-5 { font-size: 6rem;  top: 40%; left: 50%; animation-duration: 28s; animation-delay: -8s; }
@keyframes floatIcon {
    0%   { transform: translateY(0) rotate(0deg); opacity: 0.08; }
    50%  { transform: translateY(-50px) rotate(10deg); opacity: 0.15; }
    100% { transform: translateY(0) rotate(0deg); opacity: 0.08; }
}

/* Layer 3: canvas partikel minimalis */
#tsparticles-hero {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 3;
    pointer-events: auto;
}

/* Layer 4: cursor spotlight */
.kd-hero-spotlight {
    position: absolute; inset: 0; z-index: 4;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    mix-blend-mode: screen;
}

/* Layer 10: konten */
.kd-hero-pro .kd-container {
    position: relative;
    z-index: 10;
    will-change: transform, opacity;
}

/* ==========================================
   7. TIPOGRAFI HERO
   ========================================== */
.hero-main-title {
    font-size: 4.2rem;
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 1.2rem;
    color: #ffffff;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 6px rgba(0,0,0,.55), 0 8px 40px rgba(0,0,0,.75);
}
.hero-subtitle {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.97);
    max-width: 800px;
    margin-bottom: 3.5rem;
    font-weight: 500;
    line-height: 1.7;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 10px rgba(0,0,0,.85), 0 6px 30px rgba(0,0,0,.60);
}
.kd-hero-pro .kd-quote {
    color: rgba(255, 255, 255, 0.90);
    font-style: italic;
    font-size: 1.15rem;
    margin-top: 1.5rem;
    text-shadow: 0 2px 8px rgba(0,0,0,.80);
}

/* ==========================================
   8. TYPEWRITER CARET
   ========================================== */
.kd-type-caret {
    display: inline-block;
    width: 3px; height: .9em;
    margin-left: .12em;
    background: #fbbf24;
    vertical-align: -0.08em;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.8);
    animation: kdBlink 1s steps(2) infinite;
}
@keyframes kdBlink { 50% { opacity: 0; } }

/* ==========================================
   9. TICKER MARQUEE
   ========================================== */
.kd-hero-ticker {
    position: absolute; left: 0; right: 0; bottom: 0;
    z-index: 9;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.kd-ticker-track {
    display: flex;
    width: max-content;
    padding: 0.65rem 0;
    animation: kdTicker 32s linear infinite;
}
.kd-hero-ticker:hover .kd-ticker-track { animation-play-state: paused; }
.kd-ticker-item {
    display: flex; align-items: center; gap: .5rem;
    margin-right: 2.5rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .10em;
    text-transform: uppercase;
    white-space: nowrap;
}
.kd-ticker-item i { color: #fbbf24; font-size: .7rem; }
@keyframes kdTicker { to { transform: translateX(-50%); } }

/* ==========================================
   10. SCROLL SYSTEM
   ========================================== */
.kd-scroll-progress {
    position: fixed; top: 0; left: 0;
    height: 3px; width: 0;
    z-index: 9999;
    pointer-events: none;
    background: linear-gradient(90deg, #60a5fa, #a78bfa, #fbbf24);
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.6);
}

.c-header {
    transition: box-shadow 0.35s ease, background 0.35s ease;
}
.c-header.is-scrolled {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.kd-back-top {
    position: fixed; right: 22px; bottom: 22px;
    z-index: 999;
    width: 46px; height: 46px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    opacity: 0; visibility: hidden;
    transform: translateY(14px);
    transition: all 0.35s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.kd-back-top.show {
    opacity: 1; visibility: visible;
    transform: none;
}
.kd-back-top:hover {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-color: transparent;
    transform: translateY(-3px);
}

/* ==========================================
   11. SCROLL REVEAL + UNDERLINE DRAW
   ========================================== */
.kd-reveal {
    opacity: 0;
    transform: translateY(28px) scale(.98);
    transition: opacity .7s ease, transform .7s cubic-bezier(.22, 1, .36, 1);
}
.kd-reveal.kd-in {
    opacity: 1;
    transform: none;
}
.kd-reveal .kd-underline {
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .9s cubic-bezier(.22, 1, .36, 1) .2s;
}
.kd-reveal.kd-in .kd-underline {
    transform: scaleX(1);
}

/* ==========================================
   12. BREADCRUMB (shared by detail + generic pages)
   ========================================== */
.kd-breadcrumb {
    display: flex; align-items: center; gap: 8px;
    font-size: 12.5px; color: var(--kd-muted, #64748b);
    margin-bottom: 14px;
}
.kd-breadcrumb a { color: var(--kd-muted, #64748b); text-decoration: none; }
.kd-breadcrumb a:hover { color: var(--kd-blue, #2563eb); }
.kd-breadcrumb > span { opacity: .5; }
.kd-breadcrumb > span:last-child { color: var(--kd-text, #0f172a); font-weight: 600; }

/* ==========================================
   13. DETAIL PAGE
   ========================================== */
.kd-detail-hero {
    position: relative;
    padding: 36px 0 18px;
    background: linear-gradient(180deg, rgba(2,6,23,.04) 0%, transparent 100%);
    border-bottom: 1px solid var(--kd-border, rgba(0,0,0,.08));
}
[data-theme="dark"] .kd-detail-hero { background: linear-gradient(180deg, rgba(15,23,42,.6) 0%, transparent 100%); }
.kd-detail-hero .kd-back {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--kd-muted, #64748b);
    font-size: 13px; font-weight: 600;
    text-decoration: none !important;
    padding: 6px 14px; border-radius: 10px;
    background: var(--kd-surface-2, rgba(0,0,0,.04));
    transition: all .25s ease;
}
.kd-detail-hero .kd-back:hover { background: var(--kd-blue-soft, #dbeafe); color: var(--kd-blue, #2563eb); }

.kd-detail {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    padding: 28px 0 60px;
    align-items: start;
}
@media (max-width: 900px) { .kd-detail { grid-template-columns: 1fr; } }

.kd-detail-main {
    background: var(--kd-surface, #fff);
    border: 1px solid var(--kd-border, rgba(0,0,0,.08));
    border-radius: 20px;
    padding: 28px 30px;
    box-shadow: var(--kd-shadow, 0 4px 20px rgba(0,0,0,.05));
}
.kd-detail-title {
    font-size: clamp(24px, 3.2vw, 34px);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -.02em;
    margin: 4px 0 12px;
    color: var(--kd-text, #0f172a);
}
.kd-byline {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    color: var(--kd-muted, #64748b);
    font-size: 14.5px;
    margin-bottom: 18px;
}
.kd-byline i { color: var(--kd-blue, #2563eb); }

.kd-detail-actions {
    display: flex; flex-wrap: wrap; gap: 10px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--kd-border, rgba(0,0,0,.08));
}
.kd-act-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 16px;
    border: 1px solid var(--kd-border, rgba(0,0,0,.1));
    border-radius: 11px;
    background: var(--kd-surface, #fff);
    color: var(--kd-text, #0f172a) !important;
    font-size: 13px; font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    transition: all .2s ease;
}
.kd-act-btn:hover {
    border-color: var(--kd-blue, #2563eb);
    color: var(--kd-blue, #2563eb) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37,99,235,.15);
}
.kd-act-btn.bg-success, .kd-act-primary {
    background: var(--kd-blue, #2563eb) !important;
    border-color: var(--kd-blue, #2563eb) !important;
    color: #fff !important;
}

.kd-tabs { margin-top: 8px; }
.kd-tabs-nav {
    display: flex; gap: 4px;
    border-bottom: 2px solid var(--kd-border, rgba(0,0,0,.08));
    margin-bottom: 22px;
    overflow-x: auto;
}
.kd-tab-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 18px;
    border: 0; background: none;
    color: var(--kd-muted, #64748b);
    font-size: 14px; font-weight: 700;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all .2s ease;
    white-space: nowrap;
    font-family: inherit;
}
.kd-tab-btn:hover { color: var(--kd-blue, #2563eb); }
.kd-tab-btn.active {
    color: var(--kd-blue, #2563eb);
    border-bottom-color: var(--kd-blue, #2563eb);
}
.kd-tab-btn sup {
    background: var(--kd-blue-soft, #dbeafe);
    color: var(--kd-blue, #2563eb);
    font-size: 10px; font-weight: 800;
    padding: 2px 7px; border-radius: 999px;
    margin-left: 2px;
}
.kd-tab-pane { display: none; animation: kdTabFade .35s ease; }
.kd-tab-pane.active { display: block; }
@keyframes kdTabFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.kd-note-box { background: var(--kd-surface-2, #f8fafc); }
.kd-note-head {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 10px;
    color: var(--kd-blue, #2563eb);
    font-size: 13px;
    letter-spacing: .02em;
}
.kd-note-body { color: var(--kd-text, #0f172a); line-height: 1.7; font-size: 14.5px; }

.kd-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 20px;
}
@media (max-width: 560px) { .kd-meta-grid { grid-template-columns: 1fr; } }
.kd-meta-item {
    background: var(--kd-surface-2, #f8fafc);
    border: 1px solid var(--kd-border, rgba(0,0,0,.06));
    border-radius: 12px;
    padding: 12px 14px;
}
.kd-meta-item span {
    display: block; font-size: 11px; font-weight: 700;
    letter-spacing: .05em; text-transform: uppercase;
    color: var(--kd-muted, #64748b);
    margin-bottom: 4px;
}
.kd-meta-item strong {
    display: block; font-size: 14px; font-weight: 700;
    color: var(--kd-text, #0f172a);
    line-height: 1.35;
}

.kd-subjects-block { margin-top: 22px; }
.kd-subjects-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.kd-subject-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px;
    background: linear-gradient(135deg, var(--kd-blue-soft, #dbeafe), #e0e7ff);
    color: var(--kd-blue, #1d4ed8) !important;
    border-radius: 999px;
    font-size: 12.5px; font-weight: 700;
    text-decoration: none !important;
    transition: all .2s ease;
}
.kd-subject-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(37,99,235,.25);
    background: var(--kd-blue, #2563eb);
    color: #fff !important;
}
.kd-subject-chip i { font-size: 10px; }

.kd-avail-hero {
    display: flex; align-items: center; gap: 16px;
    padding: 18px 20px;
    border-radius: 14px;
    margin-bottom: 18px;
    background: #ecfdf3;
    border: 1px solid #b7ebc9;
    color: #15803d;
}
.kd-avail-hero.no {
    background: #fef2f2; border-color: #fecaca; color: #b91c1c;
}
.kd-avail-icon {
    flex: 0 0 44px; height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,.6);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.kd-avail-hero strong { display: block; font-size: 16px; font-weight: 800; }
.kd-avail-hero small { font-size: 12.5px; opacity: .85; }

.kd-detail-side { position: sticky; top: 90px; }
@media (max-width: 900px) { .kd-detail-side { position: static; } }
.kd-cover-card {
    background: var(--kd-surface, #fff);
    border: 1px solid var(--kd-border, rgba(0,0,0,.08));
    border-radius: 20px;
    padding: 18px;
    box-shadow: var(--kd-shadow, 0 4px 20px rgba(0,0,0,.05));
}
.kd-cover-frame {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 2/3;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    margin-bottom: 14px;
    transform: translateZ(20px);
}
.kd-cover-frame img,
.kd-cover-frame .img-thumbnail {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;       
    object-fit: contain;              
    display: block;
    padding: 8px;
    box-sizing: border-box;
    border: 0;
    background: transparent;
    border-radius: 10px;
}
.kd-cover-shine {
    position: absolute; inset: 0;
    background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.18) 50%, transparent 65%);
    pointer-events: none;
    mix-blend-mode: screen;
}

/* Latar "rak buku" untuk letterbox agar sampul contain terlihat premium */
.kd-item-cover,
.kd-grid-cover,
.kd-cover-frame {
    background:
        radial-gradient(120% 70% at 50% 0%, rgba(96, 165, 250, .18), transparent 60%),
        linear-gradient(160deg, #243049, #0f172a 75%);
}

.kd-side-btn { margin-top: 8px; }

.kd-related { margin-top: 20px; }
.kd-related-head {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 12px;
    color: var(--kd-blue, #2563eb);
}
.kd-related-head i { font-size: 14px; }
.kd-related-head strong { font-size: 14px; font-weight: 800; color: var(--kd-text, #0f172a); }
.kd-related-list { display: flex; flex-direction: column; gap: 8px; }
.kd-related-item {
    display: flex; gap: 12px;
    padding: 10px;
    border-radius: 12px;
    text-decoration: none !important;
    transition: all .2s ease;
    border: 1px solid transparent;
}
.kd-related-item:hover {
    background: var(--kd-surface-2, #f8fafc);
    border-color: var(--kd-border, rgba(0,0,0,.08));
    transform: translateX(2px);
}
.kd-related-cover {
    flex: 0 0 44px; height: 60px;
    border-radius: 8px;
    background-size: contain;         
    background-repeat: no-repeat;
    background-position: center;
    background-color: #e2e8f0;
    display: inline-flex; align-items: center; justify-content: center;
}
.kd-related-cover-empty { color: #94a3b8; font-size: 16px; }
.kd-related-info { min-width: 0; display: flex; flex-direction: column; }
.kd-related-info strong {
    font-size: 13px; font-weight: 700; color: var(--kd-text, #0f172a);
    line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.kd-related-info small {
    margin-top: 3px;
    font-size: 11px; color: var(--kd-muted, #64748b);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.kd-section-block { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--kd-border, rgba(0,0,0,.08)); }
.kd-attachment-box {
    margin-top: 10px;
    background: var(--kd-surface-2, #f8fafc);
    border: 1px solid var(--kd-border, rgba(0,0,0,.06));
    border-radius: 12px;
    padding: 14px 16px;
}
.kd-empty-msg { color: var(--kd-muted, #64748b); font-size: 13px; text-align: center; padding: 20px; }
.kd-muted { color: var(--kd-muted, #64748b); }
.mt-2 { margin-top: 12px; }

/* ==========================================
   14. BIBLIO LIST
   ========================================== */
.kd-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--kd-surface, #fff);
    border: 1px solid var(--kd-border, rgba(0,0,0,.08));
    border-radius: 18px;
    margin-bottom: 16px;
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
}
.kd-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(96,165,250,.04), transparent 60%);
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}
.kd-item:hover {
    border-color: var(--kd-blue, #2563eb);
    box-shadow: 0 8px 24px rgba(37,99,235,.12);
    transform: translateY(-2px);
}
.kd-item:hover::before { opacity: 1; }

.kd-item-cover {
    flex: 0 0 110px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b, #0f172a);
}
.kd-cover-link {
    display: block;
    position: relative;
    aspect-ratio: auto;      /* tinggi mengikuti rasio asli sampul */
    overflow: hidden;
}
.kd-cover-img {
    width: 100%;
    height: auto;               /* sampul UTUH tanpa letterbox sama sekali */
    display: block;
    padding: 5px;
    box-sizing: border-box;
    transition: transform .4s ease;
}
.kd-item:hover .kd-cover-img { transform: scale(1.05); }
.kd-cover-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 78%, rgba(0,0,0,.22) 100%);
    pointer-events: none;
}
.kd-cover-badge {
    position: absolute;
    top: 8px; right: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex; align-items: center; gap: 4px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.kd-cover-badge.ok { background: rgba(34,197,94,.9); color: #fff; }
.kd-cover-badge.no { background: rgba(239,68,68,.9); color: #fff; }
.kd-cover-badge i { font-size: 10px; }

.kd-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.kd-item-title {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 8px;
    color: var(--kd-text, #0f172a);
}
.kd-item-title a {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease;
}
.kd-item-title a:hover { color: var(--kd-blue, #2563eb); }

.kd-authors {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.kd-author-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: var(--kd-surface-2, #f8fafc);
    border: 1px solid var(--kd-border, rgba(0,0,0,.08));
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--kd-text, #0f172a) !important;
    text-decoration: none !important;
    transition: all .2s ease;
}
.kd-author-chip:hover {
    background: var(--kd-blue, #2563eb);
    border-color: var(--kd-blue, #2563eb);
    color: #fff !important;
}
.kd-year {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--kd-muted, #64748b);
    font-weight: 600;
}
.kd-year i { font-size: 11px; }

.kd-item-side {
    flex: 0 0 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.kd-item-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}
.kd-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 38px;
    border: 1px solid var(--kd-border, rgba(0,0,0,.1));
    border-radius: 10px;
    background: var(--kd-surface, #fff);
    color: var(--kd-muted, #64748b) !important;
    text-decoration: none !important;
    transition: all .2s ease;
}
.kd-action-btn:hover {
    border-color: var(--kd-blue, #2563eb);
    color: var(--kd-blue, #2563eb) !important;
    background: var(--kd-blue-soft, #dbeafe);
}
.kd-action-btn i { font-size: 13px; }

.kd-grid-card {
    position: relative;
    border-radius: 18px !important;
    overflow: hidden;
    background: var(--kd-surface, #fff);
    border: 1px solid var(--kd-border, rgba(0,0,0,.08));
    transition: all .3s ease;
}
.kd-grid-card:hover {
    border-color: var(--kd-blue, #2563eb);
    box-shadow: 0 12px 32px rgba(37,99,235,.18);
}

.kd-grid-cover {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b, #0f172a);
}
.kd-grid-cover a {
    display: block;
    position: relative;
    width: 100%; height: 100%;
}
.kd-grid-img {
    width: 100%; height: 100%;
    object-fit: contain;              
    padding: 10px;
    box-sizing: border-box;
    transition: transform .4s ease;
}
.kd-grid-card:hover .kd-grid-img { transform: scale(1.08); }
.kd-grid-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.5) 100%);
    pointer-events: none;
    transition: opacity .3s ease;
}
.kd-grid-card:hover .kd-grid-overlay { opacity: .7; }
.kd-grid-badge {
    position: absolute;
    top: 10px; left: 10px;   /* FIX: ke kiri, menu titik-tiga tetap di kanan */
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex; align-items: center; gap: 5px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
    z-index: 2;
}
.kd-grid-badge.ok { background: rgba(34,197,94,.95); color: #fff; }
.kd-grid-badge.no { background: rgba(239,68,68,.95); color: #fff; }
.kd-grid-badge i { font-size: 11px; }

.kd-grid-title {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--kd-text, #0f172a) !important;
    text-decoration: none !important;
    transition: color .2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.kd-grid-title:hover { color: var(--kd-blue, #2563eb) !important; }

.kd-grid-unavail {
    background: #fef2f2 !important;
    color: #b91c1c !important;
    border: 0 !important;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
}
.kd-grid-unavail i { font-size: 13px; }

/* FIX: baris meta grid card mengikuti tema (sebelumnya putih bawaan Bootstrap) */
.kd-grid-card .list-group-item {
    background: var(--kd-surface-2);
    border-color: var(--kd-border);
    color: var(--kd-text);
    font-size: 12px;
    padding: 8px 12px;
    gap: 10px;
}
.kd-grid-card .list-group-item label {
    color: var(--kd-muted);
    font-weight: 700;
    flex: 0 0 auto;
}
.kd-grid-card .list-group-item span.text-right {
    color: var(--kd-text);
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.kd-grid-card .list-group-item.kd-grid-unavail {
    background: var(--kd-red-soft) !important;
    color: var(--kd-red) !important;
}

/* Tombol menu titik-tiga di atas cover grid */
.kd-grid-card .grid-item--menu .dropdown-toggle {
    width: 26px; height: 26px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px;
    background: rgba(15, 23, 42, .55);
    color: #fff;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background .2s ease;
}
.kd-grid-card .grid-item--menu .dropdown-toggle:hover { background: rgba(15, 23, 42, .85); }

/* ==========================================
   15. RESULTS PAGE
   ========================================== */
@keyframes kdCardIn {
    from { opacity: 0; transform: translateY(18px) scale(.98); }
    to   { opacity: 1; transform: none; }
}
@keyframes kdFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.kd-grid-wrap .kd-item.kd-card-in {
    animation: kdCardIn .55s cubic-bezier(.22, 1, .36, 1) backwards;
}
.kd-grid-wrap .grid-item.kd-card-in {
    animation: kdFadeIn .6s ease backwards;
}

.kd-filter-card {
    background: var(--kd-surface, #fff);
    border: 1px solid var(--kd-border, rgba(0,0,0,.08));
    border-radius: 18px;
    padding: 18px 18px 10px;
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 104px);
    overflow-y: auto;
    scrollbar-width: thin;
}
.kd-filter-head h4 {
    display: flex; align-items: center; gap: 9px;
    font-size: 15px; font-weight: 800;
    color: var(--kd-text, #0f172a);
    margin: 0 0 10px;
}
.kd-filter-head h4 i { color: var(--kd-blue, #2563eb); font-size: 13px; }
.kd-filter-card label { font-size: 13px; font-weight: 600; }
.kd-filter-card input[type="checkbox"],
.kd-filter-card input[type="radio"] { accent-color: #2563eb; }

.kd-summary-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: var(--kd-surface, #fff);
    border: 1px solid var(--kd-border, rgba(0,0,0,.08));
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 18px;
    box-shadow: var(--kd-shadow, 0 2px 10px rgba(0,0,0,.04));
}
.kd-summary-info { font-size: 13.5px; color: var(--kd-muted, #64748b); }
.kd-count-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 26px; height: 26px; padding: 0 9px;
    border-radius: 999px;
    background: var(--kd-blue, #2563eb);
    color: #fff !important;
    font-size: 13px; font-weight: 800;
    margin: 0 3px;
    vertical-align: middle;
}
.kd-keyword-chip {
    background: var(--kd-yellow-soft, #fef3c7);
    color: #92400e;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
}
.kd-summary-tools { display: flex; align-items: center; }
.kd-sort-label { font-size: 13px; color: var(--kd-muted, #64748b); margin: 0 8px 0 0; }
.kd-sort-select {
    height: 38px;
    border: 1px solid var(--kd-border, rgba(0,0,0,.12));
    border-radius: 10px;
    background: var(--kd-surface, #fff);
    color: var(--kd-text, #0f172a);
    font-size: 13px;
    font-weight: 600;
    padding: 0 10px;
    outline: none;
}
.kd-sort-select:focus { border-color: var(--kd-blue, #2563eb); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.kd-view-btn {
    width: 38px; height: 38px;
    border-radius: 10px !important;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all .2s ease;
}
.kd-view-btn:hover { border-color: var(--kd-blue, #2563eb); color: var(--kd-blue, #2563eb); }

.kd-empty { text-align: center; padding: 60px 20px; }
.kd-empty img { width: 180px; opacity: .9; margin-bottom: 14px; }

@media (max-width: 900px) { .kd-filter-card { position: static; max-height: none; } }

/* ==========================================
   16. NEWS + GENERIC PAGES
   ========================================== */
.kd-page-hero {
    position: relative;
    padding: 42px 0 32px;
    background:
        radial-gradient(1200px 260px at 8% 0%, rgba(96,165,250,.14), transparent 60%),
        radial-gradient(900px 260px at 92% 0%, rgba(167,139,250,.14), transparent 60%),
        linear-gradient(180deg, var(--kd-surface, #fff), var(--kd-surface-2, #f8fafc));
    border-bottom: 1px solid var(--kd-border, rgba(0,0,0,.08));
    overflow: hidden;
}
[data-theme="dark"] .kd-page-hero {
    background:
        radial-gradient(1200px 260px at 8% 0%, rgba(96,165,250,.10), transparent 60%),
        radial-gradient(900px 260px at 92% 0%, rgba(167,139,250,.10), transparent 60%),
        linear-gradient(180deg, rgba(15,23,42,.6), rgba(15,23,42,.3));
}

.kd-page-title-wrap {
    display: flex; align-items: center; gap: 16px;
    position: relative;
}
.kd-page-icon {
    flex: 0 0 52px; width: 52px; height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 20px;
    box-shadow: 0 6px 18px rgba(37,99,235,.35);
}
.kd-page-title {
    font-size: clamp(24px, 3.4vw, 34px);
    font-weight: 900;
    letter-spacing: -.02em;
    line-height: 1.15;
    margin: 0;
    color: var(--kd-text, #0f172a);
}
.kd-page-accent {
    position: absolute;
    left: 0; bottom: -22px;
    width: 64px; height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, #2563eb, #fbbf24);
    animation: kdAccentDraw .9s cubic-bezier(.22, 1, .36, 1) .3s both;
}
@keyframes kdAccentDraw {
    from { width: 0; } to { width: 64px; }
}

.kd-page { padding: 42px 0 70px; }
.kd-page-content { max-width: 920px; margin: 0 auto; }

.kd-news-list { display: flex; flex-direction: column; gap: 18px; max-width: 920px; margin: 0 auto; }
.kd-news-card {
    position: relative;
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 22px;
    background: var(--kd-surface, #fff);
    border: 1px solid var(--kd-border, rgba(0,0,0,.08));
    border-radius: 20px;
    padding: 22px;
    box-shadow: var(--kd-shadow, 0 4px 18px rgba(0,0,0,.05));
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.kd-news-card:hover {
    transform: translateY(-3px);
    border-color: var(--kd-blue, #2563eb);
    box-shadow: 0 14px 32px rgba(37,99,235,.14);
}
.kd-news-shine {
    position: absolute; inset: 0;
    background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.22) 50%, transparent 65%);
    opacity: 0;
    transition: opacity .4s ease;
    pointer-events: none;
    mix-blend-mode: overlay;
}
.kd-news-card:hover .kd-news-shine { opacity: 1; }

.kd-news-date {
    position: relative;
    border-radius: 16px;
    background: linear-gradient(160deg, #2563eb, #7c3aed);
    color: #fff;
    padding: 14px 10px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center;
    overflow: hidden;
    min-height: 120px;
}
.kd-news-date::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(120% 60% at 20% 0%, rgba(255,255,255,.35), transparent 60%);
    pointer-events: none;
}
.kd-news-day {
    font-size: 38px; font-weight: 900;
    line-height: 1; letter-spacing: -.02em;
    position: relative; z-index: 1;
}
.kd-news-month {
    font-size: 13px; font-weight: 800;
    letter-spacing: .08em; text-transform: uppercase;
    margin-top: 4px;
    position: relative; z-index: 1;
}
.kd-news-year {
    font-size: 10px; opacity: .75;
    margin-top: 4px;
    position: relative; z-index: 1;
}
.kd-news-ico {
    position: absolute;
    bottom: 10px; right: 10px;
    font-size: 26px; opacity: .18;
}

.kd-news-body { display: flex; flex-direction: column; min-width: 0; }
.kd-news-meta {
    font-size: 12px; color: var(--kd-muted, #64748b);
    display: flex; gap: 10px; flex-wrap: wrap;
    margin-bottom: 6px;
}
.kd-news-meta i { color: var(--kd-blue, #2563eb); margin-right: 4px; }
.kd-news-title {
    font-size: 18px; font-weight: 800;
    line-height: 1.35;
    margin: 0 0 10px;
    color: var(--kd-text, #0f172a);
    letter-spacing: -.01em;
}
.kd-news-summary {
    font-size: 13.5px; line-height: 1.65;
    color: var(--kd-muted, #475569);
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.kd-news-read-more {
    display: inline-flex; align-items: center; gap: 8px;
    align-self: flex-start;
    padding: 9px 18px;
    border-radius: 999px;
    background: var(--kd-blue-soft, #dbeafe);
    color: var(--kd-blue, #1d4ed8) !important;
    font-size: 12.5px; font-weight: 700;
    text-decoration: none !important;
    transition: all .25s ease;
    margin-top: auto;
}
.kd-news-read-more:hover {
    background: var(--kd-blue, #2563eb);
    color: #fff !important;
    transform: translateX(3px);
    box-shadow: 0 6px 14px rgba(37,99,235,.35);
}
.kd-news-read-more i { font-size: 11px; transition: transform .25s ease; }
.kd-news-read-more:hover i { transform: translateX(3px); }

.kd-prose-card {
    background: var(--kd-surface, #fff);
    border: 1px solid var(--kd-border, rgba(0,0,0,.08));
    border-radius: 20px;
    padding: 32px 36px;
    box-shadow: var(--kd-shadow, 0 4px 18px rgba(0,0,0,.05));
    max-width: 920px;
    margin: 0 auto;
    color: var(--kd-text, #0f172a);
    font-size: 15px;
    line-height: 1.75;
}
.kd-prose-card h1, .kd-prose-card h2, .kd-prose-card h3,
.kd-prose-card h4, .kd-prose-card h5, .kd-prose-card h6 {
    margin-top: 1.6em; margin-bottom: .6em;
    font-weight: 800;
    color: var(--kd-text, #0f172a);
    letter-spacing: -.01em;
}
.kd-prose-card h1 { font-size: 26px; }
.kd-prose-card h2 { font-size: 22px; }
.kd-prose-card h3 { font-size: 18px; }
.kd-prose-card p { margin: 0 0 1em; }
.kd-prose-card a { color: var(--kd-blue, #2563eb); font-weight: 600; }
.kd-prose-card a:hover { text-decoration: none; border-bottom: 2px solid #fbbf24; }
.kd-prose-card ul, .kd-prose-card ol { margin: 0 0 1em; padding-left: 1.4em; }
.kd-prose-card li { margin-bottom: .4em; }
.kd-prose-card code {
    background: var(--kd-surface-2, #f1f5f9);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: .9em;
    color: #be123c;
}
.kd-prose-card blockquote {
    margin: 1em 0;
    padding: 12px 18px;
    border-left: 4px solid var(--kd-blue, #2563eb);
    background: var(--kd-blue-soft, #eff6ff);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #1e3a8a;
}
.kd-prose-card table {
    width: 100%; border-collapse: collapse; margin: 1em 0;
    border-radius: 12px; overflow: hidden;
    border: 1px solid var(--kd-border, rgba(0,0,0,.1));
}
.kd-prose-card th {
    background: var(--kd-surface-2, #f1f5f9);
    font-weight: 700; padding: 10px 14px; text-align: left;
}
.kd-prose-card td { padding: 10px 14px; border-top: 1px solid var(--kd-border, rgba(0,0,0,.08)); }
.kd-prose-card img { max-width: 100%; height: auto; border-radius: 12px; margin: 1em 0; }

.kd-prose-head {
    display: flex; align-items: center; gap: 10px;
    padding-bottom: 14px; margin-bottom: 18px;
    border-bottom: 2px dashed var(--kd-border, rgba(0,0,0,.08));
    color: var(--kd-blue, #2563eb);
    font-size: 15px;
}
.kd-prose-head strong { color: var(--kd-text, #0f172a); }

.kd-librarian-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    max-width: 1100px;
    margin: 0 auto;
}
.kd-librarian-grid .librarian {
    margin-bottom: 0;
    background: var(--kd-surface, #fff);
    border: 1px solid var(--kd-border, rgba(0,0,0,.08));
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--kd-shadow, 0 4px 14px rgba(0,0,0,.05));
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.kd-librarian-grid .librarian:hover {
    transform: translateY(-3px);
    border-color: var(--kd-blue, #2563eb);
    box-shadow: 0 12px 28px rgba(37,99,235,.14);
}
.kd-librarian-grid .span2 div:first-child {
    background: var(--kd-surface-2, #f1f5f9);
    border-radius: 12px;
    padding: 1.5rem;
}
.kd-librarian-grid .span2 img {
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
}

/* ==========================================
   17. MEMBER & VISITOR PAGES
   ========================================== */
.kd-member-hero {
    position: relative;
    padding: 48px 0 28px;
    background:
        radial-gradient(1000px 280px at 8% 0%, rgba(96,165,250,.16), transparent 60%),
        radial-gradient(900px 260px at 92% 0%, rgba(251,191,36,.12), transparent 60%),
        linear-gradient(180deg, var(--kd-surface, #fff), var(--kd-surface-2, #f8fafc));
    border-bottom: 1px solid var(--kd-border, rgba(0,0,0,.08));
}
[data-theme="dark"] .kd-member-hero {
    background:
        radial-gradient(1000px 280px at 8% 0%, rgba(96,165,250,.12), transparent 60%),
        radial-gradient(900px 260px at 92% 0%, rgba(251,191,36,.08), transparent 60%),
        linear-gradient(180deg, rgba(15,23,42,.6), rgba(15,23,42,.3));
}
.kd-member-lead {
    color: var(--kd-muted, #64748b);
    font-size: 14px;
    margin-top: 10px;
    padding-left: 68px;
}

.kd-member-stats-wrap { padding: 24px 0 0; }
.kd-member-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.kd-stat-pill {
    display: flex; align-items: center; gap: 14px;
    background: var(--kd-surface, #fff);
    border: 1px solid var(--kd-border, rgba(0,0,0,.08));
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: var(--kd-shadow, 0 4px 14px rgba(0,0,0,.04));
    transition: all .25s ease;
}
.kd-stat-pill:hover {
    transform: translateY(-2px);
    border-color: var(--kd-blue, #2563eb);
    box-shadow: 0 10px 24px rgba(37,99,235,.12);
}
.kd-stat-pill > i {
    flex: 0 0 48px; width: 48px; height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--kd-blue-soft, #dbeafe), #e0e7ff);
    color: var(--kd-blue, #1d4ed8);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 18px;
}
.kd-stat-pill > div { flex: 1; min-width: 0; }
.kd-stat-pill strong {
    display: block; font-size: 22px; font-weight: 900;
    color: var(--kd-text, #0f172a);
    line-height: 1.2;
}
.kd-stat-pill span {
    display: block; font-size: 12px;
    color: var(--kd-muted, #64748b);
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    margin-top: 2px;
}

.kd-member-card {
    background: var(--kd-surface, #fff);
    border: 1px solid var(--kd-border, rgba(0,0,0,.08));
    border-radius: 20px;
    padding: 28px 30px;
    box-shadow: var(--kd-shadow, 0 4px 18px rgba(0,0,0,.05));
    margin-bottom: 40px;
}
.kd-member-card table { width: 100%; border-collapse: collapse; }
.kd-member-card th {
    background: var(--kd-surface-2, #f1f5f9);
    font-weight: 700; padding: 12px 14px;
    text-align: left; font-size: 12.5px;
    letter-spacing: .03em; text-transform: uppercase;
    color: var(--kd-muted, #64748b);
}
.kd-member-card td {
    padding: 12px 14px;
    border-top: 1px solid var(--kd-border, rgba(0,0,0,.06));
    font-size: 14px;
}
.kd-member-card a { color: var(--kd-blue, #2563eb); font-weight: 600; }

.kd-login-hero { padding: 64px 0 42px; text-align: center; }
.kd-login-head { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.kd-icon-large { width: 72px; height: 72px; font-size: 28px; margin-bottom: 6px; }
.kd-login-head .kd-page-title { text-align: center; }
.kd-login-head .kd-member-lead { padding-left: 0; text-align: center; max-width: 520px; }

.kd-login-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 28px;
    padding: 28px 0 60px;
    align-items: start;
}
.kd-login-card { max-width: 100%; }
.kd-login-card h2, .kd-login-card h3 {
    font-size: 20px; font-weight: 800;
    margin-top: 0; margin-bottom: 16px;
    color: var(--kd-text, #0f172a);
}
.kd-login-card form { display: flex; flex-direction: column; gap: 12px; }
.kd-login-card input[type="text"],
.kd-login-card input[type="password"] {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1.5px solid var(--kd-border, rgba(0,0,0,.1));
    border-radius: 12px;
    background: var(--kd-surface, #fff);
    font-size: 14px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.kd-login-card input:focus {
    border-color: var(--kd-blue, #2563eb);
    box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}
.kd-login-card button[type="submit"],
.kd-login-card .btn-primary {
    height: 48px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s ease;
    box-shadow: 0 6px 18px rgba(37,99,235,.35);
}
.kd-login-card button[type="submit"]:hover,
.kd-login-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(37,99,235,.45);
}

.kd-login-side { display: flex; flex-direction: column; gap: 16px; }
.kd-side-info {
    background: var(--kd-surface, #fff);
    border: 1px solid var(--kd-border, rgba(0,0,0,.08));
    border-radius: 18px;
    padding: 22px 24px;
    box-shadow: var(--kd-shadow, 0 4px 14px rgba(0,0,0,.04));
}
.kd-side-info h3 {
    display: flex; align-items: center; gap: 10px;
    font-size: 15px; font-weight: 800;
    margin: 0 0 10px;
    color: var(--kd-blue, #2563eb);
}
.kd-side-info h3 i { font-size: 14px; }
.kd-side-info p {
    margin: 0 0 8px;
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--kd-muted, #475569);
}
.kd-side-contact {
    display: flex; flex-direction: column; gap: 6px;
    margin-top: 14px; padding-top: 14px;
    border-top: 1px dashed var(--kd-border, rgba(0,0,0,.1));
}
.kd-side-contact a {
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; font-weight: 600;
    color: var(--kd-text, #0f172a);
    text-decoration: none;
    transition: color .2s;
}
.kd-side-contact a i { color: var(--kd-blue, #2563eb); width: 16px; text-align: center; }
.kd-side-contact a:hover { color: var(--kd-blue, #2563eb); }

/* ============ VISITOR ============ */
.kdv-aurora {
    position: absolute; inset: -30%;
    filter: blur(70px);
    opacity: .45;
    pointer-events: none;
    z-index: 0;
}
.kdv-aurora span {
    position: absolute;
    width: 55vmax; height: 55vmax;
    border-radius: 50%;
    animation: kdvAurora 28s ease-in-out infinite alternate;
}
.kdv-aurora span:nth-child(1) {
    top: -15%; left: -8%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.45), transparent 60%);
}
.kdv-aurora span:nth-child(2) {
    top: 25%; right: -15%;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.4), transparent 60%);
    animation-delay: -9s; animation-duration: 34s;
}
.kdv-aurora span:nth-child(3) {
    bottom: -20%; left: 25%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.28), transparent 60%);
    animation-delay: -18s; animation-duration: 40s;
}
@keyframes kdvAurora {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(8vmax, -5vmax, 0) scale(1.2); }
    100% { transform: translate3d(-6vmax, 5vmax, 0) scale(0.9); }
}

.kdv-grid-bg {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(96,165,250,.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(96,165,250,.06) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,.6), transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,.6), transparent 70%);
}
[data-theme="dark"] .kdv-grid-bg {
    background-image:
        linear-gradient(rgba(96,165,250,.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(96,165,250,.08) 1px, transparent 1px);
}

.kdv-glass {
    position: relative;
    backdrop-filter: blur(22px) saturate(1.4);
    -webkit-backdrop-filter: blur(22px) saturate(1.4);
    background: rgba(255, 255, 255, 0.72) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
}
[data-theme="dark"] .kdv-glass {
    background: rgba(15, 23, 42, 0.65) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.kdv-chip-glow {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.25);
    animation: kdvChipPulse 2.6s ease-in-out infinite;
}
@keyframes kdvChipPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(37, 99, 235, 0.25); }
    50% { box-shadow: 0 0 28px rgba(37, 99, 235, 0.45); }
}

.kdv-submit-glow {
    position: relative;
    overflow: hidden;
    transition: all .25s ease;
}
.kdv-submit-glow::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%);
    transform: translateX(-100%);
    transition: transform .6s ease;
}
.kdv-submit-glow:hover::before { transform: translateX(100%); }
.kdv-submit-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.4);
}

.kdv-avatar-glow { position: relative; }
.kdv-avatar-glow::after {
    content: '';
    position: absolute; inset: -8px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.4), rgba(59, 130, 246, 0.4));
    filter: blur(16px);
    z-index: -1;
    animation: kdvAvatarGlow 2.4s ease-in-out infinite alternate;
}
@keyframes kdvAvatarGlow {
    from { opacity: .6; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1.05); }
}

.kdv-result-animate { animation: kdvResultIn .6s cubic-bezier(.22, 1, .36, 1); }
@keyframes kdvResultIn {
    from { opacity: 0; transform: scale(.9) translateY(16px); }
    to   { opacity: 1; transform: none; }
}

.kdv-quote-icon {
    color: var(--kd-blue, #2563eb) !important;
    font-size: 32px !important;
    animation: kdvQuotePulse 3s ease-in-out infinite;
}
@keyframes kdvQuotePulse {
    0%, 100% { opacity: .7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}

/* ==========================================
   18. MODALS — Cinematic Upgrade (Topic & Advanced)
   ========================================== */

/* Shared modal surface */
.kd-modal-surface {
    border: 0 !important;
    border-radius: 24px !important;
    overflow: hidden;
    background: var(--kd-surface, #fff);
    box-shadow: 0 30px 80px rgba(15, 42, 107, 0.3), 0 0 0 1px rgba(0,0,0,.04);
}
[data-theme="dark"] .kd-modal-surface {
    background: #0f172a;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,.06);
}

/* Shared modal head */
.kd-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px;
    padding: 22px 28px;
    border-bottom: 1px solid var(--kd-border, rgba(0,0,0,.08));
}
.kd-modal-head-left {
    display: flex; align-items: center; gap: 16px;
    min-width: 0;
}
.kd-modal-icon {
    flex: 0 0 48px; width: 48px; height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 18px;
    box-shadow: 0 6px 18px rgba(37,99,235,.35);
}
.kd-modal-title {
    font-size: 18px; font-weight: 800;
    letter-spacing: -.01em;
    margin: 0 0 3px;
    color: var(--kd-text, #0f172a);
    line-height: 1.3;
}
.kd-modal-sub {
    margin: 0;
    font-size: 12.5px;
    color: var(--kd-muted, #64748b);
    line-height: 1.4;
}
.kd-modal-sub code {
    background: var(--kd-surface-2, #f1f5f9);
    color: #be123c;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}
.kd-modal-x {
    flex: 0 0 40px; width: 40px; height: 40px;
    border: 0;
    border-radius: 50%;
    background: var(--kd-surface-2, rgba(0,0,0,.04));
    color: var(--kd-muted, #64748b);
    font-size: 22px; line-height: 1;
    cursor: pointer;
    transition: all .2s ease;
}
.kd-modal-x:hover {
    background: #fee2e2;
    color: #be123c;
    transform: rotate(90deg);
}
[data-theme="dark"] .kd-modal-x:hover {
    background: rgba(239,68,68,.2);
    color: #fca5a5;
}

/* Shared modal body */
.kd-modal-body { padding: 22px 28px; }

/* Shared modal foot */
.kd-modal-foot {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
    padding: 16px 28px 22px;
    border-top: 1px solid var(--kd-border, rgba(0,0,0,.08));
}
.kd-modal-btn-secondary {
    height: 44px; padding: 0 22px;
    border: 1px solid var(--kd-border, rgba(0,0,0,.1));
    background: var(--kd-surface, #fff);
    color: var(--kd-text, #0f172a);
    font-weight: 700; font-size: 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: all .2s ease;
    font-family: inherit;
}
.kd-modal-btn-secondary:hover {
    background: var(--kd-surface-2, #f1f5f9);
}
.kd-modal-btn-primary {
    height: 44px; padding: 0 22px;
    border: 0;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    font-weight: 800; font-size: 14px;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px;
    box-shadow: 0 6px 18px rgba(37,99,235,.35);
    transition: all .25s ease;
    font-family: inherit;
}
.kd-modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(37,99,235,.45);
}

/* Modal credit (footer topic) */
.kd-modal-credit {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px;
    color: var(--kd-muted, #64748b);
    margin: 0 auto;
}
.kd-modal-credit i { font-size: 11px; color: var(--kd-blue, #2563eb); }
.kd-modal-credit a {
    color: var(--kd-blue, #2563eb);
    font-weight: 700;
    text-decoration: none;
}
.kd-modal-credit a:hover { text-decoration: underline; }

/* ---- TOPIC MODAL GRID ---- */
.kd-topic-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}
@media (max-width: 900px)  { .kd-topic-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px)  { .kd-topic-grid { grid-template-columns: repeat(2, 1fr); } }

.kd-topic-card {
    position: relative;
    display: flex; flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px 12px 14px;
    border-radius: 18px;
    background: var(--tb, #dbeafe);
    border: 1px solid transparent;
    text-decoration: none !important;
    overflow: hidden;
    transition: all .3s cubic-bezier(.22, 1, .36, 1);
    min-height: 180px;
    text-align: center;
}
.kd-topic-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(15, 42, 107, 0.18);
    border-color: var(--tc, #2563eb);
}
.kd-topic-shine {
    position: absolute; inset: 0;
    background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.4) 50%, transparent 65%);
    opacity: 0;
    transition: opacity .4s ease;
    pointer-events: none;
    mix-blend-mode: overlay;
}
.kd-topic-card:hover .kd-topic-shine { opacity: 1; }

.kd-topic-num {
    position: absolute;
    top: 10px; left: 10px;
    background: var(--tc, #2563eb);
    color: #fff;
    font-size: 10px; font-weight: 800;
    letter-spacing: .04em;
    padding: 3px 9px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    z-index: 2;
}
.kd-topic-go {
    position: absolute;
    top: 10px; right: 10px;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,.7);
    color: var(--tc, #2563eb);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px;
    opacity: 0;
    transform: translateX(-6px);
    transition: all .3s ease;
    z-index: 2;
}
.kd-topic-card:hover .kd-topic-go {
    opacity: 1;
    transform: translateX(0);
    background: #fff;
}

.kd-topic-img-wrap {
    flex: 1;
    display: flex; align-items: center; justify-content: center;
    width: 100%;
    margin: 8px 0 4px;
}
.kd-topic-img-wrap img {
    width: 72px; height: 72px;
    object-fit: contain;
    transition: transform .4s cubic-bezier(.22, 1, .36, 1);
    filter: drop-shadow(0 4px 10px rgba(0,0,0,.12));
}
.kd-topic-card:hover .kd-topic-img-wrap img {
    transform: scale(1.1) rotate(-3deg);
}

.kd-topic-label {
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--kd-text, #0f172a);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding: 0 4px;
}

/* ---- ADVANCED MODAL POLISH ---- */
.kd-adv-body { padding: 20px 28px 6px; }
.kd-adv-row { display: grid; gap: 16px; margin-bottom: 14px; }
.kd-adv-row.c2 { grid-template-columns: 1fr 1fr; }
.kd-adv-row.c3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 700px) {
    .kd-adv-row.c2, .kd-adv-row.c3 { grid-template-columns: 1fr; gap: 14px; }
    .kd-modal-body, .kd-modal-head, .kd-modal-foot { padding-left: 18px; padding-right: 18px; }
}

.kd-adv-f label {
    display: flex; align-items: center; gap: 8px;
    font-size: 11.5px; font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--kd-text, #0f172a);
    margin-bottom: 7px;
}
.kd-adv-f label i {
    color: var(--kd-blue, #2563eb);
    font-size: 12px;
    opacity: .85;
}
.kd-adv-f input,
.kd-adv-f select {
    width: 100%;
    box-sizing: border-box;
    height: 46px;
    padding: 0 14px;
    border: 1.5px solid var(--kd-border, rgba(0,0,0,.1));
    border-radius: 12px;
    background: var(--kd-surface, #fff);
    color: var(--kd-text, #0f172a);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.kd-adv-f input::placeholder { color: #94a3b8; }
.kd-adv-f input:focus,
.kd-adv-f select:focus {
    border-color: var(--kd-blue, #2563eb);
    box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}

/* Override old .kd-adv-head padding agar tidak double */
.kd-adv-modal .kd-adv-head { padding: 0; margin: 0; border: 0; }

/* Reduced motion modals */
@media (prefers-reduced-motion: reduce) {
    .kd-modal-x:hover { transform: none; }
    .kd-topic-card:hover { transform: none; }
    .kd-topic-card:hover .kd-topic-img-wrap img { transform: none; }
    .kd-topic-shine { display: none; }
    .kd-modal-btn-primary:hover { transform: none; }
}

/* ==========================================
   19. GLOBAL RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .kd-hero-pro { min-height: 550px; }
    .hero-main-title { font-size: 2.6rem; }
    .hero-subtitle { font-size: 1.1rem; margin-bottom: 2rem; }
    .float-icon-1, .float-icon-3 { display: none; }
    .kd-ticker-item { font-size: .72rem; margin-right: 1.6rem; }
    .kd-aurora { filter: blur(40px); opacity: 0.35; }
    .kd-back-top { right: 14px; bottom: 14px; width: 42px; height: 42px; }

    .kd-item {
        flex-direction: column;
        gap: 14px;
    }
    .kd-item-cover { flex: 0 0 auto; width: 100%; max-width: 180px; margin: 0 auto; }
    .kd-item-side {
        flex: 0 0 auto;
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .kd-item-actions {
        flex-direction: row;
        gap: 10px;
    }
    .kd-action-btn {
        flex: 1;
        height: 42px;
    }
}

@media (max-width: 720px) {
    .kd-news-card {
        grid-template-columns: 1fr;
        padding: 18px;
    }
    .kd-news-date {
        flex-direction: row; gap: 10px;
        min-height: 0; padding: 12px 16px;
        justify-content: flex-start;
    }
    .kd-news-day { font-size: 26px; }
    .kd-news-month { margin-top: 0; }
    .kd-news-year { margin-top: 0; }
    .kd-news-ico { display: none; }
    .kd-prose-card { padding: 22px; }
    .kd-page-title-wrap { gap: 12px; }
    .kd-page-icon { width: 44px; height: 44px; font-size: 17px; }
}

@media (max-width: 700px) {
    .kd-member-stats { grid-template-columns: 1fr; }
    .kd-login-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .kd-member-lead { padding-left: 0; margin-top: 14px; }
}

/* ==========================================
   20. GLOBAL REDUCED MOTION
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    .kd-hero-layer, .kd-ticker-track, .kd-type-caret, .text-gradient,
    .hero-slide, .kd-aurora span,
    .float-icon-1, .float-icon-2, .float-icon-3, .float-icon-4, .float-icon-5 {
        animation: none !important;
        transition: none !important;
    }
    .kd-reveal { opacity: 1 !important; transform: none !important; }
    .kd-reveal .kd-underline { transform: scaleX(1) !important; }
    .kd-scroll-progress { display: none; }
    .kd-grid-wrap .kd-card-in { animation: none !important; }
    .kd-page-accent { animation: none; width: 64px !important; }
    .kd-news-card:hover { transform: none; }
    .kd-news-shine { display: none; }
    .kdv-aurora span,
    .kdv-chip-glow,
    .kdv-avatar-glow::after,
    .kdv-quote-icon {
        animation: none !important;
    }
    .kdv-submit-glow::before { display: none; }
}

/* ==========================================
21. ACCESSIBILITY + PRELOADER + SHARE + CITATION
========================================== */
/* Skip link (tersembunyi kecuali di-focus) */
.kd-skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px; height: 1px;
    overflow: hidden;
    z-index: 10000;
    background: var(--kd-blue, #2563eb);
    color: #fff !important;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
}
.kd-skip-link:focus {
    position: fixed;
    left: 16px; top: 16px;
    width: auto; height: auto;
    box-shadow: 0 6px 18px rgba(37,99,235,.4);
}

/* Focus ring konsisten untuk semua interaksi keyboard */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2.5px solid #2563eb;
    outline-offset: 2px;
    border-radius: 6px;
}
.kd-tab-btn:focus-visible,
.kd-act-btn:focus-visible,
.kd-action-btn:focus-visible {
    outline-offset: 3px;
}

/* Main content anchor target — tidak mengganggu scroll */
#main-content { outline: none; }

/* ---------- PRELOADER with logo ---------- */
.kd-preloader-logo {
    position: relative;
    width: 120px; height: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.kd-preloader-img {
    width: 84px; height: 84px;
    object-fit: contain;
    position: relative;
    z-index: 2;
    animation: kdPrePulse 2s ease-in-out infinite;
}
.kd-preloader-ring {
    position: absolute; inset: 0;
    border: 3px solid transparent;
    border-top-color: #2563eb;
    border-right-color: #7c3aed;
    border-radius: 50%;
    animation: kdPreSpin 1.1s linear infinite;
}
@keyframes kdPreSpin { to { transform: rotate(360deg); } }
@keyframes kdPrePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.06); opacity: .85; }
}
.kd-preloader-bar {
    width: 200px; height: 4px;
    background: rgba(148,163,184,.25);
    border-radius: 999px;
    overflow: hidden;
}
.kd-preloader-fill {
    display: block;
    width: 40%; height: 100%;
    background: linear-gradient(90deg, #2563eb, #7c3aed, #fbbf24);
    border-radius: 999px;
    animation: kdPreFill 1.6s ease-in-out infinite;
}
@keyframes kdPreFill {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(350%); }
}

/* ---------- SHARE MODAL ---------- */
.kd-share-body { padding: 22px 28px 28px; }
.kd-share-preview {
    display: flex; gap: 14px; align-items: center;
    background: var(--kd-surface-2, #f8fafc);
    border: 1px solid var(--kd-border, rgba(0,0,0,.08));
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 20px;
}
.kd-share-preview-icon {
    flex: 0 0 48px; width: 48px; height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--kd-blue-soft, #dbeafe), #e0e7ff);
    color: var(--kd-blue, #2563eb);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 18px;
}
.kd-share-preview-info { min-width: 0; flex: 1; }
.kd-share-preview-info strong {
    display: block;
    font-size: 14px; font-weight: 800;
    color: var(--kd-text, #0f172a);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}
.kd-share-url-code {
    display: block;
    font-family: 'JetBrains Mono', Consolas, monospace;
    font-size: 11px;
    color: var(--kd-muted, #64748b);
    background: none; padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kd-share-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}
@media (max-width: 560px) { .kd-share-grid { grid-template-columns: repeat(2, 1fr); } }
.kd-share-btn {
    display: flex; flex-direction: column;
    align-items: center; gap: 6px;
    padding: 14px 8px;
    border-radius: 14px;
    background: var(--kd-surface, #fff);
    border: 1px solid var(--kd-border, rgba(0,0,0,.08));
    color: var(--kd-text, #0f172a) !important;
    text-decoration: none !important;
    font-size: 11.5px; font-weight: 700;
    transition: all .22s ease;
}
.kd-share-btn i { font-size: 22px; transition: transform .25s ease; }
.kd-share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(15, 42, 107, .14);
    border-color: transparent;
    color: #fff !important;
}
.kd-share-btn:hover i { transform: scale(1.15); }
.kd-share-fb:hover { background: #1877f2; }
.kd-share-tw:hover { background: #000; }
.kd-share-wa:hover { background: #25d366; }
.kd-share-li:hover { background: #0a66c2; }
.kd-share-tg:hover { background: #229ed9; }
.kd-share-em:hover  { background: #ea4335; }
.kd-share-copy {
    display: flex; gap: 8px; align-items: stretch;
    background: var(--kd-surface-2, #f8fafc);
    border: 1px solid var(--kd-border, rgba(0,0,0,.08));
    border-radius: 12px;
    padding: 4px;
}
.kd-share-input {
    flex: 1; min-width: 0;
    background: transparent;
    border: 0; outline: none;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--kd-text, #0f172a);
    font-family: 'JetBrains Mono', Consolas, monospace;
}
.kd-share-copy-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 0 16px;
    border: 0;
    background: linear-gradient(135deg, var(--kd-blue, #2563eb), #7c3aed);
    color: #fff;
    font-size: 12.5px; font-weight: 800;
    border-radius: 9px;
    cursor: pointer;
    transition: all .2s ease;
    white-space: nowrap;
    font-family: inherit;
}
.kd-share-copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(37,99,235,.4);
}
.kd-share-toast {
    position: absolute;
    left: 50%; bottom: 22px;
    transform: translateX(-50%) translateY(16px);
    background: #15803d;
    color: #fff;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 12px; font-weight: 700;
    display: flex; align-items: center; gap: 7px;
    box-shadow: 0 8px 20px rgba(21, 128, 61, .4);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
}
.kd-share-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.kd-share-modal .modal-dialog { max-width: 500px; }

/* ---------- CITATION ACTIONS (tombol) ---------- */
.kd-citation-actions-btn {
    padding: 9px 18px;
    border: 1px solid var(--kd-border, rgba(0,0,0,.1));
    border-radius: 10px;
    background: var(--kd-surface, #fff);
    color: var(--kd-text, #0f172a) !important;
    font-size: 13px; font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px;
    transition: all .2s ease;
    font-family: inherit;
}
.kd-citation-actions-btn:hover {
    border-color: var(--kd-blue, #2563eb);
    color: var(--kd-blue, #2563eb) !important;
    background: var(--kd-blue-soft, #dbeafe);
    transform: translateY(-1px);
}

/* Screen reader only utility */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Reduced motion: matikan animasi preloader */
@media (prefers-reduced-motion: reduce) {
    .kd-preloader-ring, .kd-preloader-img, .kd-preloader-fill {
        animation: none !important;
    }
    .kd-share-btn:hover { transform: none; }
}