/*! Copyright (c) 2026 Papillon Corporation Limited. All rights reserved. No licence is granted to copy, modify or reuse this code. https://papcor.com/ */
/* The live pipeline board. */

.pulse {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: clamp(18px, 3vw, 30px);
}

.pulse::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-left: 7px;
    background: var(--warm-3);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--warm-3) 70%, transparent);
}

.totals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(18px, 3vw, 40px) var(--gap);
    margin-bottom: clamp(20px, 3vw, 36px);
}

@media (min-width: 900px) {
    .totals {
        grid-template-columns: 1.6fr 1fr 1fr 1fr;
        align-items: end;
    }
}

.totals dt {
    color: var(--muted);
    font-size: 0.95rem;
    order: 2;
}

.totals div {
    display: flex;
    flex-direction: column;
}

.totals dd {
    font-family: var(--font-head);
    font-weight: 560;
    font-size: clamp(2.2rem, 1.4rem + 3.2vw, 4.2rem);
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--strong);
    font-variant-numeric: tabular-nums;
    margin-bottom: 8px;
}

.totals .lead-figure dd {
    font-size: clamp(3.6rem, 1.6rem + 9vw, 9.5rem);
    line-height: 0.9;
    letter-spacing: -0.05em;
}

.totals small {
    font-family: var(--font-body);
    font-size: 0.32em;
    letter-spacing: 0;
    color: var(--muted);
    margin-left: 0.2em;
}

.trend-wrap {
    height: clamp(90px, 14vw, 170px);
    margin-bottom: clamp(20px, 3vw, 34px);
    border-bottom: 1px solid var(--line);
}

.trend {
    display: block;
    width: 100%;
    height: 100%;
}

.trend-line {
    fill: none;
    stroke: url(#wings-stroke);
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
    stroke-linejoin: round;
}

.trend-fill {
    fill: url(#wings-fill);
}

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

.board caption {
    text-align: left;
    color: var(--muted);
    padding-bottom: 12px;
}

.board th,
.board td {
    text-align: left;
    padding: 14px 16px 14px 0;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.board thead th {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.board tbody th {
    font-family: var(--font-head);
    font-weight: 500;
    font-size: clamp(1.05rem, 1rem + 0.5vw, 1.4rem);
    letter-spacing: -0.015em;
    color: var(--strong);
}

.board thead th.num {
    text-align: right;
}

.board tbody .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-family: var(--font-head);
    font-size: 1.25rem;
    color: var(--strong);
}

.board tbody tr.is-active th::after {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-left: 10px;
    border-radius: 50%;
    background: var(--warm-3);
    vertical-align: middle;
}

.board code,
.latest-deploy code {
    font-family: var(--font-mono);
    font-size: 0.86em;
    color: var(--muted);
    margin-right: 0.5em;
}

.latest-deploy {
    color: var(--muted);
    margin-bottom: 10px;
}

.latest-deploy strong {
    color: var(--strong);
    font-weight: 600;
}

.spark {
    display: block;
    width: 132px;
    height: 34px;
}

.spark-bar {
    fill: url(#wings-fill-solid);
}

.spark-none {
    fill: var(--line);
}

.board-note {
    color: var(--muted);
    font-size: 0.92rem;
    margin-top: 16px;
    max-width: 52em;
}

.defs {
    position: absolute;
    width: 0;
    height: 0;
}

/* On phones each area becomes a small card of labelled figures. */
@media (max-width: 720px) {
    .board thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }

    .board tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px 16px;
        padding-block: 14px;
        border-bottom: 1px solid var(--line);
    }

    .board th,
    .board td {
        display: block;
        padding: 0;
        border: 0;
        text-align: left;
    }

    .board tbody th {
        grid-column: 1 / -1;
        margin-bottom: 4px;
    }

    .board tbody .num {
        text-align: left;
        font-size: 1.05rem;
    }

    .board td::before {
        content: attr(data-label);
        display: block;
        font-family: var(--font-mono);
        font-size: 0.68rem;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--muted);
    }
}

@media (forced-colors: active) {
    .spark-bar,
    .trend-line {
        fill: CanvasText;
        stroke: CanvasText;
    }
}
