/* Zodiac Superlatives explorer styles */

/* Scoped reset - only affects elements inside the explorer, never
   the site nav/footer/shell provided by base.html */
.sx-page *, .sx-page *::before, .sx-page *::after { box-sizing: border-box; }

    :root {
        --bg: #0e0e16;
        --panel: rgba(255,255,255,0.025);
        --panel-border: rgba(255,255,255,0.08);
        --gold: #E8C547;
        --gold-soft: rgba(232,197,71,0.14);
        --text: rgba(232,224,212,0.92);
        --text-soft: rgba(232,224,212,0.62);
        --text-mute: rgba(232,224,212,0.42);
        --display: 'Cormorant Garamond', Georgia, serif;
        --sans: 'Source Sans 3', system-ui, sans-serif;
        --el-wood: #6FBF7F;
        --el-fire: #D26B5C;
        --el-earth: #CBA86A;
        --el-metal: #B6C6D4;
        --el-water: #6A8FC8;
    }

    /* Page wrapper - carries the explorer's own typography + spacing
       without overriding the site body */
    .sx-page {
        color: var(--text);
        font-family: var(--sans);
        padding: 2.5rem 1.25rem 4rem;
        line-height: 1.6;
        -webkit-font-smoothing: antialiased;
    }
    .sx-page p { margin: 0; }

    .wrap { max-width: 820px; margin: 0 auto; }

    /* ── Header ── */
    .sx-eyebrow {
        font-size: 0.72rem;
        font-weight: 600;
        letter-spacing: 0.24em;
        text-transform: uppercase;
        color: var(--gold);
        opacity: 0.85;
        margin-bottom: 1rem;
    }
    .sx-title {
        font-family: var(--display);
        font-size: clamp(2.4rem, 6vw, 3.6rem);
        font-weight: 600;
        line-height: 1.0;
        letter-spacing: -0.01em;
        margin-bottom: 0.6rem;
    }
    .sx-title .accent { font-style: italic; color: var(--gold); }
    .sx-sub {
        font-family: var(--display);
        font-size: 1.3rem;
        font-style: italic;
        color: var(--text-soft);
        margin-bottom: 2.25rem;
        max-width: 560px;
    }

    /* ── Trait selector ── */
    .sx-traits {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 2.5rem;
    }
    .sx-trait-btn {
        font-family: var(--sans);
        font-size: 0.88rem;
        font-weight: 500;
        color: var(--text-soft);
        background: var(--panel);
        border: 1px solid var(--panel-border);
        border-radius: 999px;
        padding: 0.5rem 1rem;
        cursor: pointer;
        transition: all 0.18s ease;
        white-space: nowrap;
    }
    .sx-trait-btn:hover {
        border-color: rgba(232,197,71,0.4);
        color: var(--text);
    }
    .sx-trait-btn.active {
        background: var(--gold-soft);
        border-color: rgba(232,197,71,0.5);
        color: var(--gold);
    }

    /* ── Verdict (the winner callout) ── */
    .sx-verdict {
        background: linear-gradient(135deg, rgba(232,197,71,0.06) 0%, transparent 70%), var(--panel);
        border: 1px solid rgba(232,197,71,0.18);
        border-radius: 16px;
        padding: 1.75rem 2rem;
        margin-bottom: 2rem;
        position: relative;
        overflow: hidden;
        min-height: 150px;
    }
    .sx-verdict-watermark {
        position: absolute;
        bottom: -110px;
        right: -30px;
        font-family: var(--display);
        font-size: 340px;
        line-height: 0.8;
        opacity: 0.06;
        pointer-events: none;
        user-select: none;
        z-index: 0;
    }
    .sx-verdict-content { position: relative; z-index: 1; }
    .sx-verdict-trait {
        font-size: 0.72rem;
        font-weight: 600;
        letter-spacing: 0.2em;
        text-transform: uppercase;
        color: var(--gold);
        opacity: 0.8;
        margin-bottom: 0.5rem;
    }
    .sx-verdict-winner {
        font-family: var(--display);
        font-size: 2.4rem;
        font-weight: 600;
        line-height: 1.05;
        margin-bottom: 0.65rem;
        display: flex;
        align-items: baseline;
        gap: 0.6rem;
        flex-wrap: wrap;
    }
    .sx-verdict-char {
        font-family: var(--display);
        font-size: 1.6rem;
        opacity: 0.85;
    }
    .sx-verdict-take {
        font-size: 1.02rem;
        line-height: 1.65;
        color: var(--text);
        max-width: 620px;
    }
    .sx-verdict-because {
        font-size: 0.95rem;
        line-height: 1.6;
        color: var(--text-soft);
        margin-top: 0.6rem;
        max-width: 620px;
    }
    .sx-verdict-because b { color: var(--gold); font-weight: 600; }

    /* ── Ranking list ── */
    .sx-rank-label {
        font-size: 0.7rem;
        font-weight: 600;
        letter-spacing: 0.2em;
        text-transform: uppercase;
        color: var(--text-mute);
        margin-bottom: 1rem;
    }
    .sx-rank { list-style: none; }
    .sx-row {
        display: grid;
        grid-template-columns: 2rem 1fr auto;
        align-items: center;
        gap: 0.85rem;
        padding: 0.7rem 0.5rem;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        cursor: pointer;
        transition: background 0.18s ease;
        border-radius: 8px;
    }
    .sx-row:hover { background: rgba(255,255,255,0.02); }
    .sx-row-rank {
        font-family: var(--display);
        font-size: 1.3rem;
        font-weight: 600;
        color: var(--text-mute);
        text-align: center;
    }
    .sx-row--winner .sx-row-rank { color: var(--gold); }
    .sx-row--winner {
        background: rgba(232,197,71,0.04);
    }
    .sx-row--winner .sx-row-name::after {
        content: '\25C6';
        font-size: 0.6rem;
        color: var(--gold);
        opacity: 0.7;
        margin-left: 0.15rem;
        align-self: center;
    }
    .sx-row-main { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
    .sx-row-name {
        font-family: var(--display);
        font-size: 1.35rem;
        font-weight: 600;
        line-height: 1.1;
        display: flex;
        align-items: baseline;
        gap: 0.5rem;
    }
    .sx-row-char { font-size: 1rem; color: var(--text-mute); }
    .sx-row-reason {
        font-size: 0.86rem;
        color: var(--text-soft);
        line-height: 1.45;
    }
    .sx-row-bar-wrap {
        width: 90px;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    .sx-row-track {
        flex: 1;
        height: 5px;
        background: rgba(255,255,255,0.07);
        border-radius: 3px;
        overflow: hidden;
    }
    .sx-row-fill {
        height: 100%;
        background: var(--gold);
        border-radius: 3px;
        width: 0%;
        transition: width 0.7s cubic-bezier(0.22,1,0.36,1);
    }
    .sx-row-score {
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--text-soft);
        min-width: 22px;
        text-align: right;
        font-variant-numeric: tabular-nums;
    }

    /* ── Footer CTA ── */
    .sx-cta {
        margin-top: 2.5rem;
        padding-top: 2rem;
        border-top: 1px solid var(--panel-border);
        text-align: center;
    }
    .sx-cta-text {
        font-family: var(--display);
        font-style: italic;
        font-size: 1.25rem;
        color: var(--text-soft);
        margin-bottom: 1rem;
    }
    .sx-cta-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        background: linear-gradient(180deg, #E8C547 0%, #d4b53b 100%);
        color: #1a1a2e;
        font-family: var(--sans);
        font-size: 0.92rem;
        font-weight: 600;
        padding: 0.75rem 1.5rem;
        border-radius: 8px;
        border: none;
        text-decoration: none;
        cursor: pointer;
        transition: transform 0.15s ease;
    }
    .sx-cta-btn:hover { transform: translateY(-1px); }

    @media (max-width: 560px) {
        .sx-verdict-winner { font-size: 1.9rem; }
        .sx-row-reason { display: none; }
        .sx-row-bar-wrap { width: 60px; }
    }
