/* Timer and stopwatch - mode toggle, a big monospace display, controls, and laps.
   The .is-overtime state turns the countdown display bright when time is up.
   Reuses base .field / .btn / .btn-outline / .seg; colors come from theme tokens. */

.tm-modes { margin-bottom: 20px; }

.tm-config { margin-bottom: 16px; }
.tm-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tm-presets .btn-outline { padding: 0.35rem 0.7rem; font-size: 14px; }

.tm-hms { display: flex; flex-wrap: wrap; gap: 12px; }
.tm-hms-field { display: flex; flex-direction: column; gap: 6px; }
.tm-hms-field span { font-size: 14px; color: var(--muted); font-weight: 600; }
.tm-num { width: 88px; text-align: center; }

.tm-display {
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: clamp(48px, 13vw, 92px); font-weight: 800; line-height: 1; text-align: center;
    color: var(--accent-strong); padding: 28px 12px; margin: 8px 0 18px;
    border: 1px solid var(--border); border-radius: 18px; background: var(--surface);
}
.tm-display.is-overtime {
    color: var(--bad); border-color: var(--bad);
    background: color-mix(in srgb, var(--bad) 12%, var(--surface));
    animation: tm-pulse 1s ease-in-out infinite;
}
@keyframes tm-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@media (prefers-reduced-motion: reduce) { .tm-display.is-overtime { animation: none; } }

.tm-controls { display: flex; flex-wrap: wrap; gap: 10px; }
.tm-toggle { min-width: 120px; }

.tm-laps {
    list-style: none; margin: 18px 0 0; padding: 0;
    font-variant-numeric: tabular-nums;
}
.tm-laps li {
    display: flex; justify-content: space-between; gap: 12px;
    padding: 8px 4px; border-bottom: 1px solid var(--border);
}
.tm-laps li span:first-child { color: var(--muted); }
