* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--ui-bg);
    color: #d7dde7;
    font-family: var(--ui-font);
}

.shell {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 18px;
    border-bottom: 1px solid #202633;
    background: #0b0e14;
}

.title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

h1 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.subtitle {
    color: #7d8797;
    font-size: var(--ui-text-small);
}

.controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.chart-controls.is-hidden,
.content.is-hidden,
.is-hidden {
    display: none;
}

button {
    min-width: 72px;
    height: 32px;
    border: 1px solid var(--ui-line);
    background: var(--ui-control);
    color: #c9d2e1;
    border-radius: var(--ui-radius);
    cursor: pointer;
    font: inherit;
    font-size: var(--ui-text-control);
}

.select-control {
    height: 32px;
    min-width: 132px;
    border: 1px solid var(--ui-line);
    background: var(--ui-control);
    color: #c9d2e1;
    border-radius: var(--ui-radius);
    padding: 0 10px;
    font: inherit;
    font-size: var(--ui-text-control);
}

button:hover {
    border-color: #3f8cff;
}

button.active {
    color: #ffffff;
    border-color: #3f8cff;
    background: #173155;
}

.coin-form {
    display: grid;
    grid-template-columns: auto 88px auto;
    align-items: center;
    gap: 8px;
}

.coin-form label {
    color: #7d8797;
    font-size: var(--ui-text-small);
}

.coin-form input {
    width: 88px;
    height: 32px;
    padding: 0 9px;
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius);
    background: var(--ui-control);
    color: #c9d2e1;
    font: inherit;
    text-transform: uppercase;
}

.coin-form-status {
    grid-column: 1 / -1;
    max-width: 280px;
    color: #7d8797;
    font-size: var(--ui-text-small);
}

.status {
    min-width: 172px;
    color: #7d8797;
    font-size: var(--ui-text-small);
    text-align: right;
}

.content {
    padding: 12px 18px 18px;
    min-height: 0;
}

.summary-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

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

.summary-stats {
    color: #9aa6b8;
    font-size: var(--ui-text-control);
    white-space: nowrap;
}

.table-wrap {
    overflow: auto;
    border: 1px solid #1b2230;
    border-radius: 10px;
    background: #080b10;
    max-height: calc(100vh - 150px);
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1380px;
    font-size: var(--ui-text-control);
}

.summary-table th,
.summary-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #1b2230;
    text-align: right;
    white-space: nowrap;
}

.summary-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #0d121b;
    color: #95a0b2;
    font-weight: 600;
}

.summary-table th button {
    width: 100%;
    min-width: 0;
    height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: inherit;
}

.summary-table th button:hover,
.summary-table th button.active {
    color: #ffffff;
    background: transparent;
}

.summary-table th button.active::after {
    content: " ↓";
    color: #3f8cff;
}

.summary-table th button.active[data-direction="asc"]::after {
    content: " ↑";
}

.summary-table tr:hover td {
    background: rgba(63, 140, 255, 0.06);
}

.ai-advice-cell {
    max-width: 190px;
    color: #cbd7e8;
    text-align: left;
    white-space: normal;
    line-height: 1.25;
}

.summary-main-row {
    cursor: pointer;
}

.row-toggle {
    display: inline-block;
    width: 18px;
    color: #7f8ca3;
    font-size: var(--ui-text-small);
}

.summary-detail-row td {
    background: #05080d;
    padding: 0;
}

.summary-detail-card {
    margin: 0;
    padding: 16px 18px 18px;
    border-top: 1px solid #111722;
    border-bottom: 1px solid #111722;
    background: #060a11;
}

.summary-detail-title {
    margin-bottom: 12px;
    color: #d9e3f2;
    font-weight: 700;
    text-align: left;
}

