:root {
    --bg-color: #f8fafc;
    --text-color: #334155;
    --text-muted: #64748b;
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --surface: #ffffff;
    --border: #e2e8f0;
    --tax-color: #ef4444;
    --spend-color: #10b981;
    --radius: 8px;
}

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

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

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

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

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

.branding {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
}

.branding h1 {
    font-size: 1.25rem;
    font-weight: 700;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 1rem;
    font-weight: 500;
}

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

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

.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h2 {
    font-size: 2.5rem;
    color: #0f172a;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

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

.calc-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    max-width: 500px;
    margin: 0 auto;
}

.calc-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.helper-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

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

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

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

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

.btn-primary {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.875rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.results {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--border);
}

.results.hidden {
    display: none;
}

.results h4 {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 1.125rem;
}

.highlight-tax strong {
    color: var(--tax-color);
}

.highlight-spend {
    font-weight: bold;
    font-size: 1.25rem;
}

.highlight-spend strong {
    color: var(--spend-color);
}

.guide-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.guide-item h3 {
    color: #0f172a;
    margin-bottom: 0.75rem;
}

.guide-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 2rem 0;
    text-align: center;
}

.site-footer .container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.legal-links a {
    color: #cbd5e1;
    text-decoration: none;
    margin: 0 0.5rem;
    font-size: 0.875rem;
}

.legal-links a:hover {
    text-decoration: underline;
}

@media (min-width: 600px) {
    .site-footer .container {
        flex-direction: row;
        justify-content: space-between;
    }
}


/* 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;
}
