/* ==========================================================================
   paycheckcalculatorillinois.com — design system
   Clean fintech: white ground, one blue for action, one green for money.
   ========================================================================== */

:root {
  --blue-50:  #eef4ff;
  --blue-100: #dce7fd;
  --blue-200: #bdd0fb;
  --blue-500: #2563eb;
  --blue-600: #1d4ed8;
  --blue-700: #1e40af;
  --blue-900: #16266b;

  --green-50:  #ecfdf3;
  --green-100: #d1fadf;
  --green-600: #059669;
  --green-700: #047857;

  --amber-50:  #fffbeb;
  --amber-200: #fde68a;
  --amber-700: #b45309;

  --red-50:  #fef2f2;
  --red-600: #dc2626;

  --ink-900: #0f172a;
  --ink-800: #1e293b;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-500: #64748b;
  --ink-400: #94a3b8;
  --ink-300: #cbd5e1;
  --ink-200: #e2e8f0;
  --ink-100: #f1f5f9;
  --ink-50:  #f8fafc;
  --white:   #ffffff;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-num: "SF Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --shadow-lg: 0 4px 12px rgba(15, 23, 42, .07), 0 24px 48px -24px rgba(15, 23, 42, .18);

  --wrap: 1140px;
  --wrap-narrow: 760px;
}

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

/* The hidden attribute has to beat the display rules below it. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }

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

h1, h2, h3, h4 {
  color: var(--ink-900);
  line-height: 1.25;
  margin: 0 0 .6em;
  font-weight: 700;
  letter-spacing: -.015em;
}
h1 { font-size: clamp(1.85rem, 1.2rem + 2.2vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.1vw, 1.8rem); margin-top: 2.2em; }
h3 { font-size: 1.2rem; margin-top: 1.8em; }
h4 { font-size: 1.03rem; margin-top: 1.5em; }

p { margin: 0 0 1.15em; }
ul, ol { margin: 0 0 1.15em; padding-left: 1.35em; }
li { margin-bottom: .45em; }
strong { color: var(--ink-900); font-weight: 650; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: var(--wrap-narrow); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------ header */

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--blue-600); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--ink-200);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 66px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink-900); font-size: 1.02rem; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 34px;
  background: linear-gradient(140deg, var(--blue-500), var(--blue-700));
  color: #fff; display: grid; place-items: center; font-size: .84rem; font-weight: 800; letter-spacing: -.03em;
}
.brand-text small { display: block; font-size: .68rem; font-weight: 500; color: var(--ink-500); letter-spacing: .04em; text-transform: uppercase; line-height: 1.2; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--ink-200);
  border-radius: 8px; padding: 7px 10px; cursor: pointer; color: var(--ink-700);
}

.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; align-items: center; flex-wrap: wrap; }
.site-nav li { margin: 0; }
.site-nav a {
  display: block; padding: 8px 12px; border-radius: 8px;
  color: var(--ink-700); font-size: .93rem; font-weight: 550;
}
.site-nav a:hover { background: var(--ink-100); color: var(--ink-900); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--blue-700); background: var(--blue-50); }

@media (max-width: 940px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--white); border-bottom: 1px solid var(--ink-200);
    box-shadow: var(--shadow); padding: 10px 20px 16px;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav a { padding: 11px 12px; }
}

/* --------------------------------------------------------------- breadcrumb */

.breadcrumb { padding: 14px 0 0; font-size: .85rem; color: var(--ink-500); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumb li { margin: 0; display: flex; gap: 6px; align-items: center; }
.breadcrumb li + li::before { content: "›"; color: var(--ink-300); }
.breadcrumb a { color: var(--ink-600); }

/* -------------------------------------------------------------------- hero */

.hero { padding: 26px 0 8px; }
.hero p.lede { font-size: 1.09rem; color: var(--ink-600); max-width: 68ch; }
.updated {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .8rem; color: var(--ink-500); background: var(--ink-50);
  border: 1px solid var(--ink-200); border-radius: 999px; padding: 4px 12px; margin-bottom: 14px;
}
.updated::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green-600); }

/* ------------------------------------------------------------------ layout */