.rating-chart-card {
    margin-bottom: 16px;
    padding: 14px 16px 12px;
    border: 1px solid #1a2638;
    border-radius: 12px;
    background:
        radial-gradient(circle at 16% 0%, rgba(63, 140, 255, 0.12), transparent 32%),
        linear-gradient(180deg, #0b111b, #070b12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.rating-chart-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 6px;
    color: #d9e3f2;
    text-align: left;
}

.rating-chart-title {
    color: #f2f6ff;
    font-size: var(--ui-text-body);
    font-weight: 700;
}

.rating-chart-subtitle,
.rating-chart-empty {
    color: #7f8ca3;
    font-size: var(--ui-text-small);
    font-weight: 400;
}

.rating-chart-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.rating-chart-chips span,
.rating-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid #253044;
    border-radius: 999px;
    background: rgba(13, 18, 27, 0.78);
    color: #b8c4d8;
    font-size: var(--ui-text-small);
    font-weight: 600;
}

.positive-badge {
    border-color: rgba(73, 209, 140, 0.32);
    background: rgba(73, 209, 140, 0.1);
    color: #49d18c;
}

.negative-badge {
    border-color: rgba(239, 113, 120, 0.32);
    background: rgba(239, 113, 120, 0.1);
    color: #ef7178;
}

.neutral-badge {
    color: #c3ccda;
}

.rating-chart-empty {
    padding: 24px 0;
    text-align: center;
}

.rating-chart {
    display: block;
    width: 100%;
    height: 118px;
}

.factor-chart-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.factor-chart {
    min-width: 0;
    padding: 8px 9px 7px;
    border: 1px solid #172235;
    border-radius: 10px;
    background: rgba(5, 9, 16, 0.58);
}

