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

:root {
    --gold: #c8a951;
    --gold-light: #f0e4c8;
    --navy: #1a2a3a;
    --navy-light: #2c3e50;
    --cream: #faf8f5;
    --white: #ffffff;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-600: #666666;
    --gray-800: #333333;
    --accent: #c0392b;
    --accent-hover: #a93226;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
    --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--cream);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    background: var(--navy);
    color: var(--white);
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
}

.logo svg { color: var(--gold); flex-shrink: 0; }

.site-nav { display: flex; gap: 1.5rem; }

.site-nav a {
    color: var(--gray-300);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

main { flex: 1; }

.hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: var(--white);
    padding: 3rem 1rem;
    text-align: center;
}

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

.hero h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--gray-300);
    margin-bottom: 1.5rem;
}

.hero-presets {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-presets span {
    font-size: 0.85rem;
    color: var(--gray-300);
}

.preset-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.25);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.preset-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: var(--gold);
    color: var(--gold);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--navy);
    border-bottom: 3px solid var(--gold);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.dashboard {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
    align-items: start;
}

.controls-panel {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

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

.control-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
    color: var(--navy);
}

.control-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.9rem;
    background: var(--white);
    color: var(--gray-800);
}

.control-group select[multiple] {
    min-height: 120px;
}

.control-hint {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

.control-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
    border: none;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}

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

.btn-secondary {
    background: var(--white);
    color: var(--navy);
    border: 1px solid var(--gray-300);
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--navy);
    background: var(--gray-100);
}

.results-panel {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    min-height: 400px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    color: var(--gray-600);
    text-align: center;
    gap: 1rem;
}

.empty-state svg { opacity: 0.5; }

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.results-table th {
    background: var(--navy);
    color: var(--white);
    padding: 0.6rem 0.75rem;
    text-align: left;
    font-size: 0.85rem;
}

.results-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.9rem;
}

.results-table tr:nth-child(even) td { background: var(--gray-100); }

.projection-range {
    font-size: 0.8rem;
    color: var(--gray-600);
}

.trend-chart {
    width: 100%;
    height: 200px;
    margin: 1rem 0;
}

.trend-chart svg { width: 100%; height: 100%; }

.key-takeaway {
    background: var(--gold-light);
    border-left: 4px solid var(--gold);
    padding: 0.75rem 1rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.saved-item {
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.saved-item button {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.8rem;
}

.supporting-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.support-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

.support-card h3 {
    font-size: 1.1rem;
    color: var(--navy);
    margin-bottom: 0.75rem;
}

.support-card p {
    font-size: 0.9rem;
    color: var(--gray-800);
    line-height: 1.7;
}

.faq-section {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.faq-item {
    background: var(--white);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

.faq-item summary {
    padding: 1rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--navy);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.3rem;
    color: var(--gold);
}

.faq-item[open] summary::after { content: '−'; }

.faq-item p {
    padding: 0 1.25rem 1rem;
    font-size: 0.9rem;
    color: var(--gray-800);
}

.site-footer {
    background: var(--navy);
    color: var(--gray-300);
    padding: 1.5rem 1rem;
    margin-top: 3rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    font-size: 0.85rem;
}

.footer-inner a {
    color: var(--gold);
    text-decoration: none;
}

.footer-inner a:hover { text-decoration: underline; }

.footer-note {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--gray-600);
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 { font-size: 1.5rem; }
    .hero-subtitle { font-size: 0.95rem; }

    .support-grid {
        grid-template-columns: 1fr;
    }

    .controls-panel { position: static; }
}

@media (max-width: 480px) {
    .header-inner { flex-direction: column; align-items: flex-start; }
    .site-nav { gap: 1rem; }
    .hero { padding: 2rem 0.75rem; }
    .hero-presets { flex-direction: column; align-items: stretch; }
    .preset-btn { text-align: center; }
}



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