main { padding-bottom: 40px; }
html, body { overflow-x: clip; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.layout > * { min-width: 0; }
@media (max-width: 1000px) { .layout { grid-template-columns: minmax(0, 1fr); gap: 30px; } }

/* Grid and flex children default to min-width:auto, which lets a wide table or
   a long number push the whole page sideways. Zeroing it keeps every overflow
   inside its own scroll container. */
.prose { max-width: 74ch; min-width: 0; }
.prose h2 { scroll-margin-top: 84px; }
.prose h3 { scroll-margin-top: 84px; }

/* --------------------------------------------------------------- calculator */

.calc {
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 22px 0 34px;
}
.calc-head {
  padding: 18px 22px; border-bottom: 1px solid var(--ink-200);
  background: linear-gradient(180deg, var(--ink-50), var(--white));
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.calc-head h2 { margin: 0; font-size: 1.15rem; min-width: 0; }
.calc-head .year-pick { display: flex; align-items: center; gap: 8px; font-size: .87rem; color: var(--ink-600); white-space: nowrap; }
.calc-head select { min-width: 92px; }

.calc-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.calc-body > * { min-width: 0; }
@media (max-width: 860px) { .calc-body { grid-template-columns: minmax(0, 1fr); } }

.calc-inputs { padding: 22px; }
.calc-results { padding: 22px; background: var(--ink-50); border-left: 1px solid var(--ink-200); }
@media (max-width: 860px) { .calc-results { border-left: 0; border-top: 1px solid var(--ink-200); } }

fieldset { border: 0; padding: 0; margin: 0 0 20px; }
fieldset:last-child { margin-bottom: 0; }
legend {
  font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-500); padding: 0; margin-bottom: 12px;
}

.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 14px; }
.field-row > * { min-width: 0; }
.field-row.one { grid-template-columns: minmax(0, 1fr); }
.field-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 520px) { .field-row, .field-row.three { grid-template-columns: minmax(0, 1fr); } }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field label { font-size: .84rem; font-weight: 600; color: var(--ink-700); }
.field .hint, .hint { font-size: .78rem; color: var(--ink-500); line-height: 1.5; font-weight: 400; }
p.hint { margin: -4px 0 12px; }

input[type="text"], input[type="number"], input[type="email"], select, textarea {
  width: 100%; font: inherit; font-size: .95rem;
  padding: 10px 12px; border: 1px solid var(--ink-300); border-radius: var(--radius);
  background: var(--white); color: var(--ink-900); transition: border-color .12s, box-shadow .12s;
  -moz-appearance: textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px var(--blue-100);
}
select {
  appearance: none; -webkit-appearance: none;
  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 fill='%2364748b' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px;
}

.input-money { position: relative; }
.input-money::before {
  content: "$"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--ink-500); font-size: .95rem; pointer-events: none;
}
.input-money input { padding-left: 25px; }

.input-pct { position: relative; }
.input-pct::after {
  content: "%"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--ink-500); font-size: .95rem; pointer-events: none;
}
.input-pct input { padding-right: 30px; }

.check { display: flex; align-items: flex-start; gap: 9px; font-size: .87rem; color: var(--ink-700); margin-bottom: 10px; cursor: pointer; }
.check input { margin: 3px 0 0; width: 16px; height: 16px; accent-color: var(--blue-600); flex: 0 0 16px; }

.seg { display: inline-flex; background: var(--ink-100); border-radius: 9px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg button {
  border: 0; background: none; font: inherit; font-size: .85rem; font-weight: 600;
  color: var(--ink-600); padding: 7px 14px; border-radius: 7px; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--white); color: var(--blue-700); box-shadow: var(--shadow-sm); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: .95rem; font-weight: 650; padding: 11px 20px;
  border-radius: var(--radius); border: 1px solid transparent; cursor: pointer;
  background: var(--blue-600); color: #fff; transition: background .12s;
}
.btn:hover { background: var(--blue-700); text-decoration: none; }
.btn-secondary { background: var(--white); color: var(--ink-700); border-color: var(--ink-300); }
.btn-secondary:hover { background: var(--ink-50); color: var(--ink-900); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

.advanced-toggle {
  width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--ink-200);
  padding: 13px 0 0; margin-top: 6px; font: inherit; font-size: .88rem; font-weight: 600;
  color: var(--blue-600); cursor: pointer; display: flex; align-items: center; gap: 7px;
}
.advanced-toggle::before { content: "+"; font-size: 1.05rem; line-height: 1; }
.advanced-toggle[aria-expanded="true"]::before { content: "–"; }
.advanced-panel[hidden] { display: none; }
.advanced-panel { padding-top: 16px; }

