/* Monitoring tables and secondary copy need to remain legible on wide screens. */
.metric-card small,
.detail-kpi small,
.site-stat small {
    font-size: 10px;
}

.panel-heading p,
.form-panel p,
.danger-zone p,
.hero-status p,
.detail-kpi span {
    font-size: 12px;
    line-height: 1.5;
}

.data-table {
    font-size: 13px;
}

.data-table th {
    font-size: 10px;
}

.data-table td {
    line-height: 1.4;
}

.data-table td small {
    font-size: 11px;
    line-height: 1.35;
}

.connection-row strong {
    font-size: 12px;
}

.connection-row small,
.check-list > div,
.mini-empty,
.field small {
    font-size: 11px;
    line-height: 1.45;
}

.keyword-link {
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    text-decoration: none;
}

.keyword-link:hover { color: var(--primary); }
.keyword-link span { color: var(--primary); }

.rank-change {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
}

.rank-up { color: #087a5b; background: #e8f8f2; }
.rank-down { color: #c2414b; background: #fff0f1; }
.rank-flat { color: var(--muted); background: #f1f4f8; }
.rank-new { color: #5450c7; background: #eeedff; }

.detail-kpi-link {
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.detail-kpi-link:hover {
    transform: translateY(-2px);
    border-color: #c8c4ff;
    box-shadow: 0 14px 30px rgba(40, 44, 74, .09);
}

.detail-kpi-link small {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-kpi-link small i {
    color: var(--primary);
    font-size: 15px;
    font-style: normal;
}

.analytics-heading { align-items: end; }
.analytics-heading p { margin-top: 8px; color: var(--muted); }
.analytics-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.analytics-history-panel { overflow: hidden; }
.analytics-table tbody tr:first-child { background: #fafaff; }

.keyword-heading p { margin-top: 8px; color: var(--muted); }
.keyword-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.keyword-history-panel { overflow: hidden; }

.rank-chart {
    height: 230px;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding: 28px 24px 18px;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
}

.rank-column {
    height: 100%;
    min-width: 46px;
    display: grid;
    grid-template-rows: 22px 1fr 24px;
    align-items: end;
    justify-items: center;
    color: var(--muted);
}

.rank-column > span { font-size: 11px; font-weight: 700; color: var(--ink); }
.rank-column > i {
    width: 22px;
    min-height: 8px;
    max-height: 100%;
    display: block;
    border-radius: 7px 7px 3px 3px;
    background: linear-gradient(180deg, #6558f5, #9189ff);
}
.rank-column > small { font-size: 10px; white-space: nowrap; }

@media (max-width: 900px) {
    .keyword-kpis, .analytics-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .keyword-table th:nth-child(2), .keyword-table td:nth-child(2),
    .keyword-table th:nth-child(3), .keyword-table td:nth-child(3) { display: none; }
}
