.cql {
    --cql-columns: minmax(305px, .84fr) repeat(2, minmax(0, .9fr));
    color-scheme: dark;
    color: #eef2f5;
    font-family: var(--font-content);
    -webkit-font-smoothing: antialiased;
}

.cql .eyebrow {
    font: 11px/1.5 var(--font-mono);
    letter-spacing: .11em;
    color: var(--text-dim);
    text-transform: uppercase;
}

.cql h2,
.cql h3,
.cql p {
    margin: 0;
}

.cql {
    background: var(--bg-card);
    border-block: 1px solid #23303b;
    padding-block: var(--cql-padding-start, 82px) var(--cql-padding-end, 76px);
}

.cql .cql-head {
    display: grid;
    grid-template-columns: 1.9fr 1fr;
    gap: 18px 50px;
    align-items: start;
    margin-bottom: 34px;
}

.cql .cql-head .eyebrow {
    grid-column: 1 / -1;
}

.cql .cql-head h2 span {
    color: var(--accent);
}

.cql .cql-description {
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 370px;
    justify-self: end;
}

.cql .cql-description strong {
    display: block;
    margin-bottom: 4px;
    color: #eef2f5;
    font-weight: 500;
}

.cql .engine {
    border: 1px solid #384854;
    border-radius: 5px;
    background: #0b131b;
    overflow: hidden;
}

.cql .engine-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 20px;
    background: #131e27;
    border-bottom: 1px solid #2a3945;
    font: 11px/1.4 var(--font-mono);
    color: var(--text-muted);
}

.cql .engine-bar .name {
    display: flex;
    align-items: center;
    gap: 9px;
    letter-spacing: .07em;
    color: #d0dbe4;
}

.cql .engine-bar .dot {
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
}

.cql .engine-body {
    display: grid;
    grid-template-columns: var(--cql-columns);
}

.cql .rail {
    padding: 22px 22px 20px;
    border-right: 1px solid #293844;
    display: flex;
    flex-direction: column;
    gap: 21px;
}

.cql .rail-top {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 10px;
}

.cql .rail-top strong {
    display: block;
    font: 500 30px/1.05 var(--font-mono);
    color: var(--accent);
    margin-top: 7px;
    letter-spacing: -.045em;
}

.cql .rail-top .state {
    font: 10px/1.5 var(--font-mono);
    color: var(--text-dim);
    text-align: right;
}

.cql .route-table {
    width: 100%;
    border-collapse: collapse;
    font: 12px/1.3 var(--font-mono);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.cql .route-table th {
    color: #7b8fa1;
    font-weight: 400;
    text-align: right;
    font-size: 10px;
    padding: 0 6px 9px;
}

.cql .route-table th:first-child {
    text-align: left;
    padding-left: 9px;
}

.cql .route-table td {
    padding: 9px 6px;
    text-align: right;
    color: #9aabbb;
    border-top: 1px solid #1f2c37;
}

.cql .route-table td:first-child {
    text-align: left;
    padding-left: 9px;
}

.cql .route-table td:last-child {
    padding-right: 9px;
}

.cql .route-table tr.active td {
    background: #1b303c;
    color: var(--accent);
}

.cql .route-table tr.warning td {
    background: #31271f;
    color: var(--warning);
}

.cql .route-table tr.active td:first-child {
    box-shadow: inset 2px 0 var(--accent);
}

.cql .route-table tr.warning td:first-child {
    box-shadow: inset 2px 0 var(--warning);
}

.cql .node-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    background: #526475;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: 2px;
}

.cql .active .node-dot {
    background: var(--accent);
}

.cql .warning .node-dot {
    background: var(--warning);
}

.cql .transport {
    margin-top: auto;
    border-top: 1px solid #283844;
    padding-top: 15px;
}

.cql .transport .eyebrow {
    margin-bottom: 9px;
}

.cql .popup-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: #8596a7;
}

.cql .popup-row.selected {
    color: var(--accent);
}

.cql .popup-state {
    font: 10px/1 var(--font-mono);
    color: var(--text-dim);
}

.cql .popup-row.selected .popup-state {
    color: var(--accent);
}

.cql .popup-state:before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    background: currentColor;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: 1px;
}

.cql .popup-foot {
    color: var(--text-dim);
    font: 10px/1.4 var(--font-mono);
    margin-top: 6px;
}