/* --------------------------------------------------------------- results */

.result-headline { text-align: center; padding: 6px 0 18px; border-bottom: 1px solid var(--ink-200); margin-bottom: 16px; }
.result-headline .label { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-500); font-weight: 700; }
.result-headline .amount {
  font-family: var(--font-num); font-size: clamp(2rem, 1.4rem + 2.4vw, 2.7rem);
  font-weight: 700; color: var(--green-700); letter-spacing: -.03em; line-height: 1.1; margin: 4px 0 2px;
}
.result-headline .sub { font-size: .85rem; color: var(--ink-600); }

.result-list { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.result-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 8px 0; border-bottom: 1px dashed var(--ink-200); margin: 0;
}
.result-list li:last-child { border-bottom: 0; }
.result-list .k { color: var(--ink-600); }
.result-list .k small { display: block; font-size: .77rem; color: var(--ink-600); }
.result-list .v { font-family: var(--font-num); font-weight: 600; color: var(--ink-900); white-space: nowrap; }
.result-list li.total { border-top: 2px solid var(--ink-300); border-bottom: 0; margin-top: 6px; padding-top: 12px; }
.result-list li.total .k, .result-list li.total .v { font-weight: 700; color: var(--ink-900); font-size: .97rem; }
.result-list li.negative .v { color: var(--red-600); }
.result-list li.positive .v { color: var(--green-700); }

.result-group-title {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700;
  color: var(--ink-500); margin: 18px 0 6px;
}

.bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--ink-200); margin: 14px 0 10px; }
.bar span { display: block; height: 100%; }
.bar .s-net { background: var(--green-600); }
.bar .s-fed { background: var(--blue-600); }
.bar .s-il  { background: #7c3aed; }
.bar .s-fica { background: #f59e0b; }
.bar .s-pre { background: var(--ink-400); }
.bar-key { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .76rem; color: var(--ink-600); }
.bar-key span { display: inline-flex; align-items: center; gap: 6px; }
.bar-key i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pill {
  background: var(--white); border: 1px solid var(--ink-200); border-radius: 999px;
  padding: 6px 13px; font-size: .8rem; color: var(--ink-600);
}
.pill strong { font-family: var(--font-num); color: var(--ink-900); }

/* ---------------------------------------------------------------- content */

.callout {
  border: 1px solid var(--blue-200); background: var(--blue-50);
  border-radius: var(--radius); padding: 16px 18px; margin: 22px 0; font-size: .95rem;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong:first-child { display: block; margin-bottom: 4px; color: var(--blue-900); }
.callout.warn { border-color: var(--amber-200); background: var(--amber-50); }
.callout.warn strong:first-child { color: var(--amber-700); }
.callout.good { border-color: var(--green-100); background: var(--green-50); }
.callout.good strong:first-child { color: var(--green-700); }

.table-scroll { overflow-x: auto; margin: 20px 0; border: 1px solid var(--ink-200); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 460px; }
.table-scroll { -webkit-overflow-scrolling: touch; }
caption { text-align: left; font-size: .84rem; color: var(--ink-500); padding: 12px 14px 0; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--ink-200); }
thead th { background: var(--ink-50); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-600); font-weight: 700; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--ink-50); }
td.num, th.num { text-align: right; font-family: var(--font-num); white-space: nowrap; }

.faq { margin: 26px 0; }
.faq-item { border-bottom: 1px solid var(--ink-200); }
.faq-item:first-child { border-top: 1px solid var(--ink-200); }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font: inherit; font-size: 1.02rem; font-weight: 650; color: var(--ink-900);
  padding: 16px 34px 16px 0; position: relative; line-height: 1.45;
}
.faq-q::after {
  content: ""; position: absolute; right: 6px; top: 24px; width: 9px; height: 9px;
  border-right: 2px solid var(--ink-400); border-bottom: 2px solid var(--ink-400);
  transform: rotate(45deg); transition: transform .18s;
}
.faq-q[aria-expanded="true"]::after { transform: rotate(-135deg); top: 28px; }
.faq-a { padding: 0 0 18px; color: var(--ink-700); font-size: .96rem; }
.faq-a p:last-child, .faq-a ul:last-child { margin-bottom: 0; }
.faq-a[hidden] { display: none; }

