@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/outfit-latin.woff2") format("woff2");
  font-weight: 400 650;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #e7e1d4;
  --bg-2: #f6f2e9;
  --surface: #fbf8f2;
  --ink: #1b1914;
  --ink-soft: #4e493f;
  --line: #ddd4c4;
  --pine: #14382c;
  --pine-2: #1d6a48;
  --lime: #d7ee78;
  --focus: #1d6a48;
  --shadow: 0 1px 0 rgba(27, 25, 20, 0.04), 0 18px 50px rgba(27, 25, 20, 0.07);
  --radius: 22px;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --max: 1120px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #10120f;
  --bg-2: #171a15;
  --surface: #1c1f1a;
  --ink: #f4f0e6;
  --ink-soft: #c2baab;
  --line: #31362e;
  --pine: #d5efc8;
  --pine-2: #b7e3c4;
  --lime: #d7ee78;
  --focus: #d7ee78;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(1000px 480px at -10% -20%, rgba(215, 238, 120, 0.55), transparent 55%),
    radial-gradient(800px 420px at 110% -10%, rgba(20, 56, 44, 0.09), transparent 50%);
}
[data-theme="dark"] body {
  background-image:
    radial-gradient(900px 420px at -10% -20%, rgba(215, 238, 120, 0.09), transparent 55%),
    radial-gradient(700px 380px at 110% 0%, rgba(183, 227, 196, 0.06), transparent 46%);
}
img, svg { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--pine-2); text-underline-offset: 0.16em; }
a:hover { color: var(--ink); }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  background: var(--pine);
  color: #f6f3ea;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
}
[data-theme="dark"] .skip { color: #14241c; }
.skip:focus { top: 0.6rem; }

.wrap { width: min(var(--max), calc(100% - 2rem)); margin-inline: auto; }
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.85rem 0;
  background: var(--bg);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  margin-right: auto;
}
.brand:hover { color: inherit; }
.mark { width: 34px; height: 34px; flex: none; }
.brand-name {
  font-family: var(--serif);
  font-weight: 560;
  letter-spacing: -0.03em;
  font-size: 1.12rem;
  line-height: 1;
}
.brand-tag {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.nav { display: flex; align-items: center; gap: 0.15rem; flex-wrap: wrap; }
.nav a, .menu summary {
  color: var(--ink);
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.95rem;
}
.nav a:hover, .menu summary:hover, .nav a[aria-current="page"] { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu div {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 220px;
  padding: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: grid;
}
.menu a { border-radius: 12px; }
.theme-toggle {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.theme-toggle svg { width: 18px; height: 18px; }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

.hero { padding: 1.2rem 0 1rem; }
.eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
h1, h2, h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; line-height: 1.08; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); margin: 0 0 0.7rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); margin: 0 0 0.7rem; }
h3 { font-size: 1.25rem; margin: 0 0 0.4rem; }
.lede { max-width: 42rem; margin: 0; font-size: 1.15rem; color: var(--ink-soft); }
.page-head { padding: 0.4rem 0 1.2rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 0.8rem; font-size: 0.92rem; color: var(--ink-soft); }
.crumbs a { color: inherit; }

