/* Easy Payroll Calc — employer payroll desk / navy ledger (not teal sales-tax skin) */
:root {
  --ink: #152033;
  --muted: #5a6a7d;
  --line: #d7dde8;
  --paper: #f3f5f9;
  --card: #ffffff;
  --navy: #1e3a5f;
  --navy-deep: #132742;
  --navy-soft: #e8eef6;
  --indigo: #3b4f9a;
  --indigo-soft: #eceff8;
  --copper: #b86b2e;
  --copper-hover: #97561f;
  --copper-soft: #f7efe6;
  --ok: #1d6b4f;
  --ok-bg: #e7f4ee;
  --warn: #8a4b12;
  --danger: #9b2c2c;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(21, 32, 51, 0.05), 0 12px 30px rgba(21, 32, 51, 0.08);
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --header-h: 48px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(900px 320px at 90% -8%, #dfe7f4 0, transparent 55%),
    linear-gradient(180deg, #e9edf5 0, var(--paper) 200px);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--indigo); text-decoration: none; }
a:hover { color: var(--navy-deep); text-decoration: underline; text-underline-offset: 3px; }
.container { width: min(100% - 1.25rem, 1040px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: #fff; padding: .5rem .75rem; }

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(30, 58, 95, .06);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; min-height: var(--header-h); flex-wrap: wrap;
  padding: .25rem 0;
}
.brand {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--ink); font-weight: 700; text-decoration: none; font-size: .92rem;
}
.brand:hover { text-decoration: none; color: var(--navy); }
.brand-mark {
  display: grid; place-items: center;
  width: 1.7rem; height: 1.7rem; border-radius: 6px;
  background: linear-gradient(145deg, var(--navy) 0, var(--indigo) 100%);
  color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .02em;
}
.nav-links {
  display: flex; gap: .7rem; list-style: none; margin: 0; padding: 0;
  flex-wrap: wrap; font-size: .86rem;
}
.nav-links a { color: var(--muted); font-weight: 600; text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--navy); }

.hero { padding: .7rem 0 .25rem; }
.hero h1 {
  margin: 0 0 .28rem;
  font-size: clamp(1.35rem, 3.2vw, 1.9rem);
  line-height: 1.18;
  letter-spacing: -.02em;
  color: var(--navy-deep);
}
.lede {
  margin: 0 0 .65rem;
  color: var(--muted);
  font-size: .95rem;
  max-width: 44rem;
}
.lede strong { color: var(--ink); font-weight: 700; }

.calc-section { padding: 0 0 1.1rem; }
.calc-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.calc-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
}
@media (max-width: 860px) {
  .calc-grid { grid-template-columns: 1fr; }
}
.calc-inputs, .calc-results { padding: .85rem 1rem 1rem; }
.calc-inputs { border-right: 1px solid var(--line); background: linear-gradient(180deg, #fbfcfe, #fff 40%); }
@media (max-width: 860px) {
  .calc-inputs { border-right: none; border-bottom: 1px solid var(--line); }
}
.calc-inputs h2, .calc-results h2 {
  margin: 0 0 .55rem;
  font-size: .95rem;
  letter-spacing: .01em;
  color: var(--navy);
}
.field { margin-bottom: .55rem; }
.field label {
  display: block; font-size: .82rem; font-weight: 650; margin-bottom: .22rem; color: var(--ink);
}
.hint { color: var(--muted); font-weight: 500; font-size: .78rem; }
.input-money, .input-wrap {
  display: flex; align-items: stretch; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; overflow: hidden;
}
.input-money:focus-within, .input-wrap:focus-within, select:focus, input:focus {
  outline: 2px solid rgba(59, 79, 154, .28); outline-offset: 1px; border-color: var(--indigo);
}
.input-money .prefix, .input-wrap .suffix {
  display: grid; place-items: center; padding: 0 .55rem;
  background: var(--navy-soft); color: var(--navy); font-weight: 700; font-size: .9rem;
  border-right: 1px solid var(--line);
}
.input-wrap .suffix { border-right: 0; border-left: 1px solid var(--line); }
.input-money input, .input-wrap input, .field input[type="text"], .field input[type="number"], .field select {
  width: 100%; border: 0; background: transparent; padding: .55rem .65rem;
  font: inherit; color: var(--ink);
}
.field select, .field input[type="text"], .field input[type="number"] {
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.seg {
  display: inline-flex; gap: .25rem; padding: .18rem; background: var(--indigo-soft);
  border-radius: 9px; margin-bottom: .35rem; flex-wrap: wrap;
}
.seg button {
  border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 650;
  font-size: .82rem; padding: .35rem .65rem; border-radius: 7px; cursor: pointer;
}
.seg button[aria-pressed="true"] {
  background: #fff; color: var(--navy); box-shadow: 0 1px 2px rgba(21,32,51,.08);
}
.row-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: .55rem;
}
@media (max-width: 520px) {
  .row-2 { grid-template-columns: 1fr; }
}
.btn-row { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin-top: .35rem; }
.btn {
  appearance: none; border: 0; border-radius: 9px; font: inherit; font-weight: 700;
  cursor: pointer; padding: .62rem 1rem; line-height: 1.2;
}
.btn-primary {
  background: linear-gradient(180deg, #2a4d7a, var(--navy));
  color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 6px 14px rgba(30,58,95,.22);
}
.btn-primary:hover { background: linear-gradient(180deg, #335987, var(--navy-deep)); }
.btn-ghost {
  background: #fff; color: var(--navy); border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--navy-soft); }
.btn-sm { padding: .42rem .7rem; font-size: .84rem; }
.btn-copper {
  background: linear-gradient(180deg, #c97a38, var(--copper));
  color: #fff;
}
.btn-copper:hover { background: linear-gradient(180deg, #b86b2e, var(--copper-hover)); }
.copy-toast {
  display: none; margin-top: .4rem; font-size: .82rem; color: var(--ok); font-weight: 650;
}
.copy-toast.show { display: block; }
.optional-loc {
  margin-top: .55rem; border: 1px dashed var(--line); border-radius: 8px; padding: .35rem .55rem .55rem;
  background: #fafbfd;
}
.optional-loc summary {
  cursor: pointer; font-size: .84rem; font-weight: 650; color: var(--muted); padding: .2rem 0;
}
.optional-loc[open] summary { margin-bottom: .35rem; color: var(--navy); }

.calc-results { background: linear-gradient(180deg, var(--navy-soft), #fff 42%); }
.calc-results.is-empty .placeholder {
  color: var(--muted); font-size: .92rem; margin: .35rem 0 0;
}
.big-num {
  font-size: clamp(1.55rem, 3.5vw, 2.05rem); font-weight: 800; letter-spacing: -.03em;
  color: var(--navy-deep); font-variant-numeric: tabular-nums; margin: .1rem 0 .45rem;
}
.metric-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; margin-bottom: .55rem;
}
.metric {
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .45rem .55rem;
}
.metric .k { font-size: .72rem; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .03em; }
.metric .v { font-size: 1.02rem; font-weight: 750; color: var(--ink); font-variant-numeric: tabular-nums; }
.breakdown {
  list-style: none; margin: 0 0 .55rem; padding: 0;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden;
}
.breakdown li {
  display: flex; justify-content: space-between; gap: .75rem;
  padding: .4rem .6rem; border-bottom: 1px solid var(--line); font-size: .88rem;
}
.breakdown li:last-child { border-bottom: 0; }
.breakdown .amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.breakdown .cap {
  display: inline-block; margin-left: .35rem; font-size: .7rem; font-weight: 700;
  color: var(--copper); background: var(--copper-soft); border-radius: 999px; padding: .05rem .35rem;
  vertical-align: middle;
}
.source-line { font-size: .78rem; color: var(--muted); margin: 0 0 .45rem; }
.disclaimer-box {
  font-size: .78rem; color: var(--warn); background: var(--copper-soft);
  border: 1px solid #ecd7bf; border-radius: 8px; padding: .5rem .65rem; margin: 0;
}
.result-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin: .55rem 0 .35rem; }

.content { padding: .5rem 0 2rem; }
.content h2 { color: var(--navy); font-size: 1.15rem; margin: 1.35rem 0 .45rem; }
.content h3 { color: var(--navy); font-size: 1rem; margin: 1rem 0 .35rem; }
.content p, .content li { color: var(--ink); }
.prose { max-width: 46rem; }
.card-soft {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: .9rem 1rem; box-shadow: var(--shadow); margin: .75rem 0;
}
.rate-table-wrap { overflow-x: auto; margin: .75rem 0 1.25rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.rate-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.rate-table th, .rate-table td { padding: .45rem .55rem; border-bottom: 1px solid var(--line); text-align: left; }
.rate-table th { background: var(--navy); color: #fff; font-weight: 700; position: sticky; top: 0; }
.rate-table tr:nth-child(even) td { background: #f7f9fc; }
.faq details {
  border: 1px solid var(--line); border-radius: 8px; background: #fff; margin-bottom: .45rem; padding: .55rem .7rem;
}
.faq summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.faq details p { margin: .4rem 0 0; color: var(--muted); font-size: .94rem; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .25rem 0 .45rem; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: .22rem .55rem; font-size: .78rem; font-weight: 650; color: var(--navy); cursor: pointer;
}
.chip:hover { background: var(--navy-soft); }

.site-footer {
  border-top: 1px solid var(--line); background: #fff; padding: 1.1rem 0 1.4rem; margin-top: 1rem;
  color: var(--muted); font-size: .84rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1rem;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: .75rem; }
}
.site-footer a { color: var(--navy); font-weight: 650; }
.site-footer h3 { margin: 0 0 .35rem; font-size: .86rem; color: var(--ink); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: .2rem 0; }
.footer-disclaimer {
  margin-top: .85rem; padding-top: .75rem; border-top: 1px solid var(--line);
  font-size: .78rem; color: var(--muted);
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

@media (max-width: 420px) {
  .hero { padding: .55rem 0 .15rem; }
  .hero h1 { font-size: 1.28rem; }
  .lede { font-size: .9rem; margin-bottom: .5rem; }
  .calc-inputs, .calc-results { padding: .7rem .75rem .85rem; }
  .field { margin-bottom: .45rem; }
  .btn { padding: .58rem .9rem; }
  .nav-links { gap: .5rem; font-size: .8rem; }
}

.split-h {
  margin: .7rem 0 .35rem;
  font-size: .88rem;
  color: var(--navy);
  letter-spacing: .01em;
}
.state-chip-row { display:flex; flex-wrap:wrap; gap:.4rem; margin:.5rem 0 1rem; }
.state-chip-row a {
  display:inline-block; padding:.35rem .7rem; border-radius:999px;
  border:1px solid var(--line); background:#fff; color:var(--navy); font-weight:650; font-size:.84rem;
  text-decoration:none;
}
.state-chip-row a:hover { background: var(--navy-soft); }
.breadcrumbs { font-size:.82rem; color:var(--muted); margin:0 0 .45rem; }
.breadcrumbs a { color: var(--indigo); font-weight:650; }
.meta-updated { font-size:.8rem; color:var(--muted); margin:.15rem 0 .6rem; }

@media (max-width: 420px) {
  .breadcrumbs { display: none; }
  .hero { padding: .45rem 0 .1rem; }
  .meta-updated { font-size: .74rem; }
}
