.speedmeter {
    --sm-accent: #115B80;
    --sm-bezel: #1c1f24;
    --sm-face-top: #2b2f36;
    --sm-face-bottom: #14161a;
    --sm-tick: #8b93a1;
    --sm-tick-dim: #454b56;

    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 32px;
    width: 100%;
    height: 100%;
    padding: 20px 10px;
    box-sizing: border-box;
    font-family: 'Roboto', Arial, sans-serif;
}

/* ---- Dial ---- */

.sm-dial-wrap {
    position: relative;
    width: 300px;
    height: 300px;
    flex: 0 0 auto;
}

.sm-dial {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 42%, var(--sm-face-top), var(--sm-face-bottom) 72%);
    box-shadow:
        0 0 0 10px var(--sm-bezel),
        0 0 0 12px rgba(255, 255, 255, 0.06),
        inset 0 2px 10px rgba(0, 0, 0, 0.6),
        0 18px 30px -12px rgba(0, 0, 0, 0.55);
}

.sm-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 6;
    stroke-linecap: round;
}

.sm-progress {
    fill: none;
    stroke: var(--sm-accent);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.35s ease-out;
    filter: drop-shadow(0 0 3px var(--sm-accent));
}

.sm-tick-major {
    stroke: var(--sm-tick);
    stroke-width: 2;
}

.sm-tick-minor {
    stroke: var(--sm-tick-dim);
    stroke-width: 1;
}

.sm-tick-label {
    fill: var(--sm-tick);
    font-size: 11px;
    font-family: 'Roboto Mono', 'Roboto', monospace;
    font-variant-numeric: tabular-nums;
}

.sm-needle-group {
    transition: transform 0.5s cubic-bezier(.22, 1, .36, 1);
}

.sm-needle {
    fill: var(--sm-accent);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.sm-hub-ring {
    fill: var(--sm-bezel);
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 1.5;
}

.sm-hub {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.sm-start {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(180deg, #3a3f47, #202329);
    color: #cfd4dc;
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.08) inset,
        0 -2px 4px rgba(0, 0, 0, 0.5) inset,
        0 4px 10px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, box-shadow 0.2s;
}

.sm-start:hover {
    color: var(--sm-accent);
}

.sm-start:disabled {
    cursor: default;
}

.sm-start.sm-running {
    color: var(--sm-accent);
    box-shadow:
        0 0 0 3px var(--sm-accent),
        0 4px 10px rgba(0, 0, 0, 0.5);
    opacity: 0.92;
}

.sm-icon-power {
    width: 22px;
    height: 22px;
}

.sm-scale-unit {
    position: absolute;
    left: 50%;
    bottom: 20%;
    transform: translateX(-50%);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--sm-tick);
    font-family: 'Roboto Mono', 'Roboto', monospace;
}

/* ---- Brand ---- */

.sm-brand {
    flex: 0 0 100%;
    text-align: center;
    margin-top: -8px;
}

.sm-brand-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #2b2f36;
}

.sm-brand-accent {
    color: var(--sm-accent);
}

.sm-brand-link {
    display: block;
    font-size: 12px;
    color: #8a919c;
    text-decoration: none;
    margin-top: 2px;
}

.sm-brand-link:hover {
    color: var(--sm-accent);
    text-decoration: underline;
}

/* ---- Stat boxes ---- */

.sm-stats {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 0 0 auto;
}

.sm-stat {
    width: 150px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e3e6ea;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sm-stat.sm-active {
    border-color: var(--sm-accent);
    box-shadow: 0 0 0 2px var(--sm-accent);
}

.sm-stat-label {
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8a919c;
    margin-bottom: 4px;
}

.sm-stat-value {
    font-family: 'Roboto Mono', 'Roboto', monospace;
    font-variant-numeric: tabular-nums;
}

.sm-num {
    font-size: 26px;
    font-weight: 500;
    color: #23262b;
}

.sm-stat.sm-done .sm-num {
    color: var(--sm-accent);
}

.sm-unit {
    font-size: 13px;
    color: #8a919c;
    margin-left: 4px;
}

/* ---- Status line ---- */

.sm-status {
    flex: 0 0 100%;
    text-align: center;
    font-size: 13px;
    color: #8a919c;
    margin-top: -6px;
}

/* ---- Responsive ---- */

@media (max-width: 700px) {
    .speedmeter {
        gap: 20px;
    }
    .sm-dial-wrap {
        width: 240px;
        height: 240px;
    }
    .sm-stats {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    .sm-stat {
        width: 120px;
        padding: 10px 12px;
    }
    .sm-num {
        font-size: 21px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sm-needle-group,
    .sm-progress {
        transition: none;
    }
}
