@font-face {
    font-family: 'MartianMono NF';
    src: url('../fonts/MartianMonoNerdFont-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'MartianMono NF';
    src: url('../fonts/MartianMonoNerdFont-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

:root {
    --accent: #4f46e5;
    --bg-card: #f9fafb;
    --border: #d1d5db;
    --text-main: #111827;
    --text-sub: #4b5563;
    --font-family: 'MartianMono NF', monospace; 
}

* { box-sizing: border-box; }

/* The 'height' and 'min-height' are critical for 
   vertical centering in the browser window.
*/
html, body {
    height: 100%;
}

body { 
    font-family: var(--font-family); 
    background: #f3f4f6; 
    margin: 0; 
    padding: 20px; 
    color: var(--text-main); 
    line-height: 1.4; 
    letter-spacing: -0.03em; 

    /* FLEXBOX CENTERING */
    display: flex;
    justify-content: center; /* Horizontal centering */
    align-items: center;     /* Vertical centering */
    min-height: 100vh;
}

/* Ensure the form doesn't stretch too wide */
#generator-form {
    width: 100%;
    max-width: 600px; /* Adjust based on your preference */
    margin: 0 auto;
}

/* Ensure form elements inherit the font */
input, button, textarea, select {
    font-family: var(--font-family); 
}

/* Hide the kit until print generation */
#printable-doc { 
    display: none; 
    background: white; 
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-content { text-align: center; }

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}