/* digits demo */

.digits-layout {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

#pad-canvas {
    display: block;
    width: 280px;
    max-width: 100%;
    height: auto;
    border: 1px solid #30363d;
    border-radius: 8px;
    background: #000;
    cursor: crosshair;
    touch-action: none;
}

.digits-pad-actions {
    margin-top: 0.6rem;
}

.digits-result {
    width: 300px;
    max-width: 100%;
    text-align: left;
}

.digits-answer {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
}

#answer {
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1;
    color: #f0883e;
    font-family: 'Cascadia Code', 'Fira Code', monospace;
}

#confidence {
    color: #8b949e;
    font-size: 0.85rem;
}

.digits-bars {
    display: grid;
    grid-template-columns: 1.2em 1fr 3.4em;
    align-items: center;
    gap: 0.3rem 0.5rem;
    margin-top: 0.8rem;
    font-family: 'Cascadia Code', 'Fira Code', monospace;
    font-size: 0.8rem;
}

.digits-bars .track {
    height: 10px;
    border-radius: 5px;
    background: #21262d;
    overflow: hidden;
}

.digits-bars .fill {
    display: block;
    height: 100%;
    width: 100%;
    border-radius: 5px;
    background: #484f58;
    transform: scaleX(0);
    transform-origin: left;
}

.digits-bars .best .fill { background: #f0883e; }
.digits-bars .best { color: #f0883e; }
.digits-bars .pct { color: #8b949e; text-align: right; }

.digits-views {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.digits-views figure {
    margin: 0;
    text-align: center;
}

.digits-views canvas {
    width: 112px;
    height: 112px;
    image-rendering: pixelated;
    border: 1px solid #30363d;
    border-radius: 4px;
    background: #000;
}

.digits-views figcaption {
    margin-top: 0.3rem;
    color: #8b949e;
    font-size: 0.72rem;
}
