/* SalarySolve — "Banknote" design system
   Display: Fraunces (engraved, old-style money character)
   Body: Public Sans (the US government's typeface)
   Numbers: IBM Plex Mono (payroll-system vernacular)
   Signature: perforated pay-stub results over a guilloche security pattern. */

:root {
  --ink: #0d231c;          /* currency engraving green-black */
  --ink-2: #143528;
  --body-c: #2b4038;
  --muted: #5d7268;
  --paper: #f2f4ef;        /* security-paper */
  --card: #ffffff;
  --seal: #14603f;         /* seal green */
  --seal-deep: #0d4a30;
  --mint: #8fd6ae;         /* mint on dark */
  --mint-soft: #e3f2e9;
  --gold: #c2a14c;         /* treasury gold */
  --gold-soft: #f6efdc;
  --red: #a33b2e;
  --line: #dce3dc;
  --radius: 14px;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "Public Sans", system-ui, -apple-system, sans-serif;
  --display: "Fraunces", Georgia, serif;
  --shadow-lg: 0 24px 48px -16px rgb(13 35 28 / 28%), 0 4px 12px rgb(13 35 28 / 10%);
  --shadow-sm: 0 1px 3px rgb(13 35 28 / 8%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--body-c);
  background: var(--paper);
  line-height: 1.7;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* ---------- sticky header ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgb(242 244 239 / 88%);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header.site::before {
  content: ""; display: block; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--seal) 40%, var(--ink));
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 13px; padding-bottom: 13px; }
.logo { font-family: var(--display); font-weight: 600; font-size: 1.35rem; text-decoration: none; color: var(--ink); letter-spacing: -0.01em; }
.logo span { color: var(--seal); font-style: italic; }
nav.main a { color: var(--muted); text-decoration: none; margin-left: 20px; font-size: 0.9rem; font-weight: 700; letter-spacing: 0.01em; }
nav.main a:hover, nav.main a:focus { color: var(--seal-deep); }
@media (max-width: 620px) { nav.main a { margin-left: 12px; font-size: 0.82rem; } }

