/* Reset + base typography/layout. Components live in components.css. */

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
    transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease);
}

h1, h2, h3, h4 {
    margin: 0 0 var(--space-3);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

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

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

a:hover { color: var(--accent-hover); }

small { color: var(--text-muted); }

code {
    font-family: var(--font-mono);
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.9em;
}

::selection {
    background: var(--accent-soft);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

img { max-width: 100%; display: block; }

/* Layout primitives */

.page {
    flex: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--space-6) var(--space-5) var(--space-8);
}

.page-narrow {
    max-width: 560px;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.row-wrap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.spread {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.grid {
    display: grid;
    gap: var(--space-4);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.text-muted { color: var(--text-muted); }
.text-win { color: var(--win); }
.text-loss { color: var(--loss); }

@media (max-width: 640px) {
    .page {
        padding: var(--space-4) var(--space-3) var(--space-7);
    }
}
