.news_page .container {
    width: min(920px, calc(100vw - 16px));
}

.news_page_shell {
    display: grid;
    gap: 10px;
    margin: 12px 0 24px;
}

.news_page_header {
    padding: 12px 14px;
    background: #002c37;
    border-radius: 0;
    box-shadow: none;
}

.news_page_header p {
    margin: 0;
    color: rgba(255, 255, 255);
    font-size: 13px;
}

.live_indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    min-height: 22px;
    padding: 0;
    color: #d7eef8;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    margin-top: 10px;
}

.live_dot {
    width: 8px;
    height: 8px;
    background: #77d66a;
    flex: 0 0 8px;
    border-radius: 999px;
}

.live_indicator_meta .live_text {
    color: #9fe3ff;
    letter-spacing: 0.02em;
}

.live_meta {
    color: rgba(255, 255, 255, 0.52);
    font-weight: 500;
}

.filters_container {
    display: grid;
    gap: 7px;
    padding: 10px 12px;
    background: #16191a;
}

.feed_stats_strip {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    width: fit-content;
    color: rgba(226, 241, 247, 0.54);
    font-size: 12px;
}

.feed_stat {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    min-width: 0;
}

.feed_stat_label {
    overflow: hidden;
    color: rgba(226, 241, 247, 0.45);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feed_stat_value {
    overflow: hidden;
    color: rgba(246, 252, 255, 0.78);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.market_view_panel {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.market_view_panel[hidden] {
    display: none !important;
}

.market_search_shell {
    display: grid;
    gap: 6px;
    padding: 12px;
    background: #16191a;
}

.market_search_label {
    color: rgba(255, 255, 255, 0.48);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.market_search_box {
    position: relative;
    min-width: 0;
}

.market_search_input {
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    border: 1px solid rgba(159, 227, 255, 0.22);
    border-radius: 0;
    background: #071218;
    color: #f5fbff;
    padding: 0 12px;
    font: inherit;
    font-size: 14px;
    outline: none;
}

.market_search_input:focus {
    border-color: #00a6d1;
}

.market_autocomplete {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    display: grid;
    gap: 1px;
    max-height: min(440px, 72vh);
    overflow: auto;
    background: #071218;
    border: 1px solid rgba(159, 227, 255, 0.22);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
}

.market_autocomplete_item {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    width: 100%;
    min-height: 48px;
    padding: 9px 10px;
    border: 0;
    border-radius: 0;
    background: #11191d;
    color: #f5fbff;
    text-align: left;
}

.market_autocomplete_item:hover,
.market_autocomplete_item:focus {
    background: #1f333d;
    opacity: 1;
}

.market_autocomplete_pic {
    width: 28px;
    height: 28px;
    object-fit: cover;
    background: #000;
}

.market_autocomplete_text {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.market_autocomplete_title {
    color: #f5fbff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.market_autocomplete_meta,
.market_autocomplete_empty {
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    font-weight: 500;
}

.market_autocomplete_empty {
    padding: 12px;
    background: #11191d;
}

.market_view_empty,
.market_detail,
.market_detail_error,
.market_detail_loading {
    padding: 13px 12px;
    background: #16191a;
    color: rgba(255, 255, 255, 0.68);
    font-size: 13px;
    font-weight: 600;
}

.market_detail {
    padding: 12px;
}

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

.market_detail_event_target {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.market_detail_event_link {
    cursor: pointer;
}

.market_detail_event_link:hover h2 {
    color: #9fe3ff;
}

.market_detail_pic {
    width: 42px;
    height: 42px;
    object-fit: cover;
    background: #000;
}

.market_detail_title_block {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.market_detail_kicker {
    color: #9fe3ff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.market_detail h2 {
    margin: 0;
    color: #ffffff;
    font-size: 17px;
    line-height: 1.22;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.market_detail_actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
}

.market_detail_link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 10px;
    background: #0d546c;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.market_detail_markets {
    display: grid;
    gap: 1px;
    margin-top: 12px;
    max-height: 260px;
    overflow: auto;
    background: rgba(255, 255, 255, 0.06);
}

.market_detail_market {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-height: 42px;
    padding: 8px 9px;
    background: #11191d;
    color: #f5fbff;
}

.market_detail_market:hover {
    background: #1f333d;
}

.market_detail_market_pic {
    width: 24px;
    height: 24px;
    object-fit: cover;
    background: #000;
}

.market_detail_market_text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.market_detail_market_title {
    color: #f5fbff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.market_detail_market_meta {
    color: rgba(255, 255, 255, 0.55);
    font-size: 11px;
    font-weight: 500;
}

.market_detail_market_meta strong,
.market_autocomplete_meta strong {
    color: rgba(255, 255, 255, 0.78);
    font-weight: 750;
}

.filters_title {
    color: rgba(255, 255, 255, 0.48);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.feed_filters {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.feed_settings {
    display: grid;
    gap: 8px;
}

.feed_setting_group {
    display: grid;
    gap: 5px;
}

.feed_setting_group + .feed_setting_group {
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.feed_setting_label {
    color: rgba(255, 255, 255, 0.38);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

@media (min-width: 640px) {
    .feed_settings {
        display: grid;
        gap: 8px;
    }

    .feed_setting_group {
        display: grid;
        gap: 5px;
    }

    .feed_setting_group + .feed_setting_group {
        padding-top: 8px;
        padding-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.09);
        border-left: 0;
    }
}

.feed_filter {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 18px;
    padding: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    border-radius: 0;
    margin-right: 7px;
}

.feed_filter input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.feed_filter_disabled {
    cursor: default;
    color: rgba(255, 255, 255, 0.45);
}

.feed_filter_disabled .feed_filter_box {
    border-color: rgba(255, 255, 255, 0.38);
    background: transparent;
}

.feed_filter_box {
    position: relative;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: #0f1517;
    border-radius: 0;
}

.feed_filter input:checked + .feed_filter_box {
    border-color: #00a6d1;
    background: #00a6d1;
}

.feed_filter input:checked + .feed_filter_box::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 1px;
    width: 5px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

.feed_filter:has(input:focus-visible) {
    outline: 1px solid #9fe3ff;
    outline-offset: 3px;
}

.empty_news {
    padding: 16px 14px;
    background: #16191a;
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
    font-weight: 600;
}

.news {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.a_news {
    display: flex;
    gap: 8px;
    background: #000000;
    padding: 10px 12px;
    flex-direction: column;
    position: relative;
    height: max-content;
    font-size: 14px;
    border-radius: 0;
    box-shadow: none;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.a_news_skeleton {
    pointer-events: none;
}

.news_content_block {
    display: grid;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ffffff3b;
}

.market_news .news_content_block {
    padding-bottom: 0;
    border-bottom: 0;
}

.a_news_text {
    font-style: normal;
    font-size: 14px;
    font-weight: 500;
    color: #f5fbff;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.a_news_text_expandable {
    cursor: pointer;
}

.news_source_block {
    display: flex;
    gap: 8px;
    padding: 0;
    overflow: hidden;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    width: fit-content;
}

.news_source {
    display: flex;
    font-size: 12px;
    font-weight: 600;
    align-items: center;
    gap: 5px;
    color: #d7eef8;
    min-width: 0;
    flex: 0 1 auto;
    max-width: 100%;
}

.news_source span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.source_icon {
    width: 18px;
    height: 18px;
    object-fit: cover;
    flex: 0 0 18px;
    border-radius: 0;
}

.news_time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
    flex: 0 0 auto;
}

.news_attachments {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.news_attachment {
    position: relative;
    display: block;
    width: min(180px, 100%);
    max-width: 100%;
    background: rgba(255, 255, 255, 0.04);
}

.news_attachment img {
    display: block;
    width: 100%;
    max-height: 260px;
    object-fit: cover;
}

.news_attachment_play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.58);
    transform: translate(-50%, -50%);
}

.news_attachment_play::after {
    content: "";
    position: absolute;
    left: 17px;
    top: 13px;
    width: 0;
    height: 0;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 14px solid #fff;
}

.image_viewer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.78);
}

.image_viewer_open {
    display: flex;
}

.image_viewer_img {
    display: block;
    max-width: min(100%, 1100px);
    max-height: calc(100vh - 80px);
    object-fit: contain;
}

.image_viewer_close {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 1;
    padding: 7px 10px;
    border: 0;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}


.related_markets_wrap {
    position: relative;
}

.related_markets_wrap_collapsed {
    overflow: hidden;
}

.related_markets {
    position: relative;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 12px;
    padding: 4px 0 0;
    min-width: 0;
    max-width: 100%;
    --related-market-row-height: 26px;
    --related-market-row-gap: 6px;
    --related-market-top-padding: 8px;
    --related-market-overlay-height: 26px;
    row-gap: var(--related-market-row-gap);
}

.related_markets_collapsed {
    max-height: calc(
        var(--related-market-top-padding) +
        (var(--related-market-row-height) * 2) +
        (var(--related-market-row-gap) * 2) +
        var(--related-market-overlay-height)
    );
    overflow: hidden;
}


.related_markets a {
    position: relative;
    padding: 4px 7px;
    display: flex;
    align-items: center;
    min-height: var(--related-market-row-height);
    gap: 6px;
    border-radius: 0;
    background-color: transparent;
    color: #d5ebf5;
    transition: background-color 0.2s ease, transform 0.2s ease;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.related_markets a:hover {
    transform: none;
}

.related_markets a::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: #1f333d;
    opacity: var(--relevance-opacity, 1);
    transition: background-color 0.2s ease;
}

.related_markets a:hover::before {
    background-color: #284754;
}

.related_markets a span,
.related_markets a img {
    position: relative;
    z-index: 1;
}

.related_markets_toggle {
    display: block;
    width: 100%;
    margin: 6px 0 0;
    padding: 7px 10px;
    border: 0;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 1);
    font: inherit;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
}

.related_markets_wrap_collapsed .related_markets_toggle {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    width: 100%;
    max-width: none;
    min-height: var(--related-market-overlay-height);
    margin: 0;
    padding: 6px 10px;
    border: 0;
    border-radius: 0;
    color: rgba(255, 255, 255, 1);
    text-align: left;
    box-shadow: none;
    background: #10191d;
}

.related_markets a img {
    width: 18px;
    height: 18px;
    object-fit: cover;
    flex: 0 0 18px;
    border-radius: 0;
    opacity: var(--relevance-opacity, 1);
}

.market_pic {
    width: 18px;
    height: 18px;
    object-fit: cover;
    flex: 0 0 18px;
    border-radius: 0;
}

.skeleton_line {
    display: block;
    height: 12px;
    background: linear-gradient(90deg, #2a3134 25%, #394144 50%, #2a3134 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.2s linear infinite;
}

.skeleton_line_source {
    width: 180px;
}

.skeleton_line_time {
    width: 70px;
}

.skeleton_line_text {
    width: 100%;
}

.skeleton_line_text_short {
    width: 68%;
}

.a_news_insert {
    animation: newsInsert 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes skeletonPulse {
    from {
        background-position: 200% 0;
    }

    to {
        background-position: -200% 0;
    }
}

@keyframes newsInsert {
    from {
        opacity: 0;
        transform: translateY(-18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 700px) {
    .container {
        width: inherit;
    }

    .news_page_header {
        padding: 10px 12px;
    }

    .a_news {
        padding: 9px 10px;
    }

    .a_news_text {
        font-size: 14px;
    }

    .news_source_block {
        gap: 6px;
    }

    .market_detail_header {
        grid-template-columns: minmax(0, 1fr);
    }

    .market_detail_event_target {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .market_detail_pic {
        width: 36px;
        height: 36px;
    }

    .market_detail_actions {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: stretch;
    }

    .market_detail_link {
        flex: 1 1 0;
        min-width: 0;
        width: auto;
    }
}

/* @media (min-width: 1200px) {
    .news {
        grid-template-columns: repeat(auto-fit, minmax(29%, 1fr));
    }
} */
