/* ==========================================================================
   skins/lcd.css — the bike cycle computer. Grey-green segment display, dark
   ink, no colour. Holds that look in dark mode too.
   ========================================================================== */

[data-skin=lcd] {
    --lcd-panel: #b9c6a8;
    --lcd-panel-2: #a8b797;
    --lcd-ink: #1c2417;
    --lcd-dim: #6c7a5e;
    --chart-line: #4a5c3c;
}

/* data-theme sits on <html> and data-skin on <body>, so this is a plain
   descendant match. A backlit cycle computer is still green at night, just
   dimmer — it does not become a dark-mode surface. */
[data-theme=dark] [data-skin=lcd] {
    --lcd-panel: #7f9070;
    --lcd-panel-2: #71825f;
}

.hero--lcd {
    max-width: 440px;
}

.lcd {
    width: 100%;
    padding: 14px 16px 16px;
    border-radius: 10px;
    background: linear-gradient(160deg, var(--lcd-panel), var(--lcd-panel-2));
    border: 3px solid #2f3630;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, .18), var(--shadow-1);
    color: var(--lcd-ink);
    font-family: var(--font-mono);
}

.lcd-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .625rem;
    font-weight: 700;
    letter-spacing: .18em;
    color: var(--lcd-dim);
    min-height: 14px;
}

.lcd-tag {
    display: inline-block;
    min-width: 1em;
}

.lcd-tag--right {
    text-align: right;
    font-size: .8125rem;
    letter-spacing: 0;
    color: var(--lcd-ink);
}

.lcd-main {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    padding: 2px 0 6px;
}

.lcd-value {
    font-size: clamp(3.4rem, 17vw, 5rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: .02em;
    font-feature-settings: "tnum";
}

.lcd-unit {
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--lcd-dim);
}

.lcd-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: rgba(28, 36, 23, .22);
    border-top: 1px solid rgba(28, 36, 23, .22);
    border-bottom: 1px solid rgba(28, 36, 23, .22);
    margin-top: 4px;
}

.lcd-cell {
    background: transparent;
    padding: 7px 4px;
    text-align: center;
    min-width: 0;
}

.lcd-k {
    display: block;
    font-size: .625rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--lcd-dim);
    margin-bottom: 2px;
}

.lcd-v {
    display: block;
    font-size: 1.1875rem;
    font-weight: 700;
    font-feature-settings: "tnum";
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lcd-v i {
    font-size: .6875rem;
    font-style: normal;
    font-weight: 700;
    color: var(--lcd-dim);
    margin-left: 2px;
}

.lcd-profile {
    margin-top: 10px;
}

.lcd-profile canvas {
    display: block;
    width: 100%;
    height: 56px;
}

.lcd-climb {
    position: absolute;
    right: 0;
    top: 0;
    font-size: .625rem;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--lcd-dim);
}

/* ---------------- the page around it ---------------- */
[data-skin=lcd] .stat {
    border-radius: 6px;
    border: 1px solid var(--divider-color);
    box-shadow: none;
}

[data-skin=lcd] .stat .v {
    font-weight: 700;
}

[data-skin=lcd] .splits {
    font-weight: 700;
}

@media (max-width:600px) {
    .lcd {
        padding: 12px 12px 14px;
    }

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