/* Site95 Timer / Stopwatch — self-hosted, no Tailwind */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    overflow-x: clip;
    max-width: 100%;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
    max-width: 100%;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
.hidden { display: none !important; }

.container {
    width: 100%;
    min-width: 0;
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}
.container-sm {
    width: 100%;
    min-width: 0;
    max-width: 40rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header / footer (match suite pattern) */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #e2e8f0;
    backdrop-filter: blur(8px);
}
.site-header-inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0.65rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
}
.site-footer {
    margin-top: 3rem;
    background: #0f172a;
    color: #94a3b8;
    padding: 2rem 0 1.25rem;
}
.footer-bottom {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #1e293b;
    font-size: 0.85rem;
    text-align: center;
}
.footer-bottom a { color: #cbd5e1; }
.footer-bottom a:hover { color: #fff; }

.page-main { padding: 1.25rem 0 2.5rem; }
.section { padding: 2rem 0; }
.section-white { background: #fff; }
.border-section { border-top: 1px solid #e2e8f0; }

.tool-page-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}
.tool-page-desc {
    color: #64748b;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}
.tool-first-section { padding: 0.85rem 0 1.5rem; }
.tool-first-head { margin-bottom: 1rem; }
.tool-first-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.tool-switcher-current {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    background: #ede9fe;
    color: #5b21b6;
    font-size: 0.875rem;
    font-weight: 600;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 0.55rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    border: 1px solid transparent;
    min-width: 0;
}
.btn:active { transform: scale(0.98); }
.btn-lg {
    padding: 0.75rem 1.25rem;
    font-size: 1.05rem;
    min-height: 3rem;
}
.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
}
.btn-violet {
    background: #7c3aed;
    color: #fff;
}
.btn-violet:hover { background: #6d28d9; }
.btn-green {
    background: #16a34a;
    color: #fff;
}
.btn-green:hover { background: #15803d; }
.btn-amber {
    background: #d97706;
    color: #fff;
}
.btn-amber:hover { background: #b45309; }
.btn-neutral {
    background: #fff;
    color: #334155;
    border-color: #e2e8f0;
}
.btn-neutral:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn-danger {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}
.btn-danger:hover { background: #fecaca; }
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Timer card */
.tm-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem 1.15rem 1.35rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    min-width: 0;
}
.tm-display {
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1;
    font-size: clamp(2.75rem, 12vw, 4.25rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    text-align: center;
    color: #0f172a;
    line-height: 1.1;
    padding: 1.25rem 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 0.85rem;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    word-break: break-all;
}
.tm-display.is-running {
    color: #5b21b6;
    background: #f5f3ff;
    border-color: #ddd6fe;
}
.tm-display.is-paused {
    color: #b45309;
    background: #fffbeb;
    border-color: #fde68a;
}
.tm-display.is-done {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
    animation: tm-pulse 1s ease-in-out infinite;
}
.tm-display-sub {
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 1rem;
    min-height: 1.25rem;
}
.tm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: center;
    margin-bottom: 0.75rem;
}
.tm-actions .btn {
    flex: 1 1 auto;
    min-width: min(100%, 7.5rem);
    max-width: 12rem;
}

/* Countdown inputs */
.tm-set-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.tm-set-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}
.tm-set-field label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.tm-set-field input {
    width: 100%;
    min-width: 0;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    padding: 0.55rem 0.35rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.55rem;
    background: #fff;
    color: #0f172a;
}
.tm-set-field input:focus {
    outline: 2px solid #a78bfa;
    outline-offset: 1px;
    border-color: #7c3aed;
}
.tm-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    margin-bottom: 1rem;
}
.tm-preset {
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 600;
}
.tm-preset:hover,
.tm-preset.is-active {
    border-color: #7c3aed;
    background: #f5f3ff;
    color: #5b21b6;
}

.tm-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    justify-content: center;
    font-size: 0.875rem;
    color: #475569;
    margin-top: 0.5rem;
}
.tm-options label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}
.tm-options input { width: 1rem; height: 1rem; }

/* Laps */
.tm-laps {
    margin-top: 1rem;
    border-top: 1px solid #f1f5f9;
    padding-top: 0.85rem;
}
.tm-laps h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.tm-laps-list {
    max-height: 220px;
    overflow-y: auto;
    min-width: 0;
}
.tm-lap {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.4rem 0.25rem;
    border-bottom: 1px solid #f8fafc;
    font-variant-numeric: tabular-nums;
    font-size: 0.9rem;
}
.tm-lap-n { color: #94a3b8; font-weight: 600; }
.tm-lap-t { font-weight: 700; color: #0f172a; }
.tm-lap-d { color: #64748b; }

/* Cards grid hub */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 640px) {
    .grid-2 { grid-template-columns: 1fr 1fr; }
}
.tool-card {
    display: flex;
    gap: 0.85rem;
    padding: 1rem;
    border-radius: 0.85rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    min-width: 0;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.tool-card:hover {
    border-color: #c4b5fd;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.08);
}
.tool-card-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f3ff;
    color: #7c3aed;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.tool-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}
.tool-card p {
    font-size: 0.875rem;
    color: #64748b;
}
.tool-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #7c3aed;
}

/* SEO blocks */
.tool-section { margin-top: 2rem; }
.tool-section h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.85rem;
    color: #0f172a;
}
.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}
@media (min-width: 700px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.info-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
    min-width: 0;
}
.info-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0.35rem 0;
}
.info-card p { font-size: 0.875rem; color: #64748b; }
.step-num {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    background: #7c3aed;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.faq-list { display: flex; flex-direction: column; gap: 0.5rem; }
.faq-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    padding: 0.75rem 1rem;
}
.faq-item summary {
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #475569;
}
.seo-content {
    margin-top: 2rem;
    font-size: 0.95rem;
    color: #475569;
}
.seo-content h2, .seo-content h3 {
    color: #0f172a;
    margin: 1.25rem 0 0.5rem;
}
.seo-content h2 { font-size: 1.25rem; }
.seo-content h3 { font-size: 1.05rem; }
.seo-content ul {
    list-style: disc;
    padding-left: 1.25rem;
    margin: 0.5rem 0 1rem;
}
.seo-content a { color: #7c3aed; text-decoration: underline; }
.seo-intro {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0.75rem 0 1rem;
}

.breadcrumbs {
    padding: 0.65rem 0;
    font-size: 0.85rem;
    color: #94a3b8;
}
.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    list-style: none;
}
.breadcrumbs li:not(:last-child)::after {
    content: '/';
    margin-left: 0.35rem;
    color: #cbd5e1;
}
.breadcrumbs a { color: #64748b; }
.breadcrumbs a:hover { color: #7c3aed; }

.ads-slot { min-height: 0; margin: 0.75rem auto; }

@keyframes tm-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(185, 28, 28, 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(185, 28, 28, 0.05); }
}

/* Sticky mobile primary actions when running is less needed — keep buttons full width */
@media (max-width: 640px) {
    .tm-actions .btn {
        max-width: none;
        flex: 1 1 calc(50% - 0.55rem);
    }
    .tm-display {
        font-size: clamp(2.4rem, 14vw, 3.25rem);
        padding: 1rem 0.35rem;
    }
    .page-main { padding-top: 0.85rem; }
}

body.tm-flash {
    animation: tm-body-flash 0.35s ease 3;
}
@keyframes tm-body-flash {
    0%, 100% { background-color: #f8fafc; }
    50% { background-color: #fee2e2; }
}

@media (prefers-reduced-motion: reduce) {
    .tm-display.is-done { animation: none; }
    body.tm-flash { animation: none; }
    html { scroll-behavior: auto; }
}