.key-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 14px; margin: 24px 0; }
.key-facts > * { min-width: 0; }
.key-fact { border: 1px solid var(--ink-200); border-radius: var(--radius); padding: 15px 16px; background: var(--white); }
.key-fact .n { font-family: var(--font-num); font-size: 1.5rem; font-weight: 700; color: var(--blue-700); letter-spacing: -.02em; line-height: 1.15; }
.key-fact .t { font-size: .82rem; color: var(--ink-600); margin-top: 3px; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; margin: 26px 0; }
.tool-grid > * { min-width: 0; }
.tool-card {
  display: block; border: 1px solid var(--ink-200); border-radius: var(--radius-lg);
  padding: 20px; background: var(--white); transition: border-color .14s, box-shadow .14s, transform .14s;
}
.tool-card:hover { border-color: var(--blue-200); box-shadow: var(--shadow); text-decoration: none; transform: translateY(-2px); }
.tool-card h3 { margin: 0 0 6px; font-size: 1.03rem; color: var(--blue-700); }
.tool-card p { margin: 0; font-size: .88rem; color: var(--ink-600); line-height: 1.55; }

.toc {
  border: 1px solid var(--ink-200); border-radius: var(--radius);
  padding: 16px 20px; margin: 24px 0; background: var(--ink-50); font-size: .92rem;
}
.toc strong { display: block; margin-bottom: 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-500); }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { margin-bottom: 4px; }

/* --------------------------------------------------------------- sidebar */

.sidebar { position: sticky; top: 84px; font-size: .92rem; }
@media (max-width: 1000px) { .sidebar { position: static; } }
.side-card {
  border: 1px solid var(--ink-200); border-radius: var(--radius-lg);
  padding: 18px 20px; margin-bottom: 18px; background: var(--white);
}
.side-card h3 { margin: 0 0 10px; font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-500); }
.side-card ul { list-style: none; margin: 0; padding: 0; }
.side-card li { margin: 0; border-bottom: 1px solid var(--ink-100); }
.side-card li:last-child { border-bottom: 0; }
.side-card li a { display: block; padding: 9px 0; color: var(--ink-700); font-size: .9rem; }
.side-card li a:hover { color: var(--blue-600); }
.side-rates li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: .88rem; }
.side-rates .v { font-family: var(--font-num); font-weight: 650; color: var(--ink-900); }

/* ---------------------------------------------------------------- footer */

.site-footer {
  background: var(--ink-900); color: var(--ink-300);
  padding: 44px 0 26px; margin-top: 50px; font-size: .9rem;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-grid > * { min-width: 0; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .footer-heading { color: #fff; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--ink-300); }
.site-footer a:hover { color: #fff; }
.site-footer p { color: var(--ink-400); font-size: .87rem; line-height: 1.65; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); margin-top: 32px; padding-top: 20px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .83rem; color: var(--ink-400);
}
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; margin-bottom: 12px; }
.footer-brand .brand-mark { background: rgba(255,255,255,.12); }

/* ------------------------------------------------------------------ misc */

.disclaimer-note {
  font-size: .82rem; color: var(--ink-500); border-top: 1px solid var(--ink-200);
  padding-top: 14px; margin-top: 30px; line-height: 1.6;
}
.source-list { font-size: .87rem; color: var(--ink-600); }
.source-list li { margin-bottom: 6px; }

.error-page { text-align: center; padding: 70px 0; }
.error-page .code { font-family: var(--font-num); font-size: 4.5rem; font-weight: 700; color: var(--blue-600); line-height: 1; }

@media print {
  .site-header, .site-footer, .sidebar, .btn, .nav-toggle, .breadcrumb { display: none !important; }
  body { font-size: 12pt; }
  .calc { break-inside: avoid; box-shadow: none; }
}