.cql .warning,
.cql .warn {
    color: var(--warning)!important;
}

.cql .chart-pane {
    grid-column: span 2;
    min-width: 0;
    padding: 24px 24px 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: radial-gradient(ellipse at 68% 28%,#14232d55,transparent 70%);
}

.cql .chart-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 15px;
}

.cql .chart-head .metric {
    font: 500 clamp(32px,3.8vw,52px)/1 var(--font-mono);
    color: var(--accent);
    letter-spacing: -.055em;
    margin-top: 8px;
}

.cql .chart-head .event {
    text-align: right;
    font: 12px/1.5 var(--font-mono);
    color: #9eafbc;
    max-width: 220px;
}

.cql .chart-head .event span {
    display: block;
    color: var(--text-dim);
    font-size: 10px;
    margin-bottom: 5px;
}

.cql .chart-frame {
    position: relative;
    padding-left: 28px;
    min-width: 0;
}

.cql .axis {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 10.4%;
    width: 25px;
    font: 10px var(--font-mono);
    color: #738698;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left;
    padding-top: 1px;
}

.cql .chart-canvas {
    display: block;
    width: 100%;
    height: 310px;
    overflow: hidden;
}

.cql .chart-canvas text {
    font-family: var(--font-mono);
}

.cql .chart-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 7px 0 0 28px;
    color: var(--text-dim);
    font: 10px/1.4 var(--font-mono);
}

.cql .cql-after {
    display: grid;
    grid-template-columns: var(--cql-columns);
    margin: clamp(36px, 4vw, 56px) 1px 0;
}

.cql .cql-after article {
    padding-inline-end: 16px;
}

.cql .cql-after article:not(:last-child) {
    border-inline-end: 1px solid var(--border-soft);
}

.cql .cql-after article + article {
    padding-inline-start: 28px;
}

.cql .cql-after article:last-child {
    padding-inline-end: 0;
}

.cql .cql-after .eyebrow {
    color: var(--accent);
    margin-bottom: 10px;
}

.cql .cql-after h3 {
    font-size: 22px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -.025em;
    margin-bottom: 6px;
}

.cql .cql-after p:not(.eyebrow) {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.5;
}

@media (max-width: 1000px) {
    .cql {
        --cql-columns: minmax(275px, .9fr) repeat(2, minmax(0, .75fr));
    }

    .cql .rail {
        padding: 18px 15px;
    }

    .cql .chart-pane {
        padding: 20px 17px 15px;
    }

    .cql .cql-head {
        column-gap: 25px;
    }

    .cql .route-table {
        font-size: 11px;
    }

    .cql .route-table td {
        padding-inline: 4px;
    }
}

@media (max-width: 760px) {
    .cql {
        padding-block: var(--cql-padding-start, 56px) var(--cql-padding-end, 56px);
    }

    .cql .cql-head {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cql .cql-description {
        justify-self: start;
        max-width: 500px;
    }

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

    .cql .rail {
        min-width: 0;
        border-right: 0;
        border-bottom: 1px solid #293844;
        gap: 14px;
        padding: 19px 15px;
    }

    .cql .rail-top strong {
        font-size: 26px;
    }

    .cql .route-table {
        font-size: 12px;
    }

    .cql .chart-pane {
        grid-column: auto;
        padding: 20px 13px 15px;
    }

    .cql .chart-canvas {
        height: 190px;
    }

    .cql .engine-bar {
        padding-inline: 12px;
        font-size: 10px;
        gap: 8px;
    }

    .cql .chart-head .event {
        font-size: 10px;
        max-width: 135px;
    }

    .cql .chart-head .metric {
        font-size: 36px;
    }

    .cql .cql-after {
        grid-template-columns: 1fr;
        row-gap: 9px;
    }

    .cql .cql-after article,
    .cql .cql-after article + article {
        padding-inline: 0;
    }

    .cql .cql-after article:not(:last-child) {
        border-inline-end: 0;
    }

    .cql .cql-after article + article {
        padding-block-start: 9px;
        border-block-start: 1px solid color-mix(in srgb, var(--border-soft) 72%, var(--text-dim));
    }

    .cql .cql-after .eyebrow {
        margin-bottom: 8px;
    }

    .cql .cql-after h3 {
        font-size: 20px;
    }

    .cql .chart-canvas #cql-history text,
    .cql .chart-canvas #cql-routeEvents text {
        display: none;
    }
}