/* ---------- hero: engraved banknote band + guilloche ---------- */
.hero {
  background:
    radial-gradient(1100px 420px at 78% -60px, rgb(143 214 174 / 14%), transparent 62%),
    linear-gradient(174deg, var(--ink-2), var(--ink) 58%);
  color: #eef5ef;
  padding: 30px 0 56px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='560' height='560' viewBox='0 0 560 560'%3E%3Cg fill='none' stroke='%238fd6ae' stroke-width='0.7'%3E%3Ccircle cx='280' cy='280' r='40'/%3E%3Ccircle cx='280' cy='280' r='78'/%3E%3Ccircle cx='280' cy='280' r='116'/%3E%3Ccircle cx='280' cy='280' r='154'/%3E%3Ccircle cx='280' cy='280' r='192'/%3E%3Ccircle cx='280' cy='280' r='230'/%3E%3Ccircle cx='280' cy='280' r='268'/%3E%3Ccircle cx='60' cy='60' r='40'/%3E%3Ccircle cx='60' cy='60' r='84'/%3E%3Ccircle cx='60' cy='60' r='128'/%3E%3Ccircle cx='60' cy='60' r='172'/%3E%3Ccircle cx='500' cy='520' r='46'/%3E%3Ccircle cx='500' cy='520' r='96'/%3E%3Ccircle cx='500' cy='520' r='146'/%3E%3Ccircle cx='500' cy='520' r='196'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 560px 560px;
  opacity: 0.10;
  mask-image: linear-gradient(180deg, #000 30%, transparent 96%);
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 96%);
}
.hero .wrap { position: relative; }
.hero .crumbs { color: #9db5a7; padding: 0 0 22px; font-size: 0.8rem; }
.hero .crumbs a { color: #9db5a7; text-decoration: none; }
.hero .crumbs a:hover { color: var(--mint); }
.year-chip {
  display: inline-block; font-family: var(--mono); font-size: 0.75rem; font-weight: 600;
  color: var(--gold); border: 1px solid rgb(194 161 76 / 55%);
  padding: 4px 13px; border-radius: 999px; margin-bottom: 18px;
  letter-spacing: 0.04em; background: rgb(194 161 76 / 8%);
}
.hero h1 {
  font-family: var(--display); font-weight: 620; font-variation-settings: "opsz" 60;
  font-size: clamp(2.1rem, 5.4vw, 3.3rem);
  letter-spacing: -0.015em; line-height: 1.08; margin: 0 0 16px;
  color: #f7faf6; max-width: 15ch;
}
.hero h1 em { font-style: italic; color: var(--mint); }
.tagline { color: #b9cec1; font-size: 1.08rem; max-width: 560px; line-height: 1.65; }

/* ---------- main ---------- */
main.wrap { position: relative; z-index: 2; padding-bottom: 30px; }

h2 { font-family: var(--display); font-weight: 600; font-size: 1.6rem; letter-spacing: -0.01em; margin: 52px 0 14px; color: var(--ink); }
h3 { font-size: 1.08rem; margin: 26px 0 8px; font-weight: 700; color: var(--ink); }
p { margin: 12px 0; }
a { color: var(--seal-deep); text-decoration-color: rgb(20 96 63 / 35%); text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--seal); }
ul, ol { padding-left: 22px; margin: 12px 0; }

/* answer div */
.answer {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px; margin: 26px 0; font-size: 1.02rem;
  box-shadow: var(--shadow-sm);
}
.answer strong { color: var(--seal-deep); }

/* ---------- calculator card ---------- */
.calc {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; margin: 26px 0;
  box-shadow: var(--shadow-lg);
}
.calc h2:first-child, .calc h2 { margin-top: 0; font-size: 1.35rem; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 0.85rem; margin-bottom: 7px; color: var(--ink); letter-spacing: 0.01em; }
.field input, .field select {
  width: 100%; padding: 12px 14px; font-size: 1.05rem; font-family: var(--mono);
  border: 1.5px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--ink);
  transition: border-color 120ms, box-shadow 120ms;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--seal);
  box-shadow: 0 0 0 3px rgb(20 96 63 / 15%); background: #fff;
}
.field .hint { font-size: 0.78rem; color: var(--muted); margin-top: 5px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
button.go {
  width: 100%; padding: 15px; font-size: 1.02rem; font-weight: 800; font-family: var(--sans);
  color: #fff; letter-spacing: 0.01em;
  background: linear-gradient(180deg, var(--seal), var(--seal-deep));
  border: 0; border-radius: 9px; cursor: pointer; margin-top: 6px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 18%), 0 2px 6px rgb(13 74 48 / 30%);
  transition: transform 120ms, box-shadow 120ms;
}
button.go:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgb(255 255 255 / 18%), 0 6px 14px rgb(13 74 48 / 35%); }
button.go:active { transform: translateY(0); }
button.go:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- signature: pay stub ---------- */
.stub {
  margin-top: 26px; background: #fffdf8; border: 1px solid #e4e0d2; border-radius: 4px;
  position: relative; display: none;
  background-image: repeating-linear-gradient(transparent, transparent 31px, rgb(20 96 63 / 5%) 31px, rgb(20 96 63 / 5%) 32px);
}
.stub.show { display: block; animation: stub-in 380ms cubic-bezier(0.2, 0.8, 0.3, 1); }
@keyframes stub-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.stub::before, .stub::after {
  content: ""; position: absolute; left: 0; right: 0; height: 10px;
  background-image: radial-gradient(circle at 8px 0, transparent 5px, #fffdf8 5px);
  background-size: 22px 10px; background-repeat: repeat-x;
}
.stub::before { top: -10px; transform: rotate(180deg); }
.stub::after { bottom: -10px; }
.stub-head {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 2px dashed #d9d4c2; padding: 16px 22px 12px;
  font-family: var(--mono); font-size: 0.75rem; color: #86806c;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.stub-rows { padding: 8px 22px; }
.stub-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.96rem; border-bottom: 1px solid #efece0; }
.stub-row:last-child { border-bottom: 0; }
.stub-row .k { color: var(--muted); }
.stub-row .v { font-family: var(--mono); font-weight: 600; color: var(--ink); }
.stub-row .v.neg { color: var(--red); }
.stub-net {
  display: flex; justify-content: space-between; align-items: center;
  background: linear-gradient(180deg, var(--mint-soft), #d8ecdf);
  border: 1px solid #bcdcc8;
  margin: 8px 14px 14px; padding: 15px 18px; border-radius: 9px;
}
.stub-net .k { font-weight: 800; color: var(--ink); }
.stub-net .v { font-family: var(--mono); font-size: 1.6rem; font-weight: 700; color: var(--seal-deep); }
.stub-periods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #e4e0d2; border-top: 1px solid #e4e0d2; }
.stub-periods div { background: #fffdf8; padding: 13px; text-align: center; }
.stub-periods .k { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: #86806c; }
.stub-periods .v { font-family: var(--mono); font-weight: 700; font-size: 1.04rem; color: var(--ink); }
.est-flag {
  margin: 0 22px 14px; padding: 9px 13px; font-size: 0.8rem;
  background: var(--gold-soft); color: #7d6524; border: 1px solid #e6d9b4; border-radius: 7px; display: none;
}
.est-flag a { color: #7d6524; }
.est-flag.show { display: block; }

/* ---------- infographic + tables ---------- */
figure.info { margin: 28px 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
figure.info svg { width: 100%; height: auto; display: block; }
figure.info figcaption { font-size: 0.82rem; color: var(--muted); margin-top: 12px; text-align: center; }

table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 18px 0; font-size: 0.93rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
th { background: var(--ink); color: #e8f1ea; text-align: left; padding: 12px 15px; font-size: 0.82rem; letter-spacing: 0.03em; font-weight: 700; }
td { padding: 11px 15px; border-top: 1px solid #e9eee8; }
td.num, th.num { font-family: var(--mono); text-align: right; }
tbody tr:nth-child(even) td { background: #f8faf6; }
tbody tr:hover td { background: var(--mint-soft); }
.tbl-scroll { overflow-x: auto; border-radius: var(--radius); }

/* ---------- FAQ ---------- */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; transition: border-color 120ms; }
.faq details[open] { border-color: var(--seal); }
.faq summary { cursor: pointer; font-weight: 700; padding: 15px 18px; color: var(--ink); list-style: none; position: relative; padding-right: 40px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-52%); font-family: var(--mono); font-size: 1.2rem; color: var(--seal); }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 18px 15px; }

/* ---------- tool grid ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 15px; margin: 22px 0; }
.tool-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; text-decoration: none; color: var(--body-c); display: block; position: relative;
  transition: transform 140ms, box-shadow 140ms, border-color 140ms;
}
.tool-card::after {
  content: "→"; position: absolute; right: 18px; top: 18px;
  font-family: var(--mono); color: var(--line); transition: color 140ms, transform 140ms;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--seal); }
.tool-card:hover::after { color: var(--seal); transform: translateX(3px); }
.tool-card b { display: block; margin-bottom: 5px; color: var(--ink); font-size: 1.02rem; }
.tool-card span { font-size: 0.86rem; color: var(--muted); }

/* ---------- footer ---------- */
footer.site { margin-top: 72px; background: var(--ink); color: #a7bcae; font-size: 0.88rem; position: relative; }
footer.site::before { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--ink), var(--seal) 60%, var(--gold)); }
footer.site .wrap { padding-top: 38px; padding-bottom: 38px; }
footer.site .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
@media (max-width: 640px) { footer.site .cols { grid-template-columns: 1fr; } }
footer.site h4 { color: #e8f1ea; font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 12px; font-weight: 600; }
footer.site a { color: #a7bcae; text-decoration: none; display: block; padding: 3px 0; }
footer.site a:hover { color: var(--mint); }
footer.site .fineprint { border-top: 1px solid #1f3d30; margin-top: 28px; padding-top: 20px; font-size: 0.78rem; color: #7d9587; }

.disclaimer { font-size: 0.82rem; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: 10px; padding: 13px 17px; margin: 28px 0; }

/* trust pages (no hero) */
main.wrap.plain { padding-top: 8px; }
main.wrap.plain h1 { font-family: var(--display); font-weight: 620; font-size: clamp(1.9rem, 4.5vw, 2.6rem); color: var(--ink); letter-spacing: -0.015em; margin: 26px 0 12px; }
.crumbs { font-size: 0.8rem; color: var(--muted); padding: 16px 0 0; }
.crumbs a { color: var(--muted); }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, .stub.show, .tool-card, button.go { animation: none !important; transition: none !important; }
}


/* ---------- hero grid: copy left, live tool right ---------- */
.hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 46px; align-items: start; margin-top: 8px; }
.hero-copy { padding-top: 18px; }
.hero-tool .calc { margin: 0; box-shadow: 0 32px 64px -20px rgb(0 0 0 / 45%), 0 6px 16px rgb(0 0 0 / 22%); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-copy { padding-top: 0; }
  .hero h1 { max-width: none; }
}

/* segmented control */
.seg { display: flex; gap: 3px; background: var(--paper); border: 1.5px solid var(--line); border-radius: 9px; padding: 3px; }
.seg button {
  flex: 1; padding: 9px 6px; font-family: var(--sans); font-weight: 700; font-size: 0.82rem;
  color: var(--muted); background: transparent; border: 0; border-radius: 7px; cursor: pointer;
  transition: background 120ms, color 120ms;
}
.seg button:hover { color: var(--ink); }
.seg button.on { background: #fff; color: var(--seal-deep); box-shadow: 0 1px 3px rgb(13 35 28 / 15%); }
.seg button:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }

/* trust line under button */
.trust-line { font-size: 0.74rem; color: var(--muted); text-align: center; margin: 10px 0 0; letter-spacing: 0.01em; }

/* homepage stat strip */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 26px 0 8px; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.stats b { display: block; font-family: var(--mono); font-size: 1.5rem; font-weight: 700; color: var(--seal-deep); letter-spacing: -0.02em; }
.stats span { font-size: 0.8rem; color: var(--muted); }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; } }

/* tool card glyphs */
.tool-card .glyph { display: inline-flex; width: 34px; height: 34px; margin-bottom: 10px; color: var(--seal); background: var(--mint-soft); border-radius: 9px; padding: 7px; }
.tool-card .glyph svg { width: 100%; height: 100%; }

/* grouped select */
optgroup { font-family: var(--sans); font-size: 0.8rem; color: var(--muted); }
optgroup option { font-family: var(--mono); color: var(--ink); }
