/* ============================================================
   BIAS INDEX PAGE
   Extends about.css patterns — uses same about-* classes
   from base/about stylesheets, adds only page-specific rules.
   ============================================================ */

/* ── Card number accents (bias-specific, not in about.css) ── */
.about-card__num.bi-framing  { color: #6DB87A; }
.about-card__num.bi-coverage { color: #5B9FCC; }
.about-card__num.bi-ownership{ color: #f0a830; }
.about-card__num.bi-scoring  { color: #9B8FC0; }

/* ── Equation (extends about-equation if not already in about.css) ── */
.about-equation {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 6px;
    margin: 1.5rem 0;
}
.about-eq__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.about-eq__label {
    font-size: clamp(11px, 1.4vw, 13px);
    font-weight: 800;
}
.about-eq__weight {
    font-size: 0.85em;
    color: var(--text-muted);
    font-weight: 600;
}
.about-eq__op {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 15px;
}
.about-eq__result {
    background: var(--accent);
    color: #fff;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: clamp(11px, 1.4vw, 13px);
    font-weight: 800;
    white-space: nowrap;
}

/* ── Below-cards note ── */
.bi-below-note {
    margin-top: 1.25rem;
    max-width: 720px;
    color: var(--text-muted);
}

/* ── Map frame ── */
#bias-map-frame {
    position: relative;
    width: 100%;
    height: clamp(460px, 68vh, 680px);
    overflow: visible;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
}

.bias-bubble__tooltip--below {
    bottom: auto;
    top: calc(100% + 12px);
    transform: translateX(-50%) translateY(-8px);
}
.bias-bubble:hover .bias-bubble__tooltip--below {
    transform: translateX(-50%) translateY(0);
}

/* Bottom fade */
#bias-map-frame::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0; height: 180px;
    background: linear-gradient(to bottom, transparent, var(--bg-primary));
    pointer-events: none; z-index: 30;
    transition: background 0.35s;
}

/* ── Map internals ── */
#bias-dot-canvas {
    position: absolute; inset: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 0;
}
#bias-map-inner {
    position: absolute; inset: 0; z-index: 10;
    display: flex; flex-direction: column;
}
#bias-spectrum-bar {
    flex-shrink: 0;
    padding: 12px 20px 6px;
    position: relative; z-index: 50;
    background: var(--bg-primary);
    transition: background 0.35s;
}
#bias-gradient-bar {
    height: 3px; border-radius: 2px;
    background: linear-gradient(to right, #3D8C4F, #6DB87A, #9B8FC0, #5B9FCC, #5B70C4);
}
#bias-spectrum-labels {
    display: flex; justify-content: space-between; margin-top: 5px;
}
.bias-spec-label {
    font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
    font-weight: 800; opacity: 1;
}
[data-theme="dark"] .bias-spec-label {
    filter: none;
    opacity: 1;
}
[data-theme="light"] .bias-spec-label {
    filter: brightness(0.6);
    opacity: 1;
}
#bias-bubble-area {
    flex: 1; position: relative; overflow: visible; z-index: 20;
}
#bias-center-line {
    position: absolute; left: 50%; top: 2%; height: 96%; width: 1px;
    background: rgba(155, 143, 192, 0.1);
    transform: translateX(-50%); pointer-events: none;
}

/* ── Bubbles ── */
.bias-bubble {
    position: absolute; transform: translate(-50%, -50%);
    cursor: pointer; z-index: 20;
}
.bias-bubble:hover { z-index: 999; }

.bias-bubble__inner {
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    position: relative; width: 50px; height: 50px;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}
[data-theme="dark"]  .bias-bubble__inner { background: rgba(20, 16, 34, 0.68); }
[data-theme="light"] .bias-bubble__inner { background: rgba(255, 255, 255, 0.72); }
.bias-bubble:hover .bias-bubble__inner { transform: scale(1.15); }

.bias-bubble__logo {
    font-size: 11px; font-weight: 800; letter-spacing: -0.02em;
    text-align: center; line-height: 1.1;
    pointer-events: none; user-select: none;
    position: relative; z-index: 2;
}

@keyframes bias-pulse-ring {
    0%   { transform: scale(1);   opacity: 0.4; }
    65%  { transform: scale(1.7); opacity: 0;   }
    100% { transform: scale(1.7); opacity: 0;   }
}
.bias-bubble__pulse {
    position: absolute; inset: -2px; border-radius: 50%;
    border: 1.5px solid;
    animation: bias-pulse-ring 3.8s ease-out infinite;
    pointer-events: none;
}

/* ── Tooltip ── */
.bias-bubble__tooltip {
    position: absolute; bottom: calc(100% + 12px); left: 50%;
    transform: translateX(-50%) translateY(8px);
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.3, 0.64, 1);
    white-space: nowrap; z-index: 1000;
    max-width: 90vw;
}
.bias-bubble:hover .bias-bubble__tooltip {
    opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto;
}
.bias-tooltip__card {
    border-radius: 12px; padding: 12px 16px;
    backdrop-filter: none; -webkit-backdrop-filter: none;
    text-align: center; min-width: 148px;
    background: rgb(12, 9, 24);
}
[data-theme="dark"] .bias-tooltip__card {
    background: rgb(12, 9, 24);
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
    color: #e8e4f4;
}
[data-theme="light"] .bias-tooltip__card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(139, 92, 246, 0.18);
    box-shadow: 0 8px 32px rgba(80, 60, 140, 0.18);
    color: #1a1626;
}
.bias-tooltip__name  { font-size: 14px; font-weight: 700; margin-bottom: 5px; }
.bias-tooltip__meta  { font-size: 11px; letter-spacing: 0.04em; line-height: 1.5; }
[data-theme="dark"]  .bias-tooltip__meta { color: rgba(232, 228, 244, 0.6); }
[data-theme="light"] .bias-tooltip__meta { color: rgba(26, 22, 38, 0.6); }
.bias-tooltip__meta strong { font-weight: 800; }
.bias-tooltip__aff {
    font-size: 9px; margin-top: 7px; letter-spacing: 0.09em;
    text-transform: uppercase; font-weight: 700;
    padding: 3px 9px; border-radius: 20px;
    display: inline-block; color: #fff;
}

/* ── Responsive ── */
@media (max-width: 560px) {
    .about-cards-2 { grid-template-columns: 1fr; }
    .about-equation { gap: 8px 4px; }
    #bias-spectrum-labels .bias-spec-label:nth-child(n+3):not(:last-child) { display: none; }
}