/* WageYard site-wide styles — mobile-first, system fonts, light+dark */

:root {
  --bg: #f6f8f6;
  --surface: #ffffff;
  --surface-2: #eef3ef;
  --text: #17221c;
  --muted: #56695e;
  --accent: #0e7a4e;
  --accent-strong: #0a5f3d;
  --accent-soft: #e0f2e9;
  --border: #d8e2db;
  --danger: #a33;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1410;
    --surface: #151f19;
    --surface-2: #1b2820;
    --text: #e7efe9;
    --muted: #9db3a6;
    --accent: #4fc38a;
    --accent-strong: #6fd6a2;
    --accent-soft: #143124;
    --border: #27352c;
    --danger: #e08484;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

main { display: block; }

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

a { color: var(--accent); }
a:hover, a:focus { color: var(--accent-strong); }

h1 { font-size: 1.65rem; line-height: 1.25; margin: 0.5rem 0 0.75rem; }
h2 { font-size: 1.3rem; margin: 2rem 0 0.6rem; }
h3 { font-size: 1.08rem; margin: 1.4rem 0 0.5rem; }

p { margin: 0.7rem 0; }

/* ---------- header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--text);
}
.logo img { width: 24px; height: 24px; }
.logo em { color: var(--accent); font-style: normal; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
}
.site-nav { display: none; width: 100%; }
.site-nav.open { display: block; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.site-nav a {
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
}
.site-nav a:hover { background: var(--accent-soft); }
.site-nav a[aria-current="page"] { color: var(--accent-strong); font-weight: 700; }

@media (min-width: 760px) {
  .nav-toggle { display: none; }
  .site-nav { display: block; width: auto; }
  .site-nav ul { flex-direction: row; padding: 0; gap: 0.25rem; }
}

/* ---------- breadcrumbs ---------- */
.breadcrumbs { font-size: 0.85rem; margin: 1rem 0 0; color: var(--muted); }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.breadcrumbs li + li::before { content: "›"; margin-right: 0.35rem; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }

/* ---------- hero / cards ---------- */
.hero { padding: 1.75rem 0 0.75rem; }
.hero p.lead { font-size: 1.1rem; color: var(--muted); max-width: 46rem; }

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin: 1.25rem 0;
}
@media (min-width: 620px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 880px) { .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}
.card h2, .card h3 { margin-top: 0; }
.card a.card-link { text-decoration: none; color: var(--text); }
.card a.card-link:hover { color: var(--accent-strong); }
.card p { color: var(--muted); font-size: 0.92rem; margin: 0.4rem 0 0; }
.card .tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  margin-bottom: 0.4rem;
}

.chip-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; padding: 0; list-style: none; }
.chip-list a {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.22rem 0.75rem;
  font-size: 0.88rem;
  text-decoration: none;
}
.chip-list a:hover { border-color: var(--accent); color: var(--accent-strong); }

/* ---------- grid ladder nav (prev/next/popular) ---------- */
.ladder-nav {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 0.6rem 1rem;
  margin: 1.4rem 0 0;
  font-size: 0.92rem;
}
.ladder-nav p { margin: 0.2rem 0; }
.ladder-nav a { text-decoration: none; }
.ladder-nav a:hover { text-decoration: underline; }
.ladder-popular { color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1.2rem;
  font-size: 1rem;
  cursor: pointer;
}
.btn:hover, .btn:focus { background: var(--accent-strong); color: #fff; }
.btn.secondary { background: var(--surface-2); color: var(--accent-strong); border: 1px solid var(--border); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 1rem 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.94rem; }
caption { text-align: left; font-size: 0.85rem; color: var(--muted); padding: 0.7rem 0.9rem 0; caption-side: top; }
th, td { padding: 0.55rem 0.9rem; text-align: right; border-top: 1px solid var(--border); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { background: var(--surface-2); border-top: none; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; }
tbody tr.hl { background: var(--accent-soft); }
tfoot td { color: var(--muted); font-size: 0.82rem; white-space: normal; }

/* ---------- calculator ---------- */
.calc-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.25rem; margin: 1.25rem 0; }
.mode-toggle { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; margin-bottom: 1rem; }
.mode-btn {
  border: none; background: transparent; color: var(--muted);
  font: inherit; font-weight: 600; padding: 0.4rem 1.1rem; border-radius: 8px; cursor: pointer;
}
.mode-btn.active { background: var(--accent); color: #fff; }
.calc-fields { display: grid; gap: 0.9rem; grid-template-columns: 1fr; margin-bottom: 0.5rem; }
@media (min-width: 620px) { .calc-fields { grid-template-columns: repeat(3, 1fr); } }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.25rem; }
.field input {
  width: 100%; font: inherit; padding: 0.55rem 0.7rem;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text);
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field.is-hidden { display: none; }
.disclaimer { font-size: 0.82rem; color: var(--muted); }

/* ---------- ad slots ---------- */
.ad-slot {
  margin: 1.5rem 0;
  min-height: 96px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-slot .ad-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

/* ---------- FAQ ---------- */
details.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  margin: 0.5rem 0;
}
details.faq-item summary { font-weight: 600; cursor: pointer; }
details.faq-item p { color: var(--muted); }

/* ---------- email capture ---------- */
.email-capture {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  margin: 1.75rem 0;
}
.email-capture form { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.6rem; }
.email-capture input[type="email"] {
  flex: 1 1 220px; font: inherit; padding: 0.55rem 0.7rem;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text);
}

/* ---------- callouts ---------- */
.callout {
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: 0 10px 10px 0;
  padding: 0.7rem 1rem;
  margin: 1.1rem 0;
  font-size: 0.95rem;
}
.updated { font-size: 0.85rem; color: var(--muted); margin: 0.25rem 0 1rem; }
.formula {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
  overflow-x: auto;
  margin: 1rem 0;
}

/* ---------- footer ---------- */
.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1.5rem 0 2rem;
  font-size: 0.9rem;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin-bottom: 0.6rem; }
.site-footer a { text-decoration: none; }
.site-footer p { color: var(--muted); margin: 0.3rem 0 0; }

/* ---------- misc ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff; padding: 0.5rem 0.9rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
.two-col { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 820px) { .two-col { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

.ad-slot:not(:has(ins.adsbygoogle[data-ad-status="filled"])) { display: none !important; min-height: 0 !important; border: 0 !important; margin: 0 !important; padding: 0 !important; }
.ad-slot:has(ins.adsbygoogle[data-ad-status="filled"]) { margin: 1.5rem 0 !important; min-height: 96px; }
