/* =========================================================
   ToolZen Hub
   Stopwatch

   Only what the shared tool styles do not already provide: the
   large elapsed time, the state-aware buttons and the lap table.
   Buttons, focus and headings come from the shared layer. Loaded
   after calculator-responsive.css.

   The state is told in words (Ready, Running, Paused) and the
   fastest and slowest laps carry a text label, never colour
   alone. Nothing animates, so there is no motion to reduce.
========================================================= */

.sw-panel [hidden] {

    display: none !important;

}

.sw-stage {

    padding: 8px 0 4px;

    text-align: center;

}

.sw-display {

    color: var(--color-ink);

    font-size: clamp(52px, 17vw, 104px);
    font-weight: 750;
    line-height: 1.05;
    letter-spacing: 0;
    white-space: nowrap;

    font-variant-numeric: tabular-nums;

}

.sw-display[data-long="true"] {

    font-size: clamp(38px, 12vw, 88px);

}

.sw-panel[data-state="paused"] .sw-display {

    color: var(--color-ink-muted);

}

.sw-status {

    margin: 8px 0 0;

    color: #475467;

    font-size: 16px;
    font-weight: 600;

}

.sw-current {

    margin: 4px 0 0;

    color: #475467;

    font-size: 16px;
    font-variant-numeric: tabular-nums;

}

/* Start alone is full width; the pairs (Lap and Pause, Resume and Reset) sit side by side, even on a phone */

.sw-actions {

    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 12px;

    margin-top: 20px;

}

.sw-button {

    min-height: 56px;

    font-size: 18px;

}

#sw-start {

    grid-column: 1 / -1;

}

.sw-keys {

    margin: 14px 0 0;

    color: #475467;

    font-size: 13px;
    line-height: 1.7;
    text-align: center;

}

.sw-keys kbd {

    padding: 1px 6px;

    border: 1px solid #d0d5dd;
    border-radius: 6px;

    background: #f9fafb;

    color: var(--color-ink);

    font: inherit;
    font-size: 12px;
    font-weight: 600;

}

/* the laps */

.sw-laps {

    margin-top: 24px;

}

.sw-table {

    width: 100%;

    border-collapse: collapse;

    font-variant-numeric: tabular-nums;

}

.sw-table caption {

    padding: 0 0 8px;

    color: var(--color-ink);

    font-size: 15px;
    font-weight: 700;
    text-align: left;

}

.sw-table th,
.sw-table td {

    padding: 10px 8px;

    border-top: 1px solid var(--color-slate-200);

    font-size: 16px;
    text-align: right;

}

.sw-table thead th {

    border-top: 0;
    border-bottom: 1px solid var(--color-slate-200);

    color: #475467;

    font-size: 13px;
    font-weight: 600;

}

.sw-table th:first-child {

    text-align: left;

}

.sw-table tbody th {

    color: var(--color-ink);

    font-weight: 650;

}

.sw-mark {

    display: inline-block;

    margin-left: 8px;
    padding: 1px 8px;

    border: 1px solid currentColor;
    border-radius: 999px;

    font-size: 12px;
    font-weight: 700;

}

.sw-mark--fast {

    color: #067647;

}

.sw-mark--slow {

    color: #b42318;

}

.sw-lap-note {

    margin: 12px 0 0;
    padding: 10px 14px;

    border: 1px solid var(--color-slate-200);
    border-radius: 10px;

    background: #f9fafb;

    color: #344054;

    font-size: 14px;
    line-height: 1.5;

}

@media (max-width: 480px) {

    .sw-table th,
    .sw-table td {

        padding: 10px 4px;

        font-size: 15px;

    }

    .sw-mark {

        margin-left: 6px;
        padding: 1px 6px;

    }

}

.sw-sr-only {

    position: absolute;

    width: 1px;
    height: 1px;

    margin: -1px;
    padding: 0;

    overflow: hidden;

    clip: rect(0, 0, 0, 0);

    white-space: nowrap;

    border: 0;

}
