:root {
    --sf-dive-bg: #050708;
    --sf-dive-panel: #101417;
    --sf-dive-panel-soft: #151b1f;
    --sf-dive-line: rgba(212, 220, 225, 0.22);
    --sf-dive-text: #f5f7f8;
    --sf-dive-muted: #aab4ba;
    --sf-dive-red: #ff4b42;
    --sf-dive-blue: #19dff2;
    --sf-dive-gold: #d9b55c;
}

* {
    box-sizing: border-box;
}

body.sf-deep-dive-page {
    margin: 0;
    min-height: 100vh;
    color: var(--sf-dive-text);
    background:
        radial-gradient(
            circle at top,
            rgba(44, 62, 69, 0.32),
            transparent 34rem
        ),
        var(--sf-dive-bg);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.sf-deep-dive-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding-bottom: 64px;
}

.sf-deep-dive-topbar {
    min-height: 112px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    border-bottom: 1px solid var(--sf-dive-line);
}

.sf-deep-dive-brand-lockup {
    text-align: center;
}

.sf-deep-dive-brand {
    display: inline-block;
}

.sf-deep-dive-brand img {
    display: block;
    width: 116px;
    height: auto;
}

.sf-deep-dive-brand-lockup p {
    margin: 5px 0 0;
    color: var(--sf-dive-muted);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
}

.sf-deep-dive-topbar nav {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 18px;
}

.sf-deep-dive-topbar nav a {
    color: var(--sf-dive-text);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
}

.sf-deep-dive-topbar nav a:hover,
.sf-deep-dive-topbar nav a:focus-visible {
    color: var(--sf-dive-blue);
}

.sf-deep-dive-hero {
    max-width: 780px;
    margin: 72px auto 38px;
    text-align: center;
}