.factor-chart-meta,
.factor-chart-range {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.factor-chart-meta {
    color: #cbd6e6;
    font-size: var(--ui-text-small);
    font-weight: 700;
}

.factor-chart-meta b {
    color: #f2f6ff;
    font-size: var(--ui-text-small);
}

.factor-chart-range {
    color: #738198;
    font-size: var(--ui-text-small);
}

.factor-chart-svg {
    display: block;
    width: 100%;
    height: 52px;
    margin: 3px 0 1px;
}

.factor-line {
    fill: none;
    stroke: #5d9cff;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.factor-zero {
    stroke: rgba(148, 163, 184, 0.28);
    stroke-dasharray: 4 6;
}

.factor-dot {
    fill: #5d9cff;
    stroke: #050910;
    stroke-width: 1.3;
}

.accent-green .factor-line,
.accent-green .factor-dot {
    stroke: #49d18c;
    fill: #49d18c;
}

.accent-cyan .factor-line,
.accent-cyan .factor-dot {
    stroke: #36c5ad;
    fill: #36c5ad;
}

.accent-yellow .factor-line,
.accent-yellow .factor-dot {
    stroke: #dfb553;
    fill: #dfb553;
}

.accent-orange .factor-line,
.accent-orange .factor-dot {
    stroke: #d08a32;
    fill: #d08a32;
}

.accent-pink .factor-line,
.accent-pink .factor-dot {
    stroke: #ef7178;
    fill: #ef7178;
}

.factor-chart.is-empty {
    display: flex;
    min-height: 92px;
    flex-direction: column;
    justify-content: center;
}

.rating-scale-cell {
    width: 150px;
    min-width: 150px;
}

.rating-scale-head {
    margin-bottom: 5px;
    text-align: center;
}

.rating-scale-track {
    position: relative;
    width: 126px;
    height: 6px;
    margin: 0 auto;
    border-radius: 3px;
    background: linear-gradient(90deg, #b4474c 0%, #394252 50%, #2faa72 100%);
}

.rating-scale-marker {
    position: absolute;
    top: 50%;
    width: 3px;
    height: 14px;
    border-radius: 1px;
    background: #ffffff;
    box-shadow: 0 0 0 1px var(--ui-bg);
    transform: translate(-50%, -50%);
}

.rating-scale-labels {
    display: flex;
    justify-content: space-between;
    width: 126px;
    margin: 3px auto 0;
    color: #657187;
    font-size: var(--ui-text-small);
}

.technical-context {
    display: grid;
    gap: 4px;
    white-space: normal;
}

.technical-context span {
    display: block;
}

.technical-context b {
    color: #aebbd0;
    font-weight: 600;
}
@media (max-width: 1500px) {
    .factor-chart-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .factor-chart-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.factor-chart-title {
    color: #cbd6e6;
    font-size: var(--ui-text-small);
    font-weight: 700;
}

.factor-chart-empty {
    margin-top: 8px;
    color: #738198;
    font-size: var(--ui-text-small);
}

.rating-line {
    fill: none;
    stroke: #5d9cff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rating-zero {
    stroke: rgba(148, 163, 184, 0.32);
    stroke-dasharray: 4 6;
}

.rating-threshold {
    stroke-dasharray: 3 7;
}

.rating-threshold.buy {
    stroke: rgba(73, 209, 140, 0.52);
}

.rating-threshold.sell {
    stroke: rgba(239, 113, 120, 0.52);
}

.rating-dot {
    stroke: #050910;
    stroke-width: 2;
}

.positive-dot {
    fill: #49d18c;
}

.negative-dot {
    fill: #ef7178;
}

.rating-axis-text {
    fill: #7f8ca3;
    font-size: var(--ui-text-small);
}

.rating-last-text {
    fill: #d9e3f2;
    font-size: var(--ui-text-small);
    font-weight: 700;
}

.summary-detail-table {
    width: 100%;
    overflow: hidden;
    border-collapse: collapse;
    border: 1px solid #151f2d;
    border-radius: 10px;
    font-size: var(--ui-text-small);
}

.summary-detail-table th,
.summary-detail-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #151c28;
    text-align: right;
}

.summary-detail-table th {
    background: #0c121c;
    color: #9aabc2;
    font-weight: 600;
}

.summary-detail-table td {
    background: #08101a;
}

.summary-detail-table th:first-child,
.summary-detail-table td:first-child {
    text-align: left;
}

.summary-equation {
    margin-top: 12px;
    padding: 9px 11px;
    border: 1px solid #151f2d;
    border-radius: var(--ui-panel-radius);
    background: #070d15;
    color: #c3ccda;
    font-family: var(--ui-mono);
    text-align: left;
}

.summary-table tr.is-strong-buy td {
    background: rgba(47, 170, 114, 0.12);
}

.summary-table tr.is-strong-sell td {
    background: rgba(180, 71, 76, 0.12);
}

.summary-table .token-cell,
.summary-table th:first-child {
    text-align: left;
}

.summary-table .token-cell {
    color: #ffffff;
    font-weight: 700;
}

.positive {
    color: #49d18c;
}

.negative {
    color: #ef7178;
}

.chart-stack {
    width: 100%;
    height: calc(100vh - 98px);
    min-height: 760px;
    border: 1px solid #1b2230;
    background: #020305;
    display: grid;
    grid-template-rows: 1.45fr repeat(5, 1fr);
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

.detail-chart-stack {
    width: 100%;
    height: 760px;
    min-height: 680px;
    margin: 14px 0 18px;
    border: 1px solid #1b2230;
    border-radius: 12px;
    background: #020305;
    display: grid;
    grid-template-rows: 0.95fr 1.45fr repeat(4, 1fr);
    position: relative;
    overflow: hidden;
}

.pane {
    min-height: 0;
    position: relative;
    border-bottom: 1px solid #1b2230;
}

.pane.price {
    min-height: 0;
}

.pane:last-child {
    border-bottom: 0;
}

.pane-title {
    position: absolute;
    z-index: 2;
    left: 10px;
    top: 8px;
    color: #aeb8c8;
    font-size: var(--ui-text-small);
    pointer-events: none;
}

.pane-title .value {
    margin-left: 8px;
    color: #36c5ad;
}

.chart {
    width: 100%;
    height: 100%;
}

.sync-crosshair {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(214, 222, 235, 0.62);
    display: none;
    pointer-events: none;
    z-index: 4;
}

.empty {
    display: none;
    padding: 42px;
    color: #8d98a8;
    text-align: center;
    border: 1px solid #1b2230;
}

@media (max-width: 760px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .status {
        text-align: left;
    }

    .summary-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .summary-stats {
        white-space: normal;
    }

    .content {
        padding: 10px;
    }

    .pane {
        min-height: 0;
    }

    .pane.price {
        min-height: 0;
    }

    .chart-stack {
        height: calc(100vh - 158px);
        min-height: 700px;
    }

    .detail-chart-stack {
        height: 680px;
        min-height: 620px;
    }
}

.summary-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.summary-modes {
    padding-right: 14px;
    border-right: 1px solid var(--ui-line);
}

.summary-modes button {
    min-width: 96px;
}

.price-cell b,
.price-cell span,
.score-cell b,
.score-cell span {
    display: block;
}

.price-cell span,
.score-cell span {
    margin-top: 2px;
    font-size: var(--ui-text-small);
}

.score-cell b {
    color: #e7edf7;
}

.score-cell span {
    color: #657287;
}

.total-score-cell {
    color: #ffffff;
    font-size: var(--ui-text-body);
    font-weight: 800;
}

.allocation-badge {
    display: inline-flex;
    min-width: 54px;
    height: 26px;
    align-items: center;
    justify-content: center;
    border: 1px solid #30394a;
    border-radius: var(--ui-radius);
    background: #111722;
    color: #c8d2e1;
    font-weight: 800;
}

.allocation-100 {
    border-color: rgba(73, 209, 140, 0.55);
    background: rgba(73, 209, 140, 0.14);
    color: #64dda0;
}

.allocation-50 {
    border-color: rgba(54, 197, 173, 0.48);
    background: rgba(54, 197, 173, 0.11);
    color: #54d6c0;
}

.allocation-25 {
    border-color: rgba(223, 181, 83, 0.48);
    background: rgba(223, 181, 83, 0.1);
    color: #e7c66f;
}

.allocation-0 {
    border-color: rgba(239, 113, 120, 0.44);
    background: rgba(239, 113, 120, 0.09);
    color: #ef8389;
}

.allocation-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 10px;
}

.allocation-detail-head .summary-detail-title {
    margin-bottom: 3px;
}

.allocation-detail-meta {
    color: #748198;
    font-size: var(--ui-text-small);
    text-align: left;
    text-transform: capitalize;
}

.allocation-total {
    display: flex;
    align-items: center;
    gap: 10px;
}

.allocation-total > b {
    color: #ffffff;
    font-size: 20px;
}

.allocation-breakdown-table {
    width: 100%;
    margin-bottom: 18px;
    border-collapse: collapse;
    border-top: 1px solid #1b2636;
}

.allocation-breakdown-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #141d2a;
    background: transparent;
}

.allocation-breakdown-table td:first-child {
    width: 190px;
    color: #d9e3f2;
    text-align: left;
    font-weight: 700;
}

.block-code {
    display: inline-flex;
    width: 24px;
    height: 22px;
    margin-right: 8px;
    align-items: center;
    justify-content: center;
    border: 1px solid #2d3b50;
    border-radius: 4px;
    color: #78aaff;
    font-size: var(--ui-text-small);
}

.allocation-breakdown-table .block-context {
    color: #8997ab;
    text-align: left;
    white-space: normal;
}

.allocation-breakdown-table .block-score {
    width: 90px;
    color: #ffffff;
    text-align: right;
    font-weight: 800;
}

.rating-detail-title {
    margin-top: 4px;
}

@media (max-width: 760px) {
    .summary-actions,
    .allocation-detail-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .summary-modes {
        padding-right: 0;
        border-right: 0;
    }
}
/* Keep wide score tables inside the viewport; the table wrapper owns scrolling. */
.shell {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
}

.content,
.table-wrap {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}
.exchange-breakdown-title {
    margin: 18px 0 8px;
    color: #dce5f2;
    font-size: var(--ui-text-small);
    font-weight: 700;
}

.exchange-breakdown-wrap {
    max-width: 100%;
    overflow-x: auto;
}

.exchange-breakdown-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    font-size: var(--ui-text-small);
}

