.site-header {
    position: static;
    top: auto;
}

.section {
    scroll-margin-top: 24px;
}

.market-section {
    padding-top: clamp(28px, 2.5vw, 36px);
}

.market-section h1 {
    margin: 0;
    overflow-wrap: break-word;
    font-size: clamp(30px, 3.4vw, 45px);
    line-height: 1.3;
    letter-spacing: -.035em;
}

.noscript-note {
    margin: 12px 0 0;
    padding: 10px 12px;
    border: 1px solid #6b5531;
    border-radius: 8px;
    background: #241d14;
    color: #f4cd86;
    font-size: 12px;
}

@media (max-width: 640px) {
    .site-header {
        display: block;
        position: relative;
        height: 0;
        border: 0;
        background: transparent;
        backdrop-filter: none;
    }

    .site-header .header-inner {
        position: relative;
        min-height: 0;
    }

    .site-header .brand,
    .breadcrumbs {
        display: none;
    }

    .menu-button {
        position: absolute;
        z-index: 52;
        top: 12px;
        right: 0;
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border-color: #385166;
        background: #101c29;
    }

    .menu-icon,
    .menu-icon::before,
    .menu-icon::after {
        display: block;
        width: 20px;
        height: 2px;
        border-radius: 2px;
        background: currentColor;
        transition: transform .2s ease, top .2s ease, opacity .2s ease;
    }

    .menu-icon {
        position: relative;
    }

    .menu-icon::before,
    .menu-icon::after {
        position: absolute;
        left: 0;
        content: "";
    }

    .menu-icon::before {
        top: -6px;
    }

    .menu-icon::after {
        top: 6px;
    }

    .menu-button[aria-expanded="true"] .menu-icon {
        background: transparent;
    }

    .menu-button[aria-expanded="true"] .menu-icon::before {
        top: 0;
        transform: rotate(45deg);
    }

    .menu-button[aria-expanded="true"] .menu-icon::after {
        top: 0;
        transform: rotate(-45deg);
    }

    .main-nav {
        z-index: 51;
        top: 64px;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: #0c1723;
        box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
    }

    .main-nav a {
        border-radius: 8px;
    }

    .main-nav a:hover,
    .main-nav a:focus-visible {
        background: rgba(102, 224, 187, .08);
    }

    .section {
        scroll-margin-top: 12px;
    }

    .market-section {
        padding-top: 24px;
    }
}

