/* Shared presentation for the clock and stopwatch in every language. */
:root {
    --tool-ink: #212529;
    --tool-muted: #50585f;
    --tool-surface: #f5f5f5;
    --tool-accent: #208036;
    --tool-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
.tool-page, .tool-page * { box-sizing: border-box; }
body.tool-page {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    color: var(--tool-ink);
    background: #fff;
    font-family: var(--tool-font);
    font-size: 16px;
    line-height: 1.5;
    color-scheme: light;
}
.tool-page a { color: var(--tool-accent); text-decoration: underline; text-underline-offset: 4px; }
.tool-page a:hover { color: #155a26; text-decoration: underline; }
.tool-page a:focus-visible, .tool-page button:focus-visible {
    outline: 3px solid var(--tool-accent);
    outline-offset: 4px;
}
.tool-header { padding: 16px; background: #fff; }
.tool-nav { display: flex; justify-content: center; gap: 8px; }
.tool-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 24px;
    border-radius: 4px;
    color: var(--tool-muted);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}
.tool-nav a[aria-current] { background: var(--tool-accent); color: #fff; }
.tool-page .timer, .clock-time {
    font-family: var(--tool-font);
    font-variant-numeric: tabular-nums;
    font-weight: 400;
    white-space: nowrap;
}
.clock-main { flex: 1; display: flex; flex-direction: column; background: #fff; }
.clock-panel {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--tool-surface);
    text-align: center;
    padding: 64px 20px;
}
.clock-time { display: block; font-size: clamp(48px, 18vw, 288px); line-height: 1.2; }
.clock-date { display: block; margin-top: 24px; font-size: clamp(18px, 2.2vw, 30px); color: var(--tool-muted); }
.tool-page h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 500; }
.tool-page .bigclock { background: var(--tool-surface); padding: 48px 16px; }
.tool-page .timer { font-size: clamp(42px, 14vw, 112px); line-height: 1.3; }
.tool-page .mile { font-size: .36em; font-family: var(--tool-font) !important; }
.tool-page .control-buttons { margin-top: 24px; max-width: 600px; }
.tool-page .control-buttons .col { padding: 0 6px; }
.tool-page .control-buttons button { min-height: 48px; font-family: var(--tool-font); font-size: 18px; border-radius: 4px; }
.tool-page .btn-success { background: var(--tool-accent); border-color: var(--tool-accent); }
.tool-page .btn-success:hover { background: #155a26; border-color: #155a26; }
.tool-page .btn-secondary:disabled { background: #e2e5e7; border-color: #e2e5e7; color: #596168; opacity: 1; }
.tool-page .custom-control-label { min-height: 44px; padding-top: 10px; cursor: pointer; }
.tool-page .custom-control-label::before, .tool-page .custom-control-label::after { top: 14px; }
.tool-page .custom-control-label::before { border-color: #737b82; }
.tool-page .custom-control-input:checked ~ .custom-control-label::before { background: var(--tool-accent); border-color: var(--tool-accent); }
.tool-page .page-text { max-width: 800px; line-height: 1.7; }
.tool-page .results { max-width: 800px; font-variant-numeric: tabular-nums; }
.tool-page .results .mile { font-size: .8em; }
.tool-footer { margin-top: auto; padding: 20px 16px; background: var(--tool-surface); }
.tool-page .lang {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 24px;
    margin: 0;
    font-size: 14px;
}
.tool-page .lang a, .tool-page .lang span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    margin: 0;
}
.tool-page .lang [aria-current] { font-weight: 600; }
.tool-page .lang img { width: 17px; height: auto; margin: 0; }
@media (max-width: 575px) {
    .tool-page .bigclock { padding: 32px 10px; }
    .tool-page .control-buttons button { font-size: 16px; padding: 8px 4px; }
    .tool-page .lang { gap: 0 16px; }
    .clock-panel { padding: 48px 12px; }
}

.clock-page h1 { margin: 0 0 24px; font-size: clamp(20px, 2.2vw, 28px); color: var(--tool-muted); }
.clock-info { width: 100%; max-width: 800px; margin: 0 auto; padding: 24px; color: var(--tool-ink); line-height: 1.7; }
.clock-info p { margin: 0 0 12px; }
.clock-info p:last-child { margin-bottom: 0; }
