/* ============================================================
   TimeKeeper Admin — Base & Reset (modern-minimal)
   ============================================================ */

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

html {
    background: var(--canvas);
    -webkit-text-size-adjust: 100%;
    overflow-x: clip;
}

body {
    min-width: 320px;
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--font);
    font-size: var(--text-base);
    line-height: 1.55;
    letter-spacing: -0.006em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

/* ── Scrollbars — matched to the palette (light content areas) ── */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--grey-300) transparent;
}
*::-webkit-scrollbar { width: 12px; height: 12px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    background: var(--grey-300);
    border-radius: var(--radius-full);
    border: 3px solid transparent;
    background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--grey-400); }
*::-webkit-scrollbar-corner { background: transparent; }

/* ── Typography scale — roman display, no italic headers ── */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 var(--space-3);
    color: var(--ink-strong);
    font-weight: 650;
    font-style: normal;
    line-height: 1.25;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}
h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-md); }

p { margin: 0 0 var(--space-3); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, .mono { font-family: var(--font-mono); font-size: 0.9em; }

/* ── Accessibility ── */
.skip-link {
    position: absolute;
    left: -9999px;
    top: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--accent);
    color: var(--accent-fg);
    border-radius: var(--radius-sm);
    font-weight: 600;
    z-index: 9999;
}
.skip-link:focus { left: var(--space-4); }

:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.tabnum { font-variant-numeric: tabular-nums; }

/* ── Page entrance — subtle, fast ── */
@media (prefers-reduced-motion: no-preference) {
    .page-shell > * { animation: tk-rise 300ms var(--ease-out) both; }
    .page-shell > *:nth-child(2) { animation-delay: 40ms; }
    .page-shell > *:nth-child(3) { animation-delay: 80ms; }
    .page-shell > *:nth-child(4) { animation-delay: 120ms; }
}
@keyframes tk-rise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