.workspace { display: grid; gap: 1rem; align-items: start; }
.panel, .sheet, .card, .note, .tool-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel { padding: 1.1rem 1.1rem 1.2rem; }
.panel-head, .form-actions, .sheet-sub, .stats, .dock, .brand, .top, .crumbs { }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.85rem; }
.panel-head h2 { font-size: 1.35rem; margin: 0; }
.text-btn, .btn {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}
.btn { background: var(--pine); color: #f6f3ea; border-color: transparent; }
[data-theme="dark"] .btn:not(.btn-ghost) { color: #14241c; }
[data-theme="dark"] .btn-ghost { color: var(--ink); background: transparent; border-color: var(--line); }
.btn-ghost { background: transparent; color: inherit; border-color: var(--line); }
.text-btn { background: transparent; color: var(--ink-soft); }
.btn:hover, .text-btn:hover { transform: translateY(-1px); }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }
.copy-status { min-height: 1.3rem; margin: 0.45rem 0 0; color: var(--pine-2); font-size: 0.92rem; }

.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0.15rem;
  padding: 0.25rem;
  background: var(--bg);
  border-radius: 999px;
  margin-bottom: 0.9rem;
}
.seg-item {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 0.35rem 0.4rem;
  border-radius: 999px;
  text-align: center;
  font-size: 0.92rem;
  cursor: pointer;
}
.seg-item input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.seg-item:has(input:checked) { background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.seg.freq { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
@media (min-width: 720px) {
  .seg.freq { grid-template-columns: repeat(4, 1fr); }
}
fieldset.plain { border: 0; margin: 0; padding: 0; }
legend { padding: 0; margin-bottom: 0.35rem; font-size: 0.82rem; letter-spacing: 0.04em; color: var(--ink-soft); }

.fields { display: grid; gap: 0.75rem; }
.field { display: grid; gap: 0.35rem; min-width: 0; }
.field > span, .check span { font-size: 0.92rem; }
.field small, .hint { color: var(--ink-soft); font-size: 0.8rem; line-height: 1.35; }
.field input, .field select, .inline-input input, .inline-input select {
  width: 100%;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--bg);
  padding: 0.65rem 0.8rem;
}
.field input:focus, .field select:focus, .inline-input input:focus { border-color: var(--pine-2); background: var(--surface); }
.affix { display: flex; align-items: center; gap: 0.35rem; background: var(--bg); border-radius: 14px; padding-left: 0.8rem; border: 1px solid transparent; }
.affix:focus-within { border-color: var(--pine-2); background: var(--surface); }
.affix input { background: transparent; border: 0; padding-left: 0; }
.affix span { color: var(--ink-soft); }
.check { display: flex; align-items: center; gap: 0.6rem; min-height: 44px; }
.check input { width: 1.15rem; height: 1.15rem; accent-color: var(--pine-2); }

.sheet {
  background: #14382c;
  color: #f6f3ea;
  border: 0;
  padding: 1.25rem 1.2rem 1.15rem;
  --c-takehome: #d7ee78;
  --c-federal: #9ec1ff;
  --c-state: #ffb4a2;
  --c-local: #ffd59a;
  --c-ss: #c4b5fd;
  --c-medicare: #f9a8d4;
  --c-addmed: #f0abfc;
  --c-k401: #fde68a;
  --c-hsa: #a7f3d0;
  --c-health: #99f6e4;
  --c-post: #d6d3d1;
}
[data-theme="dark"] .sheet {
  background: #f3efe4;
  color: #17241c;
  --c-takehome: #1f6b45;
  --c-federal: #1d4e89;
  --c-state: #9a3412;
  --c-local: #a16207;
  --c-ss: #5b21b6;
  --c-medicare: #9d174d;
  --c-addmed: #86198f;
  --c-k401: #854d0e;
  --c-hsa: #047857;
  --c-health: #0f766e;
  --c-post: #57534e;
}
.sheet-kicker, .stamp {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, currentColor 72%, transparent);
}
.sheet-top { display: flex; justify-content: space-between; gap: 1rem; }
.sheet-label { margin: 0.85rem 0 0; font-size: 0.95rem; }
.sheet-figure {
  margin: 0.1rem 0 0.2rem;
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(3rem, 7vw, 4.6rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}
.sheet-sub { margin: 0.35rem 0 0; color: color-mix(in srgb, currentColor 78%, transparent); }
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 1.1rem 0 0.85rem;
  padding-top: 0.9rem;
  border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}
