/* Overtake: Overtake Paycheck Impact Sim */
:root {
  --c-navy: #1a5276;
  --c-navy-dark: #0e3a54;
  --c-gold: #f0b429;
  --c-gold-light: #f9e5a0;
  --c-bg: #f4f6f8;
  --c-surface: #ffffff;
  --c-text: #1c252e;
  --c-text-muted: #5a6b7a;
  --c-border: #d5dce4;
  --c-success: #27ae60;
  --c-danger: #e74c3c;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--c-text); background: var(--c-bg); line-height: 1.6; }

.skip-link { position: absolute; top: -100%; left: 16px; background: var(--c-navy); color: #fff; padding: 8px 16px; border-radius: 0 0 6px 6px; z-index: 100; }
.skip-link:focus { top: 0; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { background: var(--c-navy); color: #fff; padding: 14px 0; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.25rem; }
.logo-text { letter-spacing: -0.02em; }
.main-nav ul { display: flex; list-style: none; gap: 20px; }
.main-nav a { color: rgba(255,255,255,0.85); text-decoration: none; font-size: 0.95rem; padding: 4px 0; border-bottom: 2px solid transparent; transition: border-color 0.2s; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--c-gold); }

/* Hero */
.hero-section { background: linear-gradient(135deg, var(--c-navy) 0%, var(--c-navy-dark) 100%); color: #fff; padding: 48px 0 40px; }
.hero-section h1 { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 10px; }
.hero-sub { font-size: 1.1rem; opacity: 0.85; max-width: 560px; margin-bottom: 24px; }

.preset-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.3); border-radius: 20px; padding: 8px 18px; font-size: 0.9rem; cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.chip:hover { background: rgba(255,255,255,0.25); border-color: var(--c-gold); }

/* Simulator layout */
.sim-section { padding: 40px 0; }
.sim-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }

.input-panel { background: var(--c-surface); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.input-panel h2 { font-size: 1.3rem; margin-bottom: 20px; color: var(--c-navy); }

.field-group { border: 1px solid var(--c-border); border-radius: 8px; padding: 18px; margin-bottom: 18px; }
.field-group legend { font-weight: 600; font-size: 0.95rem; color: var(--c-navy); padding: 0 6px; }
.field-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.field-row:last-child { margin-bottom: 0; }
.field-row label { font-weight: 600; font-size: 0.9rem; }
.field-row input[type="number"], .field-row select { padding: 8px 12px; border: 1px solid var(--c-border); border-radius: 6px; font-size: 1rem; width: 100%; max-width: 260px; }
.field-row input[type="range"] { width: 100%; max-width: 200px; }
.field-row .hint { font-size: 0.8rem; color: var(--c-text-muted); }
.readonly-input { background: #f0f0f0; }

.field-row:has(input[type="range"]) { flex-direction: row; align-items: center; gap: 12px; flex-wrap: wrap; }
.field-row output { font-weight: 700; color: var(--c-navy); min-width: 40px; }

.field-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.btn { padding: 10px 20px; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; border: 2px solid transparent; transition: background 0.2s, transform 0.1s; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--c-navy); color: #fff; border-color: var(--c-navy); }
.btn-primary:hover { background: var(--c-navy-dark); }
.btn-secondary { background: #fff; color: var(--c-navy); border-color: var(--c-navy); }
.btn-secondary:hover { background: var(--c-gold-light); }

/* Results panel */
.results-panel { background: var(--c-surface); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); position: sticky; top: 80px; }
.results-panel h2 { font-size: 1.3rem; margin-bottom: 16px; color: var(--c-navy); }

.result-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.result-card { background: var(--c-bg); border-radius: 8px; padding: 16px; text-align: center; }
.result-main { border-left: 4px solid var(--c-navy); }
.result-delta { grid-column: 1 / -1; border-left: 4px solid var(--c-gold); background: #fffbeb; }
.result-label { display: block; font-size: 0.8rem; color: var(--c-text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.result-value { display: block; font-size: 1.5rem; font-weight: 800; color: var(--c-navy); }
.result-delta .result-value { color: var(--c-success); }
.result-sub { display: block; font-size: 0.8rem; color: var(--c-text-muted); margin-top: 2px; }

.breakdown-table-wrap { margin-bottom: 24px; }
.breakdown-table-wrap h3 { font-size: 1rem; margin-bottom: 10px; color: var(--c-navy); }
.breakdown-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.breakdown-table th, .breakdown-table td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--c-border); }
.breakdown-table th:first-child, .breakdown-table td:first-child { text-align: left; }
.breakdown-table thead th { font-weight: 600; color: var(--c-text-muted); font-size: 0.8rem; text-transform: uppercase; }
.total-row td { border-top: 2px solid var(--c-navy); border-bottom: none; font-weight: 700; }

.scenario-compare { margin-bottom: 24px; }
.scenario-compare h3 { font-size: 1rem; margin-bottom: 10px; color: var(--c-navy); }
.empty-state { color: var(--c-text-muted); font-size: 0.9rem; font-style: italic; }
.scenario-cards { display: flex; flex-direction: column; gap: 10px; }
.scenario-card { border: 1px solid var(--c-border); border-radius: 8px; padding: 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.scenario-card-info { flex: 1; }
.scenario-card-name { font-weight: 600; font-size: 0.9rem; }
.scenario-card-detail { font-size: 0.8rem; color: var(--c-text-muted); }
.scenario-card-net { font-weight: 700; color: var(--c-navy); font-size: 1rem; }
.scenario-card-del { background: none; border: none; color: var(--c-danger); cursor: pointer; font-size: 1.1rem; padding: 4px; }

.break-even-box { background: #fff8e6; border: 1px solid var(--c-gold); border-radius: 8px; padding: 16px; }
.break-even-box h3 { font-size: 1rem; margin-bottom: 6px; color: var(--c-navy); }
.break-even-box p { font-size: 0.9rem; margin-bottom: 4px; }
.break-even-box strong { font-size: 1.3rem; color: var(--c-navy); }

/* Guide section */
.guide-section { padding: 48px 0 56px; background: var(--c-surface); border-top: 1px solid var(--c-border); }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; }
.guide-block h2 { font-size: 1.15rem; color: var(--c-navy); margin-bottom: 10px; }
.guide-block p, .guide-block li { font-size: 0.95rem; color: var(--c-text); margin-bottom: 8px; }
.guide-block ul { padding-left: 20px; }
.guide-block dl { display: grid; gap: 12px; }
.guide-block dt { font-weight: 600; color: var(--c-navy); }
.guide-block dd { font-size: 0.95rem; margin: 0; }

/* Footer */
.site-footer { background: var(--c-navy-dark); color: rgba(255,255,255,0.7); padding: 32px 0; font-size: 0.85rem; }
.footer-inner { display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.footer-inner nav ul { display: flex; list-style: none; gap: 16px; flex-wrap: wrap; justify-content: center; }
.footer-inner a { color: rgba(255,255,255,0.8); text-decoration: none; }
.footer-inner a:hover { color: var(--c-gold); }
.footer-copy { opacity: 0.6; }

/* Print */
@media print {
  .site-header, .site-footer, .preset-chips, .field-actions, .guide-section, .skip-link { display: none !important; }
  .sim-layout { display: block; }
  .results-panel { position: static; box-shadow: none; }
  .input-panel { page-break-after: always; }
  body { background: #fff; }
}

/* Responsive */
@media (max-width: 900px) {
  .sim-layout { grid-template-columns: 1fr; }
  .results-panel { position: static; }
  .hero-section h1 { font-size: 1.7rem; }
  .result-summary { grid-template-columns: 1fr; }
  .result-delta { grid-column: auto; }
}

@media (max-width: 600px) {
  .header-inner { flex-direction: column; gap: 8px; }
  .main-nav ul { gap: 12px; }
  .hero-section { padding: 32px 0 28px; }
  .input-panel, .results-panel { padding: 18px; }
  .field-actions { flex-direction: column; }
  .btn { width: 100%; text-align: center; }
  .guide-grid { grid-template-columns: 1fr; }
}



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