.sf-deep-dive-kicker {
    margin: 0 0 10px;
    color: var(--sf-dive-gold);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.sf-deep-dive-hero h1 {
    margin: 0;
    font-family: inherit;
    font-size: clamp(2.75rem, 6vw, 4.75rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.025em;
}

.sf-deep-dive-hero > p:last-child {
    max-width: 660px;
    margin: 24px auto 0;
    color: var(--sf-dive-muted);
    font-size: 1.08rem;
    line-height: 1.65;
}

.sf-deep-dive-controls {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    padding: 22px;
    border: 1px solid var(--sf-dive-line);
    border-radius: 18px;
    background: rgba(16, 20, 23, 0.92);
}

.sf-deep-dive-tabs {
    display: inline-flex;
    gap: 6px;
    padding: 5px;
    border: 1px solid var(--sf-dive-line);
    border-radius: 999px;
    background: #080b0d;
}

.sf-deep-dive-tabs a {
    min-width: 112px;
    padding: 10px 18px;
    border-radius: 999px;
    color: var(--sf-dive-muted);
    font-size: 0.87rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.sf-deep-dive-tabs a.is-active {
    color: #050708;
    background: var(--sf-dive-gold);
}

.sf-deep-dive-controls form {
    display: grid;
    grid-template-columns: auto minmax(170px, 240px) auto;
    align-items: center;
    gap: 10px;
}

.sf-deep-dive-controls label {
    color: var(--sf-dive-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sf-deep-dive-controls select,
.sf-deep-dive-controls button {
    min-height: 42px;
    border-radius: 10px;
    font: inherit;
}

.sf-deep-dive-controls select {
    width: 100%;
    padding: 0 36px 0 12px;
    border: 1px solid var(--sf-dive-line);
    color: var(--sf-dive-text);
    background: #080b0d;
}

.sf-deep-dive-controls button {
    padding: 0 18px;
    border: 0;
    color: #050708;
    background: var(--sf-dive-blue);
    font-weight: 900;
    cursor: pointer;
}

.sf-deep-dive-scope {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 24px 4px 0;
    color: var(--sf-dive-muted);
    font-size: 0.85rem;
}

.sf-deep-dive-scope strong {
    color: var(--sf-dive-text);
}

.sf-deep-dive-scope span::before {
    content: "·";
    margin-right: 10px;
    color: var(--sf-dive-gold);
}

.sf-deep-dive-section {
    margin-top: 58px;
}

.sf-deep-dive-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--sf-dive-line);
}

.sf-deep-dive-section-heading p {
    margin: 0 0 4px;
    color: var(--sf-dive-gold);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.sf-deep-dive-section-heading h2 {
    margin: 0;
    font-size: clamp(1.7rem, 4vw, 2.7rem);
    letter-spacing: -0.035em;
}

.sf-deep-dive-section-heading > span {
    color: var(--sf-dive-muted);
    font-size: 0.8rem;
    text-align: right;
}

.sf-deep-dive-section-copy {
    max-width: 720px;
    margin: 14px 0 22px;
    color: var(--sf-dive-muted);
    line-height: 1.55;
}

.sf-deep-dive-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.sf-deep-dive-panel {
    overflow: hidden;
    border: 1px solid var(--sf-dive-line);
    border-radius: 18px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.025),
            transparent 42%
        ),
        var(--sf-dive-panel);
}

.sf-deep-dive-panel h3 {
    margin: 0;
    padding: 17px 20px;
    border-bottom: 1px solid var(--sf-dive-line);
    font-size: 1rem;
    letter-spacing: 0.01em;
}

.sf-deep-dive-sizz h3 {
    color: var(--sf-dive-red);
}

.sf-deep-dive-fizz h3 {
    color: var(--sf-dive-blue);
}

.sf-deep-dive-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sf-deep-dive-list li {
    min-height: 70px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px 18px;
    border-bottom: 1px solid rgba(212, 220, 225, 0.11);
}

.sf-deep-dive-list li:last-child {
    border-bottom: 0;
}

.sf-deep-dive-rank {
    color: var(--sf-dive-muted);
    font-size: 0.83rem;
    font-weight: 900;
    text-align: center;
}

.sf-deep-dive-identity {
    min-width: 0;
    color: var(--sf-dive-text);
    text-decoration: none;
}

.sf-deep-dive-identity strong,
.sf-deep-dive-identity small {
    display: block;
}

.sf-deep-dive-identity strong {
    overflow: hidden;
    font-size: 0.94rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sf-deep-dive-identity small {
    margin-top: 4px;
    color: var(--sf-dive-muted);
    font-size: 0.73rem;
    font-weight: 700;
}

.sf-deep-dive-identity:hover strong,
.sf-deep-dive-identity:focus-visible strong {
    color: var(--sf-dive-gold);
}

.sf-deep-dive-metric {
    min-width: 86px;
    text-align: right;
}

.sf-deep-dive-metric strong,
.sf-deep-dive-metric span {
    display: block;
}

.sf-deep-dive-metric strong {
    font-size: 1rem;
}

.sf-deep-dive-metric span {
    margin-top: 4px;
    color: var(--sf-dive-muted);
    font-size: 0.68rem;
}

.sf-deep-dive-empty {
    margin: 0;
    padding: 34px 20px;
    color: var(--sf-dive-muted);
    line-height: 1.5;
    text-align: center;
}

.sf-deep-dive-footnote {
    max-width: 720px;
    margin: 54px auto 0;
    color: var(--sf-dive-muted);
    font-size: 0.78rem;
    line-height: 1.55;
    text-align: center;
}

@media (max-width: 760px) {
    .sf-deep-dive-shell {
        width: min(100% - 20px, 1180px);
    }

    .sf-deep-dive-topbar {
        min-height: 96px;
        grid-template-columns: 1fr auto;
    }

    .sf-deep-dive-header-balance {
        display: none;
    }

    .sf-deep-dive-brand-lockup {
        text-align: left;
    }

    .sf-deep-dive-brand img {
        width: 94px;
    }

    .sf-deep-dive-brand-lockup p {
        display: none;
    }

    .sf-deep-dive-topbar nav {
        gap: 12px;
    }

    .sf-deep-dive-topbar nav a {
        font-size: 0.75rem;
    }

    .sf-deep-dive-topbar nav a:last-child {
        display: none;
    }

    .sf-deep-dive-hero {
        margin-top: 48px;
    }

    .sf-deep-dive-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .sf-deep-dive-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .sf-deep-dive-tabs a {
        min-width: 0;
    }

    .sf-deep-dive-controls form {
        grid-template-columns: 1fr auto;
    }

    .sf-deep-dive-controls label {
        grid-column: 1 / -1;
    }

    .sf-deep-dive-grid {
        grid-template-columns: 1fr;
    }

    .sf-deep-dive-section-heading {
        align-items: start;
        flex-direction: column;
    }

    .sf-deep-dive-section-heading > span {
        text-align: left;
    }
}

@media (max-width: 430px) {
    .sf-deep-dive-list li {
        grid-template-columns: 26px minmax(0, 1fr) auto;
        gap: 9px;
        padding-inline: 12px;
    }

    .sf-deep-dive-metric {
        min-width: 74px;
    }
}

/* Deep Dive ranked-list scrolling */
.sf-deep-dive-list {
    max-height: 490px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color:
        rgba(217, 181, 92, 0.72)
        rgba(255, 255, 255, 0.07);
}

.sf-deep-dive-list::-webkit-scrollbar {
    width: 8px;
}

.sf-deep-dive-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.07);
}

.sf-deep-dive-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(217, 181, 92, 0.72);
}

.sf-deep-dive-list::-webkit-scrollbar-thumb:hover {
    background: rgba(217, 181, 92, 0.95);
}

@media (max-width: 760px) {
    .sf-deep-dive-list {
        max-height: 350px;
    }
}