.exchange-breakdown-table th,
.exchange-breakdown-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #202838;
    text-align: right;
    white-space: nowrap;
}

.exchange-breakdown-table th:first-child,
.exchange-breakdown-table td:first-child {
    text-align: left;
}

.subtitle-link,
.subtitle-link:visited,
.subtitle-link:hover,
.subtitle-link:focus {
    color: inherit;
    text-decoration: none;
    outline: none;
}

.recommendations-shell {
    min-height: 100vh;
    padding: 24px;
}

.recommendations-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    max-width: 1440px;
    margin: 0 auto 20px;
}

.recommendations-header h1 {
    margin-top: 6px;
    font-size: var(--ui-text-title);
    text-transform: none;
}

.back-link {
    color: #8491a6;
    font-size: var(--ui-text-small);
    text-decoration: none;
}

.back-link:hover {
    color: #d7dde7;
}

.recommendations-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 1440px;
    margin: 0 auto 16px;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    max-width: 1440px;
    margin: 0 auto;
}

.meme-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #1f2837;
    border-radius: var(--ui-panel-radius);
    background: #0b0f16;
}

.meme-image {
    position: relative;
    aspect-ratio: 1.45 / 1;
    background-image: url("/static/images/rating-memes.png");
    background-repeat: no-repeat;
    background-size: 200% 200%;
}

