.market-page {
    background:
        linear-gradient(180deg, rgba(245, 249, 253, 0.96) 0%, #ffffff 34rem),
        #ffffff;
    color: #0b2239;
    padding: 28px 16px 54px;
}

.market-shell {
    max-width: 1280px;
    margin: 0 auto;
}

.market-hero,
.market-command-card,
.market-search-card,
.market-stat,
.market-tool-card,
.market-list-card,
.market-group-card,
.market-region-card {
    border: 1px solid #d8e4ef;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(17, 46, 78, 0.08);
}

.market-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    gap: 24px;
    align-items: center;
    overflow: hidden;
    padding: 28px;
    background:
        linear-gradient(135deg, rgba(8, 35, 62, 0.98), rgba(18, 73, 108, 0.96) 54%, rgba(23, 118, 151, 0.92)),
        #08233e;
    color: #ffffff;
    position: relative;
}

.market-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
    background-size: 34px 34px;
    opacity: 0.7;
    pointer-events: none;
}

.market-hero > * {
    position: relative;
    z-index: 1;
}

.market-hero__identity {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    min-width: 0;
}

.market-hero__flag {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.1);
}

.market-hero__flag img {
    border-radius: 50%;
    object-fit: cover;
}

.market-kicker,
.market-card-label,
.market-section-heading p,
.market-list-card__badge {
    margin: 0 0 8px;
    color: #1f75ff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.market-hero .market-kicker {
    color: #8bd6ff;
}

.market-hero h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.05rem, 4vw, 4.1rem);
    line-height: 1.02;
    letter-spacing: 0;
}

.market-hero p {
    max-width: 760px;
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.02rem;
    line-height: 1.6;
}

.market-hero__controls {
    display: grid;
    gap: 8px;
}

.market-hero__controls label {
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.market-select-control,
.market-stock-search input {
    width: 100%;
    border: 1px solid #cbd9e7;
    border-radius: 8px;
    background: #ffffff;
    color: #0b2239;
    font-weight: 700;
}

.market-select-control {
    min-height: 46px;
    padding: 0 14px;
}

.market-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 18px;
    margin-top: 18px;
}

.market-command-card,
.market-search-card {
    background: #ffffff;
    padding: 20px;
}

.market-command-card--primary {
    border-top: 3px solid #25c28a;
}

.market-command-card__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #4a6178;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.market-command-card__header strong {
    color: #0b2239;
}

.market-command-card__body {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.market-command-card__body div,
.market-stat,
.market-group-card {
    background: #f6f9fc;
    border-radius: 8px;
}

.market-command-card__body div {
    padding: 14px;
}

.market-command-card__body span,
.market-stat span {
    display: block;
    color: #52677c;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.market-command-card__body strong,
.market-stat strong {
    display: block;
    margin-top: 6px;
    color: #071c31;
    font-size: 1.12rem;
    line-height: 1.25;
}

.market-stock-search {
    display: flex;
    gap: 8px;
    position: relative;
}

.market-stock-search input {
    min-height: 48px;
    padding: 0 14px;
}

.market-stock-search button {
    display: grid;
    place-items: center;
    width: 52px;
    min-width: 52px;
    border: 0;
    border-radius: 8px;
    background: #2486dc;
    color: #ffffff;
}

.market-search-card p:last-child {
    margin: 12px 0 0;
    color: #52677c;
}

.market-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.market-stat {
    padding: 18px;
    background: #ffffff;
}

.market-stat strong {
    font-size: 1.55rem;
}

.market-tools-section,
.market-lists-section,
.market-list-groups,
.market-universe {
    margin-top: 34px;
}

.market-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 14px;
}

.market-section-heading h2 {
    margin: 0;
    color: #0b2239;
    font-size: clamp(1.55rem, 2.2vw, 2.25rem);
    letter-spacing: 0;
}

.market-tool-grid,
.market-feature-grid,
.market-group-grid,
.market-region-grid {
    display: grid;
    gap: 14px;
}

.market-tool-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.market-tool-card,
.market-list-card,
.market-group-card,
.market-chip {
    color: inherit;
    text-decoration: none;
}

.market-tool-card {
    display: grid;
    gap: 8px;
    padding: 18px;
    background: #ffffff;
    border-top: 3px solid #2486dc;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.market-tool-card:hover,
.market-list-card:hover,
.market-group-card:hover,
.market-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(17, 46, 78, 0.12);
}

.market-tool-card i {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #eaf4ff;
    color: #2486dc;
}

.market-tool-card span,
.market-list-card strong,
.market-group-card strong {
    color: #0b2239;
    font-size: 1.05rem;
    font-weight: 900;
}

.market-tool-card small,
.market-list-card small,
.market-group-card small {
    color: #52677c;
    line-height: 1.55;
}

.market-feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.market-list-card {
    display: grid;
    gap: 9px;
    min-height: 154px;
    padding: 18px;
    background: #ffffff;
    border-top: 3px solid #7aa8d7;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.market-list-card--bullish {
    border-top-color: #18a96b;
}

.market-list-card--bearish {
    border-top-color: #d8354b;
}

.market-list-card--income {
    border-top-color: #d8a51f;
}

.market-list-card--event {
    border-top-color: #6b7bd9;
}

.market-list-card--risk {
    border-top-color: #e26d2f;
}

.market-list-card__badge {
    width: fit-content;
    margin: 0;
    padding: 5px 8px;
    border-radius: 999px;
    background: #eef5ff;
    color: #205d96;
}

.market-group-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.market-group-card {
    display: grid;
    gap: 7px;
    min-height: 132px;
    padding: 16px;
    background: #ffffff;
}

.market-group-card > span {
    color: #2486dc;
    font-size: 1.7rem;
    font-weight: 900;
}

.market-region-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.market-region-card {
    padding: 18px;
    background: #ffffff;
}

.market-region-card h3 {
    margin: 0 0 12px;
    color: #0b2239;
    font-size: 1.05rem;
}

.market-chip-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.market-chip {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #e1ebf4;
    border-radius: 8px;
    background: #f8fbfe;
}

.market-chip.is-active {
    border-color: #2486dc;
    background: #eef6ff;
}

.market-chip img {
    border-radius: 50%;
    object-fit: cover;
}

.market-chip span {
    overflow: hidden;
    color: #102a42;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.market-chip strong {
    color: #52677c;
    font-size: 0.78rem;
}

.market-page .ticker-results {
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 20;
}

@media (max-width: 1100px) {
    .market-hero,
    .market-overview-grid {
        grid-template-columns: 1fr;
    }

    .market-tool-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .market-feature-grid,
    .market-group-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .market-page {
        padding: 16px 10px 40px;
    }

    .market-hero {
        padding: 20px;
    }

    .market-hero__identity {
        flex-direction: column;
    }

    .market-command-card__body,
    .market-stat-grid,
    .market-tool-grid,
    .market-feature-grid,
    .market-group-grid,
    .market-region-grid,
    .market-chip-list {
        grid-template-columns: 1fr;
    }

    .market-section-heading {
        display: block;
    }

    .market-stat strong {
        font-size: 1.35rem;
    }
}
