/* paycheckcals.com — design system
   Clean fintech: deep navy, off-white ground, single green accent.
   No frameworks, no external fonts, theme-aware. */

:root {
  --navy-900: #0a1a2f;
  --navy-800: #0f2745;
  --navy-700: #16375e;
  --navy-600: #1f4b7d;
  --ink: #16202c;
  --ink-2: #46566b;
  --ink-3: #6c7c91;
  --line: #e2e8f0;
  --line-2: #eef2f7;
  --bg: #ffffff;
  --bg-2: #f6f8fb;
  --bg-3: #eef3f9;
  --card: #ffffff;
  --accent: #0d9b74;
  --accent-2: #067a5b;
  --accent-soft: #e6f6f1;
  --warn: #b45309;
  --warn-soft: #fdf5e6;
  --danger: #b42318;
  --shadow: 0 1px 2px rgba(13, 28, 48, .06), 0 8px 24px rgba(13, 28, 48, .06);
  --shadow-sm: 0 1px 2px rgba(13, 28, 48, .07);
  --radius: 12px;
  --radius-sm: 8px;
  --maxw: 1140px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e8eef6;
    --ink-2: #a9b8ca;
    --ink-3: #7f8fa4;
    --line: #24344a;
    --line-2: #1c2a3d;
    --bg: #0c141f;
    --bg-2: #111b28;
    --bg-3: #162232;
    --card: #121d2b;
    --navy-900: #e8eef6;
    --navy-800: #dbe6f2;
    --accent: #2bc294;
    --accent-2: #4fd3aa;
    --accent-soft: #10352c;
    --warn-soft: #2e2413;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .28);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  }
}
:root[data-theme="dark"] {
  --ink: #e8eef6; --ink-2: #a9b8ca; --ink-3: #7f8fa4;
  --line: #24344a; --line-2: #1c2a3d;
  --bg: #0c141f; --bg-2: #111b28; --bg-3: #162232; --card: #121d2b;
  --navy-900: #e8eef6; --navy-800: #dbe6f2;
  --accent: #2bc294; --accent-2: #4fd3aa; --accent-soft: #10352c; --warn-soft: #2e2413;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.28);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16.5px; line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--navy-600); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-2); }
:root[data-theme="dark"] a, :root:not([data-theme="light"]) a { }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) a { color: #7fb2ea; } }
:root[data-theme="dark"] a { color: #7fb2ea; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50; background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 18px; height: 62px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px;
  color: var(--navy-900); text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px; flex: 0 0 26px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--navy-700) 100%);
  display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 800;
}
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a {
  color: var(--ink-2); text-decoration: none; font-size: 14.5px; font-weight: 500;
  padding: 7px 11px; border-radius: 7px;
}
.nav a:hover { background: var(--bg-2); color: var(--ink); }
.theme-btn {
  background: none; border: 1px solid var(--line); color: var(--ink-2); cursor: pointer;
  width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-size: 15px;
}
.theme-btn:hover { background: var(--bg-2); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px;
  width: 38px; height: 34px; cursor: pointer; color: var(--ink); font-size: 16px; }
@media (max-width: 860px) {
  .nav-toggle { display: block; margin-left: auto; }
  .nav { display: none; position: absolute; top: 62px; left: 0; right: 0; background: var(--bg);
    border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 10px 16px 16px; gap: 2px; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 8px; }
}

/* ---------- breadcrumbs ---------- */
.crumbs { font-size: 13.5px; color: var(--ink-3); padding: 14px 0 0; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--accent-2); text-decoration: underline; }
.crumbs span { margin: 0 6px; opacity: .55; }

/* ---------- hero / headings ---------- */
h1 { font-size: clamp(27px, 4vw, 40px); line-height: 1.16; letter-spacing: -.022em;
  margin: 12px 0 10px; color: var(--navy-900); font-weight: 750; }
h2 { font-size: clamp(21px, 2.6vw, 26px); line-height: 1.28; letter-spacing: -.016em;
  margin: 40px 0 12px; color: var(--navy-900); font-weight: 700; }