.stats div { min-width: 0; }
.stats dt { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: color-mix(in srgb, currentColor 68%, transparent); }
.stats dd { margin: 0.15rem 0 0; font-family: var(--serif); font-size: 1.35rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.bracket { margin: 0 0 0.8rem; font-size: 0.92rem; color: color-mix(in srgb, currentColor 80%, transparent); }
.bar {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, currentColor 12%, transparent);
}
.bar i { display: block; height: 100%; }
.bar i.c-takehome, .donut .c-takehome { background: var(--c-takehome); stroke: var(--c-takehome); }
.bar i.c-federal, .donut .c-federal { background: var(--c-federal); stroke: var(--c-federal); }
.bar i.c-state, .donut .c-state { background: var(--c-state); stroke: var(--c-state); }
.bar i.c-local, .donut .c-local { background: var(--c-local); stroke: var(--c-local); }
.bar i.c-ss, .donut .c-ss { background: var(--c-ss); stroke: var(--c-ss); }
.bar i.c-medicare, .donut .c-medicare { background: var(--c-medicare); stroke: var(--c-medicare); }
.bar i.c-addmed, .donut .c-addmed { background: var(--c-addmed); stroke: var(--c-addmed); }
.bar i.c-k401, .donut .c-k401 { background: var(--c-k401); stroke: var(--c-k401); }
.bar i.c-hsa, .donut .c-hsa { background: var(--c-hsa); stroke: var(--c-hsa); }
.bar i.c-health, .donut .c-health { background: var(--c-health); stroke: var(--c-health); }
.bar i.c-post, .donut .c-post { background: var(--c-post); stroke: var(--c-post); }
.sheet-grid { display: grid; gap: 0.8rem; margin-top: 0.9rem; }
.donut { width: min(100%, 180px); margin-inline: auto; }
.donut svg { width: 100%; height: auto; }
.donut circle { fill: none; stroke-width: 14; transform: rotate(-90deg); transform-origin: 60px 60px; }
.break { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.92rem; }
.break th, .break td { text-align: left; padding: 0.38rem 0; border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
.break .num, .table .num { text-align: right; }
.break thead th { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: color-mix(in srgb, currentColor 65%, transparent); font-weight: 500; }
.warnings { margin: 0.8rem 0 0; padding-left: 1.1rem; font-size: 0.86rem; color: color-mix(in srgb, currentColor 82%, transparent); }
.warnings li + li { margin-top: 0.3rem; }

.compare { margin-top: 1rem; }
.compare-grid { display: grid; gap: 1rem; }
.delta {
  margin-top: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: color-mix(in srgb, var(--lime) 35%, var(--surface));
}
.delta strong { font-family: var(--serif); font-size: 1.4rem; letter-spacing: -0.03em; }

.section { margin: 2.6rem 0; }
.prose { max-width: 68ch; }
.prose p, .prose li { color: var(--ink); }
.prose h2 { margin-top: 1.8rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.95rem; }
.table th, .table td { padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--line); text-align: left; }
.table th { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); font-weight: 550; }
.table tr:last-child td { border-bottom: 0; }
.cards, .salary-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
#compare-out { margin-top: 1rem; }
.card, .tool-card {
  display: block;
  padding: 1rem 1.05rem 1.05rem;
  color: inherit;
  text-decoration: none;
  box-shadow: none;
}
.card:hover, .tool-card:hover { border-color: var(--pine-2); color: inherit; }
.card strong, .tool-card strong { display: block; font-family: var(--serif); font-weight: 560; font-size: 1.25rem; letter-spacing: -0.03em; }
.card span, .tool-card span { display: block; margin-top: 0.25rem; color: var(--ink-soft); font-size: 0.92rem; }
.search {
  width: min(100%, 420px);
  min-height: 48px;
  margin: 0 0 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0.65rem 0.85rem;
}
.faq { display: grid; gap: 1rem; }
.faq h3 { font-family: var(--sans); font-weight: 560; letter-spacing: 0; font-size: 1.05rem; }
.note {
  padding: 0.9rem 1rem;
  box-shadow: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.ad-slot {
  min-height: 120px;
  margin: 1.5rem 0;
  border: 1px dashed var(--line);
  border-radius: 16px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.2rem;
  text-align: center;
  padding: 1rem;
}
.ad-slot p { margin: 0; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.75rem; color: var(--ink-soft); }
.ad-slot .ad-slot-note { letter-spacing: 0; text-transform: none; font-size: 0.88rem; max-width: 36rem; }
.site-footer {
  margin-top: 2rem;
  padding: 2rem 0 5.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.foot-grid { display: grid; gap: 1.2rem; }
.site-footer a { color: inherit; }
.site-footer h2 { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.disclaimer { max-width: 70ch; }

.dock {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: #14382c;
  color: #f6f3ea;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.16);
}
.dock strong { font-family: var(--serif); font-size: 1.45rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.dock span { color: #d9d3c6; font-size: 0.85rem; }
[data-theme="dark"] .dock { background: #f3efe4; color: #17241c; }
[data-theme="dark"] .dock span { color: #4e493f; }

.tool-layout { display: grid; gap: 1rem; }
.tool-out { padding: 1.1rem 1.15rem; }
.tool-out .sheet-figure { color: var(--ink); font-size: clamp(2.4rem, 6vw, 3.6rem); }
.noscript {
  margin: 0 0 1rem;
  padding: 0.8rem 1rem;
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--line);
}

@media (min-width: 800px) {
  .fields { grid-template-columns: 1fr 1fr; align-items: start; }
  .span-2 { grid-column: 1 / -1; }
  .sheet-grid { grid-template-columns: 180px 1fr; align-items: center; }
  .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .compare-grid { grid-template-columns: 0.9fr 1.1fr; }
  .tool-layout { grid-template-columns: 0.9fr 1.1fr; align-items: start; }
}
@media (min-width: 980px) {
  .workspace { grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr); }
  .sheet { position: sticky; top: 5.4rem; }
}
@media (max-width: 799px) {
  .top { flex-wrap: wrap; align-items: center; }
  .brand { flex: 1 1 auto; min-width: 0; }
  .brand-name { white-space: nowrap; }
  .nav {
    order: 3;
    flex: 1 0 100%;
    width: 100%;
    justify-content: flex-start;
  }
  .nav > a, .menu summary {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .menu[open] { flex-basis: 100%; }
  .menu div {
    position: static;
    min-width: 0;
    width: 100%;
    box-shadow: none;
    border: 0;
    padding: 0.15rem 0 0;
    background: transparent;
  }
  .menu a { min-height: 44px; display: flex; align-items: center; }
  .dock { display: flex; }
  .stats { grid-template-columns: 1fr; }
  .stats div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
  .stats dd { margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
@media print {
  .top, .dock, .ad-slot, .form-actions, .theme-toggle, .nav { display: none !important; }
  body { background: white; color: black; }
  .sheet { background: white; color: black; box-shadow: none; }
  .workspace { display: block; }
}