/* Market Macro Bar */
.macro-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 20px 0 24px;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(16, 28, 41, 0.8), rgba(20, 36, 52, 0.8));
}
.macro-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.macro-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}
.macro-value {
    color: var(--text);
    font-size: 16px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* Quick PAA Converter Box */
.quick-paa-box {
    margin: 0 0 28px;
    padding: 18px 22px;
    border: 1px solid #28445a;
    border-radius: 16px;
    background: radial-gradient(circle at 100% 0, rgba(102, 224, 187, 0.08), transparent 60%), #0d1a27;
}
.quick-paa-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.quick-paa-title h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--accent);
}
.quick-paa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}
.quick-coin-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
    text-decoration: none;
    transition: border-color .2s, transform .15s;
}
.quick-coin-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.quick-coin-symbol {
    font-weight: 800;
    color: var(--text);
    font-size: 13px;
}
.quick-coin-sub {
    display: block;
    color: var(--muted);
    font-size: 11px;
}
.quick-coin-price {
    font-weight: 800;
    color: var(--accent);
    font-size: 14px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Currency Toggle */
.market-toolbar-actions {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}

.currency-toggle {
    display: inline-flex;
    min-width: 0;
    padding: 2px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0b1723;
}
.currency-btn {
    padding: 4px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.currency-btn.is-active {
    background: var(--accent);
    color: #08201e;
}

@media (max-width: 640px) {
    .market-toolbar {
        display: flex;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .market-toolbar .search-wrap {
        width: 100%;
        min-width: 0;
    }

    .market-toolbar-actions {
        display: grid;
        width: 100%;
        min-width: 0;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
    }

    .market-toolbar-actions .currency-toggle {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .market-toolbar-actions .currency-btn {
        min-width: 0;
        min-height: 42px;
        padding-inline: 8px;
    }

    .market-toolbar-actions .text-button {
        min-width: 0;
        min-height: 44px;
        max-width: 100%;
        padding: 6px 2px;
        line-height: 1.25;
        overflow-wrap: anywhere;
        white-space: nowrap;
    }
}

@media (max-width: 360px) {
    .market-toolbar-actions {
        grid-template-columns: 1fr;
    }

    .market-toolbar-actions .text-button {
        justify-self: start;
    }
}

/* Table Link & Range Cell */
.coin-title-link {
    color: var(--text);
    text-decoration: none;
}
.coin-title-link:hover {
    color: var(--accent);
    text-decoration: underline;
}
.range-cell {
    font-size: 12px;
    white-space: nowrap;
    line-height: 1.4;
}
.range-high {
    color: var(--up);
    display: block;
}
.range-low {
    color: var(--down);
    display: block;
}

/* Interactive Chart Tooltip & Crosshair */
.chart-frame {
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
}
.chart-tooltip {
    position: absolute;
    pointer-events: none;
    background: rgba(13, 27, 41, 0.94);
    border: 1px solid var(--accent, #66e0bb);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    padding: 8px 14px;
    color: var(--text, #fff);
    white-space: nowrap;
    z-index: 20;
    transition: transform 0.08s ease, left 0.05s ease, top 0.05s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.chart-tooltip-date {
    display: block;
    color: var(--muted, #8192a8);
    font-size: 11px;
    margin-bottom: 2px;
}
.chart-tooltip-price {
    display: block;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.chart-tooltip-sub {
    display: block;
    color: var(--muted, #8192a8);
    font-size: 11px;
    margin-top: 2px;
}

/* ==========================================================================
   Social Share Bar Component for Crypto Pages
   ========================================================================== */
.crypto-share-section {
    padding: clamp(24px, 3vw, 36px) 0 clamp(26px, 3.5vw, 38px);
}

.crypto-share-wrapper .social-share-bar {
    display: flex;
    width: 100%;
    margin: 0;
    padding: clamp(14px, 2vw, 18px) clamp(16px, 2.5vw, 24px);
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    background: rgba(12, 18, 27, .72);
    box-shadow: 0 4px 20px rgba(0, 0, 0, .2);
    box-sizing: border-box;
}

.share-label,
.crypto-share-wrapper .share-label {
    color: #9aa8b8;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}

.share-buttons-group,
.crypto-share-wrapper .share-buttons-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
}

.share-btn,
.crypto-share-wrapper .share-btn {
    display: inline-flex;
    height: 32px;
    padding: 0 12px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    background: rgba(13, 19, 28, .75);
    color: #c9d5e3;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease, color .2s ease;
    user-select: none;
    -webkit-user-select: none;
    box-sizing: border-box;
}

.share-btn svg,
.crypto-share-wrapper .share-btn svg {
    flex-shrink: 0;
    transition: transform .2s ease;
}

.share-btn:hover,
.crypto-share-wrapper .share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .28);
}

.share-btn:hover svg,
.crypto-share-wrapper .share-btn:hover svg {
    transform: scale(1.08);
}

.share-btn:focus-visible,
.crypto-share-wrapper .share-btn:focus-visible {
    outline: 2px solid var(--accent, #66e0bb);
    outline-offset: 2px;
}

/* Facebook Button */
.share-btn-fb:hover,
.crypto-share-wrapper .share-btn-fb:hover {
    color: #fff;
    border-color: rgba(24, 119, 242, .6);
    background: rgba(24, 119, 242, .14);
}

/* Messenger Button */
.share-btn-msg:hover,
.crypto-share-wrapper .share-btn-msg:hover {
    color: #fff;
    border-color: rgba(0, 132, 255, .6);
    background: rgba(0, 132, 255, .14);
}

/* X (Twitter) Button */
.share-btn-x:hover,
.crypto-share-wrapper .share-btn-x:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, .38);
    background: rgba(255, 255, 255, .1);
}

/* Line Button */
.share-btn-line:hover,
.crypto-share-wrapper .share-btn-line:hover {
    color: #fff;
    border-color: rgba(6, 199, 85, .6);
    background: rgba(6, 199, 85, .14);
}

/* Copy Link Button */
.share-btn-copy:hover,
.crypto-share-wrapper .share-btn-copy:hover {
    color: #fff;
    border-color: rgba(255, 159, 82, .6);
    background: rgba(255, 159, 82, .14);
}

.share-btn-copy.is-copied,
.crypto-share-wrapper .share-btn-copy.is-copied {
    color: #38ef7d;
    border-color: rgba(6, 199, 85, .8);
    background: rgba(6, 199, 85, .2);
}

.share-btn-copy.is-copied svg,
.crypto-share-wrapper .share-btn-copy.is-copied svg {
    color: #38ef7d;
}

@media (max-width: 640px) {
    .crypto-share-section {
        padding: 18px 0 24px;
    }
    .crypto-share-wrapper .social-share-bar {
        padding: 12px 14px;
        gap: 8px 10px;
    }
    .crypto-share-wrapper .share-buttons-group {
        gap: 6px;
    }
    .share-btn,
    .crypto-share-wrapper .share-btn {
        height: 30px;
        padding: 0 10px;
        font-size: 12px;
        gap: 5px;
    }
}

