*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg:         #f8f7f4;
    --color-surface:    #ffffff;
    --color-border:     #e2e0d8;
    --color-text:       #1a1a1a;
    --color-muted:      #6b6b6b;
    --color-accent:     #2d6a4f;
    --color-accent-hover: #1b4332;
    --color-danger:     #c0392b;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);

    --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'Cascadia Code', 'Fira Code', monospace;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    min-width: 260px;
    max-width: 360px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 0.875rem 1rem 0 1rem;
    z-index: 1000;
    animation: toast-in 0.2s ease;
}

.toast-message {
    font-size: 0.875rem;
    color: var(--color-text);
    margin-bottom: 0.625rem;
}

.toast-link {
    font-size: 0.775rem;
    color: var(--color-accent);
    text-decoration: none;
    display: block;
    margin-bottom: 0.625rem;
}

.toast-link:hover { text-decoration: underline; }

.toast-progress {
    height: 3px;
    background: var(--color-border);
    border-radius: 99px;
    overflow: hidden;
    margin: 0 -1rem;
}

.toast-progress-bar {
    height: 100%;
    border-radius: 99px;
    transition: width linear;
}

.toast-success .toast-progress-bar { background: #2d6a4f; }
.toast-error   .toast-progress-bar { background: #c0392b; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}