.meme-caption {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 7px 8px;
    background: rgba(0, 0, 0, 0.78);
    color: #ffffff;
    font-size: clamp(13px, 2.2vw, 18px);
    font-weight: 900;
    line-height: 1.08;
    text-align: center;
    text-shadow: 0 2px 3px #000000;
    text-transform: uppercase;
}

.meme-card-body {
    padding: 13px 14px 15px;
}

.meme-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.meme-card h2 {
    margin: 0;
    color: #f4f7fb;
    font-size: var(--ui-text-section);
    letter-spacing: 0;
}

.meme-card p {
    min-height: 42px;
    margin: 10px 0 12px;
    color: #9da9ba;
    font-size: var(--ui-text-control);
    line-height: 1.45;
}

.meme-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    border-top: 1px solid #1d2532;
}

.meme-metrics div {
    min-width: 0;
    padding: 10px 4px 0;
}

.meme-metrics dt {
    color: #68758a;
    font-size: var(--ui-text-small);
    text-transform: uppercase;
}

.meme-metrics dd {
    margin: 3px 0 0;
    color: #dce4ef;
    font-size: var(--ui-text-small);
    font-weight: 700;
}

.recommendations-empty {
    display: none;
    padding: 60px 20px;
    color: #7d8797;
    text-align: center;
}

@media (max-width: 640px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .coin-form {
        grid-template-columns: auto minmax(88px, 1fr) auto;
        width: 100%;
    }

    .recommendations-shell {
        padding: 16px 10px;
    }

    .recommendations-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .recommendations-header h1 {
        font-size: 20px;
    }
}
.asset-guard-badge {
    display: inline-flex;
    min-height: 22px;
    margin-left: 10px;
    padding: 3px 7px;
    align-items: center;
    border: 1px solid #303949;
    border-radius: var(--ui-radius);
    background: #151a23;
    color: #7f8a9d;
    font: inherit;
    font-size: var(--ui-text-small);
    font-weight: 800;
    letter-spacing: 0;
    vertical-align: middle;
}

button.asset-guard-badge {
    cursor: pointer;
}

