@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=DM+Serif+Display:ital@0;1&display=swap');

:root {
  --navy: #0f2341;
  --navy-mid: #1a3a5c;
  --teal: #0d9488;
  --teal-dark: #0a7c71;
  --teal-light: #ccfbf1;
  --teal-xlight: #f0fdfa;
  --amber: #f59e0b;
  --bg: #f7f8fb;
  --card: #ffffff;
  --text: #0f2341;
  --text-secondary: #526070;
  --text-light: #8fa0b0;
  --border: #e4e9f0;
  --border-light: #f0f4f8;
  --shadow-sm: 0 1px 4px rgba(15,35,65,0.07);
  --shadow: 0 4px 20px rgba(15,35,65,0.09);
  --shadow-lg: 0 8px 40px rgba(15,35,65,0.13);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --font: 'Plus Jakarta Sans', sans-serif;
  --font-display: 'DM Serif Display', serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ─── HEADER ─────────────────────────────── */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}
.header-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-mark {
  width: 36px; height: 36px;
  background: var(--teal);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #fff;
}
.logo-text {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}
.logo-text span { color: var(--teal); }

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}

/* ─── AD ZONES ────────────────────────────── */
.ad-banner {
  background: var(--border-light);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  min-height: 60px;
  font-size: 11px;
  color: var(--text-light);
  text-align: center;
}
.ad-rect {
  background: var(--border-light);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-light);
  text-align: center;
}
.ad-inline {
  background: var(--border-light);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px 0;
  font-size: 11px;
  color: var(--text-light);
}

/* ─── PAGE LAYOUT ─────────────────────────── */
.page-wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}
.full-col { max-width: 760px; }

.page-hero {
  text-align: center;
  padding: 48px 24px 32px;
  max-width: 640px;
  margin: 0 auto;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 42px);
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 12px;
}
.page-hero p {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ─── CARDS ───────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 28px;
}
.card + .card { margin-top: 20px; }

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-title-icon {
  width: 36px; height: 36px;
  background: var(--teal-xlight);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* ─── FORMS ───────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.form-full { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.field input, .field select, .field textarea {
  height: 46px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--card);
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23526070' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13,148,136,0.12);
}
.field textarea {
  height: auto;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.5;
}
.field input.error, .field select.error { border-color: #ef4444; }
.field-hint {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
}

/* ─── BUTTONS ─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 2px 8px rgba(13,148,136,0.3);
}
.btn-primary:hover {
  background: var(--teal-dark);
  box-shadow: 0 4px 16px rgba(13,148,136,0.4);
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  color: var(--teal);
  border: 1.5px solid var(--teal);
}
.btn-secondary:hover {
  background: var(--teal-xlight);
}
.btn-navy {
  background: var(--navy);
  color: #fff;
}
.btn-navy:hover {
  background: var(--navy-mid);
  transform: translateY(-1px);
}
.btn-sm { height: 38px; padding: 0 16px; font-size: 13px; }
.btn-lg { height: 56px; padding: 0 32px; font-size: 16px; }
.btn-full { width: 100%; }

/* ─── RESULTS ─────────────────────────────── */
.results-panel {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: var(--radius);
  padding: 28px;
  color: #fff;
  display: none;
}
.results-panel.visible { display: block; }

.results-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}
.results-main-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.7;
  margin-bottom: 4px;
}
.results-main-value {
  font-family: var(--font-display);
  font-size: clamp(32px, 6vw, 48px);
  line-height: 1;
  color: #fff;
}
.results-period {
  font-size: 14px;
  opacity: 0.6;
  margin-top: 4px;
}

