:root {
    --bg: #f5f8ff;
    --surface: #ffffff;
    --surface-2: #f0f4ff;
    --text: #152344;
    --muted: #5d6d93;
    --line: #dbe3f5;
    --brand: #4f74ff;
    --brand-strong: #3a5de0;
    --accent: #18b7a4;
    --shadow: 0 10px 30px rgba(29, 55, 120, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #f7f9ff 0%, #eef3ff 100%);
    line-height: 1.6;
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    color: var(--brand-strong);
}

.container {
    width: min(1220px, 93vw);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    background: rgba(250, 252, 255, 0.9);
    z-index: 30;
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 74px;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 800;
    letter-spacing: 0.2px;
}

.brand-mark {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(140deg, #4f74ff 0%, #23b7ff 100%);
    color: #fff;
    font-size: 13px;
}

.site-nav {
    display: flex;
    gap: 18px;
}

.site-nav a {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.site-nav a:hover {
    color: var(--text);
}

.search-form input {
    width: 250px;
}

.page-wrap {
    padding: 36px 0 76px;
}

.hero {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 32px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.hero-large {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 24px;
}

.hero.slim {
    padding: 24px 28px;
}

.hero-copy h1,
.hero h1 {
    margin: 6px 0 10px;
    line-height: 1.22;
    font-size: clamp(29px, 4.2vw, 50px);
    max-width: 830px;
}

.hero p {
    margin: 0;
    max-width: 780px;
    color: var(--muted);
}

.eyebrow {
    margin: 0 0 6px;
    color: #4773ff;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 11px;
    font-weight: 800;
}

.hero-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.hero-graphics {
    display: grid;
    gap: 14px;
}

.graphic-card {
    border: 1px solid #d7e3ff;
    border-radius: 14px;
    padding: 14px;
    background: linear-gradient(180deg, #f7f9ff 0%, #edf3ff 100%);
}

.graphic-card p {
    margin: 0;
    color: #6e82b4;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.graphic-card h3 {
    margin: 5px 0 10px;
    font-size: 23px;
}

.signal-bars {
    height: 82px;
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.signal-bars span {
    width: 18%;
    border-radius: 8px 8px 4px 4px;
    background: linear-gradient(180deg, #6ec8ff 0%, #4f74ff 100%);
}

.ring {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    margin-top: 5px;
    background: conic-gradient(#4f74ff 0 72%, #d4def6 72% 100%);
    padding: 10px;
}

.ring-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #f4f7ff;
}

.btn {
    display: inline-block;
    border: 0;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    padding: 10px 16px;
    cursor: pointer;
}

.btn:hover {
    background: var(--brand-strong);
    color: #fff;
}

.btn-soft {
    background: #e7edff;
    color: #2341a8;
}

.btn-soft:hover {
    background: #dbe5ff;
    color: #1f3d9e;
}

section {
    margin-top: 28px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.kpi-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 14px;
    box-shadow: var(--shadow);
}

.kpi-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 700;
}

.kpi-card h3 {
    margin: 6px 0 4px;
    font-size: 28px;
    line-height: 1;
}

.kpi-card span {
    font-size: 13px;
    color: #4f74ff;
    font-weight: 600;
}

.analytics-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 12px;
}

.panel {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    padding: 18px;
    box-shadow: var(--shadow);
}

.section-head {
    margin-bottom: 14px;
}

.section-head h2 {
    margin: 0;
    font-size: 23px;
}

.meta {
    color: var(--muted);
    font-size: 13px;
}

.leaderboard {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard th,
.leaderboard td {
    border-bottom: 1px solid #e9effc;
    padding: 10px 8px;
    font-size: 14px;
}

.leaderboard th {
    color: #6578a9;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.bar-list {
    display: grid;
    gap: 10px;
}

.hbar {
    display: grid;
    grid-template-columns: 150px 1fr 42px;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.hbar-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #ebf1ff;
    overflow: hidden;
}

.hbar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #4f74ff 0%, #18b7a4 100%);
}

.spark-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    align-items: end;
    gap: 8px;
    min-height: 145px;
}

.spark-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.spark-bar {
    width: 100%;
    border-radius: 8px 8px 4px 4px;
    background: linear-gradient(180deg, #8edcff 0%, #4f74ff 100%);
    min-height: 20px;
}

.spark-label {
    width: 100%;
    text-align: center;
    font-size: 11px;
    color: #6f7fa7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.card-grid.compact {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.card h3 {
    margin: 0 0 7px;
    font-size: 18px;
}

.card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.chips {
    margin: 10px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.chip {
    border: 1px solid #d2ddfc;
    color: #4c639f;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px;
    background: #f4f7ff;
}

.detail-card {
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface);
    padding: 24px;
    box-shadow: var(--shadow);
}

.detail-card h1 {
    margin-top: 0;
}

.list {
    margin: 10px 0 0;
    padding-left: 18px;
}

.newsletter {
    border: 1px solid #d8e4ff;
    border-radius: 14px;
    background: linear-gradient(135deg, #f1f6ff 0%, #ecf8ff 100%);
    padding: 22px;
}

.newsletter form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

input,
select {
    border: 1px solid #cfdaef;
    background: #fff;
    color: var(--text);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
}

input[type="email"] {
    width: 320px;
    max-width: 100%;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: #5870a3;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.chip-button {
    border: 1px solid #d2ddfc;
    color: #4c639f;
    border-radius: 999px;
    padding: 4px 11px;
    font-size: 12px;
    background: #f4f7ff;
    cursor: pointer;
}

.chip-button.active {
    background: #4f74ff;
    border-color: #4f74ff;
    color: #fff;
}

.inline-message {
    margin: 8px 0 0;
    color: #3653b1;
    font-size: 14px;
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 30px 0 34px;
    color: var(--muted);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}

.footer-grid p {
    margin: 5px 0 0;
}

.footer-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

@media (max-width: 1080px) {
    .hero-large,
    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 820px) {
    .nav-wrap {
        min-height: auto;
        padding: 12px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 11px;
    }

    .site-nav {
        gap: 14px;
        flex-wrap: wrap;
    }

    .search-form input {
        width: min(92vw, 360px);
    }

    .hero {
        padding: 22px;
    }

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

    .hbar {
        grid-template-columns: 120px 1fr 32px;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .input-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        flex-direction: column;
        align-items: flex-start;
    }
}