.asset-guard-badge.is-paused {
    border-color: rgba(239, 82, 91, 0.72);
    background: rgba(139, 31, 38, 0.34);
    color: #ff858c;
}

.asset-guard-score {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    letter-spacing: 0;
    cursor: pointer;
}
.is-asset-paused .total-score-cell.is-locked {
    opacity: 0.5;
}

.allocation-paused {
    border-color: rgba(255, 115, 69, 0.7);
    background: rgba(170, 54, 24, 0.26);
    color: #ff986f;
    cursor: pointer;
    letter-spacing: 0;
}

.has-open-sheet {
    overflow: hidden;
}

.asset-guard-sheet {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.asset-guard-sheet.is-hidden {
    display: none;
}

.asset-guard-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.68);
}

.asset-guard-panel {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    padding: 24px;
    border: 1px solid #30394a;
    border-bottom: 0;
    border-radius: var(--ui-panel-radius) 8px 0 0;
    background: #0d121b;
    box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.45);
}

.asset-guard-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    padding: 7px;
    border: 1px solid #30394a;
    background: #151b25;
    color: #bac5d5;
}

.asset-guard-close svg {
    width: 18px;
    height: 18px;
}

.asset-guard-kicker {
    color: #ff7a81;
    font-size: var(--ui-text-small);
    font-weight: 800;
    text-transform: uppercase;
}

.asset-guard-panel h2 {
    margin: 8px 42px 8px 0;
    color: #f2f5fa;
    font-size: 20px;
    letter-spacing: 0;
}

.asset-guard-panel > p {
    margin: 0;
    color: #9da9ba;
    font-size: var(--ui-text-control);
    line-height: 1.5;
}

.asset-guard-reason {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    padding: 11px 0;
    border-top: 1px solid #242d3b;
    border-bottom: 1px solid #242d3b;
}

.asset-guard-reason span {
    color: #768399;
}

.asset-guard-reason b {
    color: #ff858c;
    text-align: right;
}

.asset-guard-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 16px 0 0;
    gap: 12px;
}

.asset-guard-metrics div {
    min-width: 0;
    padding: 11px;
    border: 1px solid #252e3d;
    border-radius: var(--ui-radius);
    background: #101620;
}

.asset-guard-metrics dt {
    color: #748198;
    font-size: var(--ui-text-small);
}

.asset-guard-metrics dd {
    margin: 5px 0 0;
    color: #eef3fa;
    font-size: 15px;
    font-weight: 800;
}

@media (min-width: 700px) {
    .asset-guard-sheet {
        align-items: center;
        padding: 24px;
    }

    .asset-guard-panel {
        border-bottom: 1px solid #30394a;
        border-radius: var(--ui-panel-radius);
    }
}