.results-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}
.breakdown-item {
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 14px 16px;
}
.breakdown-label {
  font-size: 12px;
  opacity: 0.65;
  margin-bottom: 4px;
  font-weight: 500;
}
.breakdown-value {
  font-size: 18px;
  font-weight: 700;
}
.breakdown-value.deduction { color: #fca5a5; }
.breakdown-value.net { color: #6ee7b7; }

.results-bar {
  margin-top: 20px;
}
.results-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  opacity: 0.65;
  margin-bottom: 8px;
}
.bar-track {
  height: 8px;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  gap: 2px;
}
.bar-segment {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
}
.bar-net { background: #34d399; }
.bar-fed { background: #f87171; }
.bar-state { background: #fbbf24; }
.bar-fica { background: #a78bfa; }

/* ─── STAT BOXES ──────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.stat-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  text-align: center;
}
.stat-box-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 6px;
}
.stat-box-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
}
.stat-box-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ─── WAGE TABLE ──────────────────────────── */
.wage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.wage-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  background: var(--bg);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.wage-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.wage-table tr:last-child td { border-bottom: none; }
.wage-table tr:hover td { background: var(--teal-xlight); }
.wage-table .state-name { font-weight: 600; }
.wage-table .wage-amount { font-weight: 700; color: var(--teal-dark); }
.wage-table .fed-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--border-light);
  color: var(--text-light);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.wage-table .high-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--teal-light);
  color: var(--teal-dark);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.search-bar {
  position: relative;
  margin-bottom: 16px;
}
.search-bar input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 42px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 15px;
  background: var(--card);
  transition: border-color 0.2s;
}
.search-bar input:focus { outline: none; border-color: var(--teal); }
.search-bar svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

/* ─── RANGE SLIDER ────────────────────────── */
.slider-wrap { display: flex; align-items: center; gap: 14px; }
.slider-wrap input[type=range] {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  border: none;
  box-shadow: none;
  padding: 0;
}
.slider-wrap input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--teal);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(13,148,136,0.4);
  border: 2px solid #fff;
}
.slider-val {
  min-width: 80px;
  text-align: right;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
}

/* ─── TAGS / BADGES ───────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.badge-teal { background: var(--teal-light); color: var(--teal-dark); }
.badge-navy { background: rgba(15,35,65,0.08); color: var(--navy); }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-red { background: #fee2e2; color: #991b1b; }

/* ─── INFO CALLOUT ────────────────────────── */
.callout {
  background: var(--teal-xlight);
  border: 1px solid var(--teal-light);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  margin: 16px 0;
}
.callout-warn {
  background: #fffbeb;
  border-color: #fde68a;
  border-left-color: var(--amber);
}
.callout strong { color: var(--text); }

/* ─── PAYSTUB PREVIEW ─────────────────────── */
.stub-preview {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
}
.stub-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--navy);
}
.stub-company { font-weight: bold; font-size: 15px; }
.stub-title {
  font-size: 18px;
  font-weight: bold;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.stub-section {
  margin-bottom: 16px;
}
.stub-section-title {
  background: var(--navy);
  color: #fff;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-family: var(--font);
}
.stub-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 8px;
  border-bottom: 1px dotted var(--border);
}
.stub-row.total {
  border-top: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
  font-weight: bold;
  background: var(--teal-xlight);
  margin-top: 4px;
}
.stub-row.net {
  background: var(--navy);
  color: #fff;
  font-weight: bold;
  font-size: 15px;
  border: none;
  padding: 8px;
  margin-top: 8px;
}
.stub-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 12px;
}
.stub-info-item strong { display: block; font-size: 10px; text-transform: uppercase; opacity: 0.6; }

/* ─── FOOTER ──────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.65);
  padding: 48px 24px 32px;
  margin-top: 60px;
}
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo-text { font-size: 20px; }
.footer-brand p {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.65;
}
.footer-col h4 {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.footer-col ul a:hover { color: var(--teal); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom p { font-size: 13px; }
.disclaimer {
  max-width: 640px;
  font-size: 12px;
  opacity: 0.5;
  line-height: 1.5;
}

/* ─── RESPONSIVE ──────────────────────────── */
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .form-grid.three { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--navy);
    padding: 12px 16px 20px;
    box-shadow: var(--shadow-lg);
    gap: 4px;
    z-index: 99;
  }
  .nav-links.open a { padding: 10px 12px; font-size: 15px; }
  .hamburger { display: flex; }
  .page-wrap { padding: 24px 16px 60px; }
  .card { padding: 20px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid.three { grid-template-columns: 1fr; }
  .form-full { grid-column: 1; }
  .results-breakdown { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-brand { grid-column: 1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .page-hero { padding: 32px 16px 20px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .results-main-value { font-size: 36px; }
}

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

/* ─── PRINT STYLES ────────────────────────── */
@media print {
  .site-header, .site-footer, .ad-banner, .ad-rect, .ad-inline,
  .no-print, .btn, .field, .callout { display: none !important; }
  body { background: white; }
  .stub-preview { border: 1px solid #ccc; box-shadow: none; }
  .page-wrap { padding: 0; }
  .card { box-shadow: none; border: none; }
}

/* ─── UTILITY ─────────────────────────────── */
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.text-sm { font-size: 13px; } .text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.font-bold { font-weight: 700; }
.hidden { display: none; }
.divider { height: 1px; background: var(--border-light); margin: 20px 0; }
.flex { display: flex; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
