/* ╔══════════════════════════════════════════════════════════════════╗
   ║  ODM Rx: RAW & PROFESSIONAL INSIGHT CARD (Zero-JS)              ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.rx-insight-card {
    --ric-bg: #0F172A;           /* Deep Obsidian Base */
    --ric-surface: #1E293B;      /* Obsidian Surface */
    --ric-border: rgba(220, 38, 38, 0.25);
    --ric-gold: #DC2626;
    --ric-gold-dim: rgba(220, 38, 38, 0.14);
    --ric-text: #FFFFFF;
    --ric-muted: #94A3B8;
    
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    max-width: 600px;
    margin: 1.5rem 0;
}

/* ── 1. The Details Wrapper ── */
.ric-wrap {
    background: var(--ric-bg);
    border: 1px solid var(--ric-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.ric-wrap:hover {
    border-color: rgba(228, 184, 78, 0.4);
}
.ric-wrap[open] {
    background: var(--ric-surface);
    border-color: var(--ric-gold);
    box-shadow: 0 8px 30px rgba(228, 184, 78, 0.08);
}

/* ── 2. The Collapsed Header (Summary) ── */
.ric-header {
    list-style: none;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    outline: none;
    border-bottom: 1px solid transparent;
    transition: background 0.2s ease;
}
.ric-header::-webkit-details-marker { display: none; }
.ric-wrap[open] .ric-header {
    border-bottom-color: var(--ric-border);
    background: rgba(0, 0, 0, 0.2);
}

/* Left Side: Title */
.ric-head-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.ric-icon-box {
    width: 32px; height: 32px;
    background: var(--ric-gold-dim);
    border: 1px solid var(--ric-border);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
}
.ric-role-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ric-text);
    letter-spacing: 0.3px;
}

/* Right Side: Competition & Chevron */
.ric-head-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.ric-competition-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(220, 38, 38, 0.1); /* Subtle red tint for urgency */
    border: 1px solid rgba(220, 38, 38, 0.3);
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #F87171; /* Soft Red text */
}
.ric-competition-pill.zero {
    background: rgba(37, 211, 102, 0.1); /* Green tint if 0 applied */
    border-color: rgba(37, 211, 102, 0.3);
    color: #4ADE80;
}
.ric-chev {
    color: var(--ric-muted);
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.3s ease, color 0.3s ease;
}
.ric-chev svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.ric-wrap[open] .ric-chev {
    transform: rotate(180deg);
    color: var(--ric-gold);
}

/* ── 3. The Expanded Content Grid ── */
.ric-body-anim {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease-out;
}
.ric-wrap[open] .ric-body-anim {
    grid-template-rows: 1fr;
}
.ric-body-inner {
    overflow: hidden;
}

.ric-grid {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

/* Data Points */
.ric-dp {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}
.ric-dp-emoji {
    font-size: 1.2rem;
    line-height: 1;
    margin-top: 2px;
    opacity: 0.9;
}
.ric-dp-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ric-dp-lbl {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ric-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.ric-dp-val {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ric-text);
    line-height: 1.4;
}

/* Vital Skills Area */
.ric-skills-row {
    grid-column: 1 / -1; /* Spans full width */
    padding-top: 1.2rem;
    border-top: 1px dashed var(--ric-border);
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}
.ric-skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 4px;
}
.ric-skill-tag {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ric-border);
    color: var(--ric-gold);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .ric-header { padding: 1rem; flex-direction: column; align-items: flex-start; gap: 1rem; }
    .ric-head-actions { width: 100%; justify-content: space-between; }
    .ric-grid { grid-template-columns: 1fr; gap: 1.2rem; padding: 1.2rem 1rem; }
}