h3 { font-size: 18.5px; line-height: 1.35; margin: 26px 0 8px; color: var(--navy-900); font-weight: 660; }
h4 { font-size: 16.5px; margin: 20px 0 6px; font-weight: 650; color: var(--navy-800); }
p { margin: 0 0 15px; }
.lede { font-size: 18.5px; line-height: 1.62; color: var(--ink-2); margin-bottom: 20px; }
.updated { font-size: 13px; color: var(--ink-3); margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.updated b { font-weight: 600; color: var(--ink-2); }

/* ---------- layout ---------- */
main { padding-bottom: 60px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; gap: 28px; } }
.sidebar { position: sticky; top: 82px; font-size: 14.6px; }
.sidebar h4 { margin-top: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.sidebar ul { list-style: none; margin: 0 0 24px; padding: 0; }
.sidebar li { margin-bottom: 2px; }
.sidebar a { display: block; padding: 5px 9px; border-radius: 6px; text-decoration: none; color: var(--ink-2); }
.sidebar a:hover { background: var(--bg-2); color: var(--ink); }

/* ---------- calculator ---------- */
.calc-shell {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; margin: 8px 0 30px;
}
.calc-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
@media (max-width: 880px) { .calc-grid { grid-template-columns: 1fr; } }
.calc-inputs { padding: 22px 24px 26px; border-right: 1px solid var(--line); }
@media (max-width: 880px) { .calc-inputs { border-right: 0; border-bottom: 1px solid var(--line); } }
.calc-output { padding: 22px 24px 26px; background: var(--bg-2); }

.field { margin-bottom: 14px; }
.field label, .field-label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.field .hint { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; line-height: 1.45; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .row, .row-3 { grid-template-columns: 1fr; } }

input[type="text"], input[type="number"], select, textarea {
  width: 100%; font: inherit; font-size: 15.5px; padding: 9px 11px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select { appearance: none; background-image:
  linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.input-money { position: relative; }
.input-money input { padding-left: 26px; }
.input-money::before { content: "$"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--ink-3); font-size: 15px; pointer-events: none; }

.seg { display: inline-flex; background: var(--bg-3); border-radius: 9px; padding: 3px; gap: 2px; width: 100%; }
.seg button {
  flex: 1; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--ink-2); padding: 7px 10px; border-radius: 7px; cursor: pointer; white-space: nowrap;
}
.seg button[aria-pressed="true"] { background: var(--card); color: var(--navy-900); box-shadow: var(--shadow-sm); }

.check { display: flex; align-items: flex-start; gap: 9px; font-size: 14.2px; color: var(--ink-2); margin-bottom: 9px; }
.check input { width: 17px; height: 17px; margin: 3px 0 0; accent-color: var(--accent); flex: 0 0 17px; }

details.adv { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
details.adv > summary {
  cursor: pointer; font-size: 14px; font-weight: 640; color: var(--navy-600); list-style: none;
  display: flex; align-items: center; gap: 7px; padding: 4px 0;
}
details.adv > summary::-webkit-details-marker { display: none; }
details.adv > summary::before { content: "＋"; font-size: 13px; width: 15px; }
details.adv[open] > summary::before { content: "－"; }
details.adv .inner { padding-top: 12px; }

/* results */
.result-head { text-align: center; padding: 6px 0 16px; border-bottom: 1px dashed var(--line); margin-bottom: 16px; }
.result-label { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 650; }
.result-big { font-size: clamp(32px, 6vw, 44px); font-weight: 750; letter-spacing: -.03em;
  color: var(--accent-2); line-height: 1.1; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.result-sub { font-size: 14px; color: var(--ink-3); }

.bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--bg-3); margin: 4px 0 14px; }
.bar span { display: block; height: 100%; }
.bar .b-net { background: var(--accent); }
.bar .b-fed { background: var(--navy-700); }
.bar .b-fica { background: #7c93b0; }
.bar .b-state { background: #c98a3c; }
.bar .b-local { background: #9c6ab0; }
.bar .b-ded { background: #b9c4d2; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 15px; font-size: 12.6px; color: var(--ink-3); margin-bottom: 18px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 5px; }

table.breakdown { width: 100%; border-collapse: collapse; font-size: 14.6px; font-variant-numeric: tabular-nums; }
table.breakdown th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-3); font-weight: 650; padding: 0 0 7px; border-bottom: 1px solid var(--line); }
table.breakdown th.num, table.breakdown td.num { text-align: right; }
table.breakdown td { padding: 7px 0; border-bottom: 1px solid var(--line-2); }
table.breakdown tr.sub td { padding-left: 14px; color: var(--ink-2); font-size: 13.8px; }
table.breakdown tr.total td { font-weight: 700; border-top: 2px solid var(--line); border-bottom: 0;
  padding-top: 10px; color: var(--navy-900); }
table.breakdown tr.net td { font-weight: 750; color: var(--accent-2); font-size: 16px; }
table.breakdown td.pct { color: var(--ink-3); font-size: 13px; width: 62px; }

.calc-note { font-size:12.6px; color:var(--ink-3); margin:18px 0 0; line-height:1.5; }
.calc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.btn {
  font: inherit; font-size: 14.2px; font-weight: 620; padding: 9px 15px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 7px;
}
.btn:hover { border-color: var(--ink-3); color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.copied { color: var(--accent-2); font-size: 13px; align-self: center; }

/* ---------- content blocks ---------- */
.prose > ul, .prose > ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.callout {
  background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 14px 17px; margin: 20px 0; font-size: 15.4px;
}
.callout h4 { margin-top: 0; }
.callout.warn { border-left-color: var(--warn); background: var(--warn-soft); }
.callout p:last-child { margin-bottom: 0; }

table.data { width: 100%; border-collapse: collapse; font-size: 14.8px; margin: 16px 0 24px;
  font-variant-numeric: tabular-nums; }
table.data caption { caption-side: top; text-align: left; font-size: 13.4px; color: var(--ink-3); padding-bottom: 7px; }
table.data th { text-align: left; background: var(--bg-2); font-size: 13px; font-weight: 650; color: var(--ink-2);
  padding: 9px 11px; border-bottom: 1px solid var(--line); }
table.data td { padding: 8px 11px; border-bottom: 1px solid var(--line-2); }
table.data tr:hover td { background: var(--bg-2); }
table.data td.num, table.data th.num { text-align: right; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 16px 0 24px; }
.table-scroll table.data { margin: 0; min-width: 480px; }

.faq { margin: 8px 0 12px; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 9px; background: var(--card);
}
.faq summary {
  cursor: pointer; padding: 13px 16px; font-weight: 640; font-size: 16px; color: var(--navy-900);
  list-style: none; display: flex; justify-content: space-between; gap: 14px; align-items: flex-start;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-3); font-weight: 400; font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 16px 14px; color: var(--ink-2); font-size: 15.4px; }
.faq .answer p:last-child { margin-bottom: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; margin: 18px 0 26px; }
.card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 17px; background: var(--card);
  text-decoration: none; color: inherit; display: block; transition: border-color .12s, transform .12s;
}
.card:hover { border-color: var(--accent); transform: translateY(-1px); color: inherit; }
.card b { display: block; font-size: 15.6px; color: var(--navy-900); margin-bottom: 3px; font-weight: 650; }
.card span { font-size: 13.8px; color: var(--ink-3); line-height: 1.5; display: block; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 26px; }
.chips a {
  font-size: 14px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px;
  text-decoration: none; color: var(--ink-2); background: var(--card);
}
.chips a:hover { border-color: var(--accent); color: var(--accent-2); }

.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0 26px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 15px; background: var(--card); }
.stat .k { font-size: 12.4px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 640; }
.stat .v { font-size: 21px; font-weight: 720; color: var(--navy-900); letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; margin-top: 2px; }
.stat .n { font-size: 12.6px; color: var(--ink-3); margin-top: 2px; line-height: 1.4; }

.state-index { columns: 4 190px; column-gap: 26px; margin: 16px 0 28px; font-size: 15px; }
.state-index a { display: block; padding: 3px 0; text-decoration: none; color: var(--ink-2); break-inside: avoid; }
.state-index a:hover { color: var(--accent-2); }

.toc { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 15px 18px; margin: 20px 0 28px; font-size: 15px; }
.toc b { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 7px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 3px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); background: var(--bg-2); padding: 34px 0 40px; font-size: 14.4px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 26px; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-grid h5 { margin: 0 0 9px; font-size: 12.6px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 5px; }
.foot-grid a { color: var(--ink-2); text-decoration: none; }
.foot-grid a:hover { color: var(--accent-2); }
.foot-note { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-3); line-height: 1.6; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: var(--card); padding: 10px 14px; border-radius: 8px;
  z-index: 100; border: 1px solid var(--accent); }

@media print {
  .site-head, .site-foot, .calc-actions, .sidebar, .nav { display: none !important; }
  body { font-size: 12pt; } .calc-shell { box-shadow: none; }
}
