* {
    box-sizing: border-box;
}

:root {
    --bg: #000000;
    --route-number: #E4E4E4;
    --primary-text: #F2F2F2;
    --brand-title: #FFFFFF;
    --live-info: #D2D2D2;
    --secondary-text: #D2D2D2;
    --date-text: #BDBDBD;
    --divider: #4A4A4A;
}

html,
body {
    height: 100%;
    margin: 0;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.025) 0,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px,
            transparent 8px
        ),
        var(--bg);
    color: var(--primary-text);
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 800;
}

.dashboard {
    width: 100vw;
    height: 100vh;
    display: grid;
    grid-template-rows: 16% minmax(0, 1fr) 16%;
    overflow: hidden;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.025) 0,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px,
            transparent 8px
        ),
        var(--bg);
}

.route-row {
    display: grid;
    grid-template-columns: 24% minmax(0, 1fr) 18%;
    align-items: center;
}

.route-row.is-message {
    grid-template-columns: 1fr;
}

.route-row.is-message .route,
.route-row.is-message .distance {
    display: none;
}

.route-row.is-message .description {
    grid-column: 1;
    justify-content: center;
    padding: 0 48px;
}

.dashboard-header {
    display: grid;
    grid-template-columns: 24% minmax(0, 1fr) 18%;
    align-items: center;
    border-bottom: 8px solid var(--divider);
}

.dashboard-header .header-left-transport {
    grid-column: 1;
}

.dashboard-header .header-center-stop {
    grid-column: 2;
}

.dashboard-header .header-right-km {
    grid-column: 3;
}

.route-table {
    min-height: 0;
    display: grid;
    grid-template-rows: repeat(4, minmax(0, 1fr));
}

.route,
.description,
.distance {
    height: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.description {
    justify-content: flex-start;
    padding: 0 32px;
}

.route > div {
    max-width: 100%;
    overflow: hidden;
    color: var(--route-number);
    font-size: 78px;
    line-height: 1;
    text-shadow: 0 0 8px rgba(242, 242, 242, 0.16);
    white-space: nowrap;
}

.distance > div {
    max-width: 100%;
    overflow: hidden;
    color: var(--live-info);
    font-size: 72px;
    line-height: 1;
    text-shadow: 0 0 8px rgba(242, 242, 242, 0.14);
    white-space: nowrap;
}

.description > div {
    max-width: 100%;
    color: var(--primary-text);
    font-size: 64px;
    line-height: 1;
    text-shadow: 0 0 8px rgba(242, 242, 242, 0.16);
}

.header-left-transport,
.header-center-stop,
.header-right-km {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-text);
    font-size: 50px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
}

.header-center-stop {
    color: var(--brand-title);
    font-size: 90px;
    text-shadow: 0 0 10px rgba(242, 242, 242, 0.18);
}

.header-right-km {
    color: var(--secondary-text);
}

.header-left-transport {
    justify-content: center;
    color: var(--secondary-text);
}

.dashboard-footer {
    border-top: 8px solid var(--divider);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 32px;
    padding: 0 28px;
    font-size: 72px;
    line-height: 1;
}

.footer-time {
    color: var(--primary-text);
}

.footer-date {
    color: var(--date-text);
}

@keyframes description-pan {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-1 * var(--marquee-distance, 0px))); }
}

.marquee-text {
    display: inline-flex;
    flex: none;
    min-width: max-content;
    white-space: nowrap;
    transform: translateX(0);
    will-change: transform;
}

.marquee-copy {
    flex: 0 0 auto;
    padding-right: 2ch;
}

.marquee-text.is-animated {
    animation: description-pan var(--marquee-duration, 0ms) linear infinite;
}

.dashboard-message {
    display: block;
    max-width: 100%;
    color: var(--primary-text);
    font-size: 64px;
    line-height: 1.15;
    text-align: center;
    text-shadow: 0 0 8px rgba(242, 242, 242, 0.16);
    white-space: normal;
}
