/* ============================================================
   AmericaByNumbers.com — Stylesheet
   Design: Clean data site. Fast. Mobile-first. No external fonts.
   ============================================================ */

:root {
  --blue:      #1a56db;
  --blue-dark: #1e429f;
  --green:     #057a55;
  --gray-50:   #f9fafb;
  --gray-100:  #f3f4f6;
  --gray-200:  #e5e7eb;
  --gray-400:  #9ca3af;
  --gray-600:  #4b5563;
  --gray-800:  #1f2937;
  --gray-900:  #111827;
  --white:     #ffffff;
  --radius:    8px;
  --shadow:    0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 960px; margin: 0 auto; padding: 0 1rem; }

/* ── Header ── */
.site-header {
  background: var(--gray-900);
  padding: .75rem 0;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; }

.logo { color: var(--white); font-size: 1.2rem; font-weight: 700; letter-spacing: -.02em; }
.logo span { color: var(--blue); }

.site-header nav a {
  color: var(--gray-400); font-size: .9rem; margin-left: 1.5rem;
  transition: color .15s;
}
.site-header nav a:hover { color: var(--white); text-decoration: none; }

/* ── Breadcrumb ── */
.breadcrumb { font-size: .85rem; color: var(--gray-600); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--gray-600); }
.breadcrumb a:hover { color: var(--blue); }

/* ── Hero (Homepage) ── */
.hero { text-align: center; padding: 3rem 0 2rem; }
.hero h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; color: var(--gray-900); line-height: 1.2; }
.hero-sub { font-size: 1.1rem; color: var(--gray-600); margin-top: .75rem; max-width: 600px; margin-inline: auto; }

/* ── Page Header (Salary Pages) ── */
.page-header { padding: 2rem 0 1.5rem; border-bottom: 1px solid var(--gray-200); margin-bottom: 2rem; }
.page-header h1 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 800; color: var(--gray-900); line-height: 1.25; }
.year-tag { font-size: .75em; font-weight: 400; color: var(--gray-600); }
.data-source { font-size: .85rem; color: var(--gray-600); margin-top: .5rem; }
.data-source strong { color: var(--gray-800); }

/* ── Key Stats ── */
.key-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex; flex-direction: column; gap: .25rem;
  box-shadow: var(--shadow);
}

.stat-card.stat-primary {
  background: var(--blue);
  border-color: var(--blue-dark);
  color: var(--white);
}

.stat-label { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; opacity: .8; }
.stat-value { font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.stat-sub   { font-size: .78rem; opacity: .7; }

/* ── Salary Table ── */
.salary-breakdown { margin-bottom: 2.5rem; }
.salary-breakdown h2 { font-size: 1.4rem; margin-bottom: .5rem; }
.salary-breakdown p { color: var(--gray-600); margin-bottom: 1rem; }

.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.salary-table {
  width: 100%; border-collapse: collapse;
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
  font-size: .95rem;
}

.salary-table th {
  background: var(--gray-900); color: var(--white);
  padding: .75rem 1rem; text-align: left; font-weight: 600;
  font-size: .82rem; text-transform: uppercase; letter-spacing: .04em;
}

.salary-table td { padding: .75rem 1rem; border-bottom: 1px solid var(--gray-100); }
.salary-table tbody tr:last-child td { border-bottom: none; }
.salary-table tbody tr:hover { background: var(--gray-50); }

.median-row td { background: #eff6ff; font-weight: 600; }
.mean-row td   { background: var(--gray-50); color: var(--gray-600); font-size: .9rem; }

.salary-cell { font-weight: 700; color: var(--green); font-size: 1.05rem; }

.table-note { font-size: .8rem; color: var(--gray-400); margin-top: .75rem; }

/* ── CTA / Affiliate ── */
.cta-section {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 2rem; margin-bottom: 2.5rem;
}
.cta-section h2 { font-size: 1.3rem; margin-bottom: .5rem; }
.cta-section p  { color: var(--gray-600); margin-bottom: 1.25rem; }

.cta-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.cta-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  display: flex; flex-direction: column; gap: .3rem;
  transition: box-shadow .15s, border-color .15s;
  color: var(--gray-800);
}
.cta-card:hover { box-shadow: var(--shadow-md); border-color: var(--blue); text-decoration: none; }
.cta-icon { font-size: 1.4rem; }
.cta-card strong { font-size: .95rem; }
.cta-card span { font-size: .82rem; color: var(--gray-600); }

/* ── FAQ ── */
.faq-section { margin-bottom: 2.5rem; }
.faq-section h2 { font-size: 1.4rem; margin-bottom: 1.25rem; }

.faq-item { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--gray-100); }
.faq-item:last-child { border-bottom: none; }
.faq-item h3 { font-size: 1rem; font-weight: 700; color: var(--gray-900); margin-bottom: .5rem; }
.faq-item p  { color: var(--gray-600); font-size: .95rem; }