@media (max-width: 520px) {
    .asset-guard-panel {
        padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
    }

    .asset-guard-metrics {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 699px) {
    .asset-guard-sheet {
        padding-bottom: calc(72px + env(safe-area-inset-bottom));
    }

    .asset-guard-panel {
        max-height: calc(100dvh - 88px - env(safe-area-inset-bottom));
        overflow-y: auto;
        border-bottom: 1px solid #30394a;
        border-radius: var(--ui-panel-radius);
    }
}

/* all-pages-mobile-v4 */
@media (max-width: 760px) {
    .content { padding: 10px; }
    .summary-toolbar { align-items: stretch; }
    .summary-filters { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .summary-filters button { min-height: 44px; }
    .summary-stats { width: 100%; white-space: normal; font-size: var(--ui-text-small); }
    .table-wrap { max-height: none; overflow: visible; border: 0; background: transparent; }
    .summary-table, .summary-table tbody { display: block; width: 100%; min-width: 0; }
    .summary-table thead { display: none; }
    .summary-table tbody { display: grid; gap: 9px; }
    .summary-table .summary-main-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 13px; border: 1px solid #263145; border-radius: var(--ui-panel-radius); background: var(--ui-surface); }
    .summary-table .summary-main-row td { display: none; min-width: 0; padding: 0; border: 0; background: transparent; white-space: normal; }
    .summary-table .summary-main-row td:nth-child(1), .summary-table .summary-main-row td:nth-child(2), .summary-table .summary-main-row td:nth-child(3), .summary-table .summary-main-row td:nth-child(4), .summary-table .summary-main-row td:nth-child(5) { display: flex; }
    .summary-table .summary-main-row td:nth-child(1) { align-items: center; min-height: 38px; font-size: 16px; font-weight: 800; }
    .summary-table .summary-main-row td:nth-child(2) { align-items: center; justify-content: flex-end; font-size: var(--ui-text-section); font-weight: 800; }
    .summary-table .summary-main-row td:nth-child(3), .summary-table .summary-main-row td:nth-child(4) { align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; padding-top: 11px; border-top: 1px solid #1d2635; }
    .summary-table .summary-main-row td:nth-child(3)::before { content: "Allocation"; color: #8190a6; font-size: var(--ui-text-small); }
    .summary-table .summary-main-row td:nth-child(4)::before { content: "Rating"; color: #8190a6; font-size: var(--ui-text-small); }
    .summary-table .summary-main-row td:nth-child(5) { grid-column: 1 / -1; align-items: center; justify-content: space-between; min-height: 36px; padding-top: 10px; border-top: 1px solid #1d2635; }
    .summary-detail-row { display: block; }
    .summary-detail-row > td { display: block; width: 100%; padding: 0; }
    .summary-detail-card { overflow: hidden; border-radius: var(--ui-panel-radius); }
    .summary-detail-table, .summary-detail-table tbody { display: block; min-width: 0; width: 100%; }
    .summary-detail-table thead { display: none; }
    .summary-detail-table tr { display: grid; grid-template-columns: 1fr 1fr; padding: 10px; border-bottom: 1px solid #1b2230; }
    .summary-detail-table td { padding: 5px; border: 0; white-space: normal; overflow-wrap: anywhere; }
    .summary-detail-table td:first-child { grid-column: 1 / -1; font-weight: 700; }
    .chart-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
    .chart-controls .select-control { grid-column: 1 / -1; width: 100%; min-height: 44px; }
    .chart-controls button { min-height: 44px; }
    .chart-stack, .detail-chart-stack { height: auto; min-height: 0; }
    .pane, .pane.price { min-height: 210px; height: 210px; }
    .recommendations-shell { width: calc(100% - 20px); }
    .recommendations-toolbar { display: grid; grid-template-columns: 1fr 1fr; }
    .recommendations-toolbar button { min-height: 44px; }
}
@media (max-width: 430px) {
    .topbar { padding: 12px 10px; }
    .controls, .coin-form { width: 100%; }
    .coin-form { grid-template-columns: 1fr auto; }
    .coin-form label { grid-column: 1 / -1; font-size: var(--ui-text-small); }
    .coin-form input { width: 100%; min-height: 44px; }
    .summary-filters, .recommendations-toolbar { grid-template-columns: 1fr; }
    .asset-guard-metrics { grid-template-columns: 1fr; }
}

/* screener-mobile-v5 */
@media (max-width: 760px) {
    .summary-table .summary-main-row {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "token total"
            "allocation rating"
            "price price";
        column-gap: 12px;
    }
    .summary-table .summary-main-row td { width: auto; min-width: 0; }
    .summary-table .summary-main-row .token-cell { display: flex; grid-area: token; }
    .summary-table .summary-main-row .total-score-cell { display: flex; grid-area: total; }
    .summary-table .summary-main-row .allocation-cell { display: flex; grid-area: allocation; }
    .summary-table .summary-main-row .rating-scale-cell { display: flex; grid-area: rating; width: auto; min-width: 0; }
    .summary-table .summary-main-row .price-cell { display: flex; grid-area: price; }
    .summary-table .summary-main-row .allocation-cell,
    .summary-table .summary-main-row .rating-scale-cell {
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        min-height: 44px;
        padding-top: 11px;
        border-top: 1px solid #1d2635;
    }
    .summary-table .summary-main-row .allocation-cell::before { content: "Allocation"; color: #8190a6; font-size: var(--ui-text-small); }
    .summary-table .summary-main-row .rating-scale-cell::before { content: "Rating"; color: #8190a6; font-size: var(--ui-text-small); }
    .summary-table .summary-main-row .rating-scale-head { margin: 0; }
    .summary-table .summary-main-row .rating-scale-track,
    .summary-table .summary-main-row .rating-scale-labels { display: none; }
    .summary-table .summary-main-row .price-cell::before { content: "Цена / 24ч"; color: #8190a6; font-size: var(--ui-text-small); }
    .summary-table .summary-main-row .price-cell b,
    .summary-table .summary-main-row .price-cell span { margin: 0 0 0 9px; }
    .summary-detail-card { max-width: 100%; padding: 14px; overflow: hidden; }
    .allocation-detail-meta { line-height: 1.5; overflow-wrap: anywhere; }
    .allocation-breakdown-table,
    .allocation-breakdown-table tbody { display: block; width: 100%; min-width: 0; }
    .allocation-breakdown-table tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "block score" "context context";
        padding: 12px 0;
        border-bottom: 1px solid #1b2636;
    }
    .allocation-breakdown-table td,
    .allocation-breakdown-table td:first-child,
    .allocation-breakdown-table .block-score {
        width: auto;
        min-width: 0;
        padding: 4px 0;
        border: 0;
        white-space: normal;
    }
    .allocation-breakdown-table td:first-child { grid-area: block; font-size: var(--ui-text-body); }
    .allocation-breakdown-table .block-score { grid-area: score; padding-left: 12px; font-size: var(--ui-text-body); }
    .allocation-breakdown-table .block-context {
        grid-area: context;
        padding-top: 8px;
        font-size: var(--ui-text-control);
        line-height: 1.45;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .technical-context span { display: block; margin-top: 5px; }
    .summary-equation { overflow-wrap: anywhere; white-space: normal; }
    .exchange-breakdown-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
}
@media (max-width: 430px) {
    .summary-table .summary-main-row { grid-template-areas: "token total" "allocation allocation" "rating rating" "price price"; }
    .summary-detail-card { padding: 12px 10px 18px; }
    .allocation-total > b { font-size: var(--ui-text-section); }
}

/* Mobile admin screener: every asset is a self-contained card, never a horizontal table. */
@media (max-width: 760px) {
    html, body { max-width: 100%; overflow-x: hidden; }
    .summary-table .summary-main-row {
        width: 100%;
        max-width: 100%;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "token total"
            "allocation allocation"
            "rating rating"
            "price price";
    }
    .summary-table .summary-main-row .allocation-cell,
    .summary-table .summary-main-row .rating-scale-cell,
    .summary-table .summary-main-row .price-cell {
        width: 100%;
        min-width: 0;
        justify-content: space-between;
    }
    .summary-table .summary-main-row .allocation-cell > *,
    .summary-table .summary-main-row .rating-scale-cell .rating-scale-head,
    .summary-table .summary-main-row .price-cell > :last-child {
        margin-left: auto;
        flex: 0 0 auto;
    }
    .summary-table .summary-main-row .rating-scale-head b {
        display: block;
        min-width: 52px;
        text-align: right;
    }
    .summary-table .summary-main-row .price-cell b { margin-left: auto; }
    .summary-table .summary-main-row .price-cell span { min-width: 62px; text-align: right; }
    .summary-detail-row,
    .summary-detail-row > td,
    .summary-detail-card,
    .allocation-breakdown-table { width: 100%; max-width: 100%; min-width: 0; }
}