:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #10b981;
    --bg: #f8fafc;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --danger: #ef4444;
    --success: #10b981;
}

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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.site-header {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.05em;
}

.site-header nav a {
    margin-left: 1.5rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.site-header nav a:hover {
    color: var(--primary);
}

main {
    flex: 1;
    padding: 3rem 1.5rem;
}

.hero {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.lead {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.calculator-section {
    margin-bottom: 4rem;
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.card h2 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--bg);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.monthly-display {
    margin-top: 2rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.25rem;
}

.monthly-display strong {
    color: var(--primary);
    font-size: 1.5rem;
}

.results-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
}

.results-panel h2 {
    margin-bottom: 2rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.result-box {
    padding: 1.5rem;
    background: var(--bg);
    border-radius: 0.5rem;
}

.result-box h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.result-box .highlight {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-neutral { color: var(--text-main); }

.educational-content {
    max-width: 800px;
    margin: 0 auto;
}

.educational-content h2,
.educational-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.educational-content p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.educational-content strong {
    color: var(--text-main);
}

.site-footer {
    text-align: center;
    padding: 2rem 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.site-footer p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.site-footer nav a {
    margin: 0 1rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .calculator-grid,
    .results-grid {
        grid-template-columns: 1fr;
    }
    .site-header nav a {
        margin-left: 1rem;
    }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