/* ── Related Links ── */
.related-links { margin-bottom: 2.5rem; }
.related-links h2 { font-size: 1.2rem; margin-bottom: 1rem; }

.state-links, .job-links {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .4rem;
}

.state-links li a, .job-links li a {
  font-size: .9rem; color: var(--blue);
  padding: .25rem 0; display: block;
}

/* ── Hub Page Tables ── */
.hub-table td a { font-weight: 600; }
.hub-table tbody tr:nth-child(even) { background: var(--gray-50); }
.hub-table tbody tr:hover { background: #eff6ff; }
.top-state td { background: #f0fdf4; }
.top-state td:first-child::before { content: "\2605 "; color: var(--green); }

.browse-description { color: var(--gray-600); margin-bottom: 1rem; font-size: .95rem; }

/* ── Ad Unit ── */
.ad-unit { margin: 1.5rem 0; min-height: 90px; }

/* ── Homepage: Featured Grid ── */
.featured-section { margin-bottom: 3rem; }
.featured-section h2 { font-size: 1.4rem; margin-bottom: 1rem; }

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .75rem;
}

.featured-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  display: flex; flex-direction: column; gap: .25rem;
  transition: box-shadow .15s; color: var(--gray-800);
  box-shadow: var(--shadow);
}
.featured-card:hover { box-shadow: var(--shadow-md); text-decoration: none; border-color: var(--blue); }
.featured-title { font-size: .9rem; font-weight: 600; color: var(--gray-900); }
.featured-median { font-size: .82rem; color: var(--gray-600); }
.featured-median strong { color: var(--green); }

/* ── Homepage: Browse Lists ── */
.browse-section { margin-bottom: 2.5rem; }
.browse-section h2 { font-size: 1.3rem; margin-bottom: 1rem; border-bottom: 1px solid var(--gray-200); padding-bottom: .5rem; }

.browse-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .35rem;
}
.browse-list li a { font-size: .9rem; color: var(--blue); padding: .2rem 0; display: block; }
.browse-list li a:hover { color: var(--blue-dark); }

/* ── Trust Section ── */
.trust-section { background: var(--gray-50); border-radius: var(--radius); padding: 2rem; margin-bottom: 3rem; }
.trust-section h2 { font-size: 1.3rem; margin-bottom: 1.25rem; }

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.trust-item strong { display: block; font-size: .95rem; margin-bottom: .35rem; }
.trust-item p { font-size: .88rem; color: var(--gray-600); }

/* ── Footer ── */
.site-footer {
  background: var(--gray-900); color: var(--gray-400);
  padding: 2rem 0; margin-top: 3rem; font-size: .85rem;
}

.site-footer a { color: var(--gray-400); }
.site-footer a:hover { color: var(--white); }
.site-footer p { margin-bottom: .5rem; }
.footer-links a { margin: 0 .5rem; }
.footer-disclaimer { font-size: .78rem; color: var(--gray-600); margin-top: .75rem; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .key-stats { grid-template-columns: 1fr; }
  .stat-value { font-size: 1.5rem; }
  .cta-cards { grid-template-columns: 1fr; }
  .page-header h1 { font-size: 1.4rem; }
  .salary-table { font-size: .88rem; }
  .salary-table th, .salary-table td { padding: .6rem .75rem; }
}
