/* TakeHome Ledger — ledger paper, bank-statement green, brass accents. */
:root {
  --ink: #15221C; --ink-2: #3D4B44; --ink-3: #66736B;
  --paper: #F4F0E5; --paper-2: #EDE7D7; --card: #FFFDF7;
  --line: #DED6C2; --line-2: #ECE5D4;
  --green: #0E3B2C; --green-2: #17694A; --green-3: #2E8A63; --green-soft: #E2EEE5;
  --brass: #C9A227; --brass-soft: #F6ECCB;
  --c-net: #1F7A54; --c-fed: #A9472F; --c-fica: #CB8B2C; --c-state: #4C6A8C; --c-pre: #8C9187;
  --radius: 14px; --radius-s: 9px;
  --shadow: 0 1px 0 rgba(21, 34, 28, .04), 0 8px 28px -14px rgba(21, 34, 28, .28);
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Public Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16.5px/1.6 var(--sans);
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
a { color: var(--green-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green); }
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); letter-spacing: -.01em; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem); margin: .2em 0 .35em; }
h2 { font-size: clamp(1.45rem, 1.15rem + 1vw, 1.95rem); margin: 2.2em 0 .6em; }
h3 { font-size: 1.22rem; margin: 1.6em 0 .5em; }
p { margin: 0 0 1em; text-wrap: pretty; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--card); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

/* header */
.top { background: var(--green); color: #EFE9D8; position: sticky; top: 0; z-index: 30;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.top__in { display: flex; align-items: center; gap: 24px; min-height: 62px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none;
  font: 600 1.28rem/1 var(--serif); letter-spacing: -.01em; }
.logo svg { width: 32px; height: 32px; flex: none; }
.logo em { font-style: italic; font-weight: 500; color: var(--brass); margin-left: 1px; }
.logo:hover { color: #fff; }
.top__nav { display: flex; gap: 4px; margin-left: auto; }
.top__nav a { color: #E4DDC9; text-decoration: none; font-weight: 500; font-size: .95rem; padding: 8px 12px; border-radius: 8px; }
.top__nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.top__menu { display: none; margin-left: auto; background: none; border: 0; width: 42px; height: 42px; cursor: pointer; position: relative; }
.top__menu span, .top__menu span::before, .top__menu span::after { position: absolute; left: 11px; width: 20px; height: 2px; background: #EFE9D8; content: ""; transition: transform .2s; }
.top__menu span { top: 20px; } .top__menu span::before { top: -6px; left: 0; } .top__menu span::after { top: 6px; left: 0; }
@media (max-width: 860px) {
  .top__menu { display: block; }
  .top__nav { display: none; position: absolute; left: 0; right: 0; top: 62px; background: var(--green); flex-direction: column;
    padding: 8px 20px 16px; box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .4); }
  .top__nav.is-open { display: flex; }
  .top__nav a { padding: 12px 8px; font-size: 1.05rem; border-bottom: 1px solid rgba(255, 255, 255, .08); border-radius: 0; }
}

/* hero */
.hero { padding: 34px 0 10px; }
.eyebrow { font: 600 .78rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--green-2); }
.lede { font-size: 1.12rem; color: var(--ink-2); max-width: 68ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; padding: 0; list-style: none; }
.chips li { font-size: .84rem; color: var(--ink-2); background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 4px 11px; }
.chips li b { color: var(--green); font-weight: 600; }
.crumbs { font-size: .86rem; color: var(--ink-3); padding-top: 18px; }
.crumbs a { color: var(--ink-3); text-decoration: none; } .crumbs a:hover { color: var(--green-2); text-decoration: underline; }
.crumbs i { font-style: normal; margin: 0 4px; color: var(--line); }

/* calculator */
.calc { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 0; margin: 20px 0 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.calc__form { padding: 26px 26px 22px; border-right: 1px solid var(--line-2); }
.calc__out { padding: 26px 28px; background:
  repeating-linear-gradient(to bottom, transparent 0 31px, rgba(14, 59, 44, .045) 31px 32px), #FFFEF9; position: relative; }
.calc__out::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(var(--brass), var(--green-3)); }
.seg { display: inline-flex; background: var(--paper-2); border-radius: 10px; padding: 3px; margin-bottom: 18px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: 7px 16px; border-radius: 8px; font-weight: 600; font-size: .92rem; color: var(--ink-2); cursor: pointer; }
.seg input:checked + span { background: var(--card); color: var(--green); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.seg input:focus-visible + span { outline: 2px solid var(--brass); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label, .field .label { font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.field small { color: var(--ink-3); font-size: .78rem; line-height: 1.35; }
.input { position: relative; }
.input i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--ink-3); pointer-events: none; }
.input i.r { left: auto; right: 12px; }
input[type=text], input[type=number], input[type=search], select {
  width: 100%; font: 500 1rem/1.2 var(--sans); color: var(--ink); background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-s); padding: 11px 12px; min-height: 46px; appearance: none; -webkit-appearance: none;
  font-variant-numeric: tabular-nums; transition: border-color .15s, box-shadow .15s; }
.input input { padding-left: 26px; } .input--r input { padding-left: 12px; padding-right: 30px; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2366736B' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
input:focus, select:focus { outline: none; border-color: var(--green-3); box-shadow: 0 0 0 3px rgba(46, 138, 99, .16); }
input[type=number]::-webkit-inner-spin-button { opacity: .4; }
.calc .only-hourly { display: none; } .calc.is-hourly .only-hourly { display: flex; } .calc.is-hourly .only-salary { display: none; }
.more { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 6px; }
.more summary { cursor: pointer; font-weight: 600; color: var(--green-2); padding: 10px 0; list-style: none; display: flex; align-items: center; gap: 8px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "+"; width: 20px; height: 20px; border-radius: 50%; background: var(--green-soft); color: var(--green);
  display: inline-grid; place-items: center; font-weight: 700; line-height: 1; }
.more[open] summary::before { content: "–"; }
.more h4 { margin: 14px 0 8px; font: 600 .76rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green-2); }
.stub__head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 18px; }
.stub__eyebrow { font: 600 .76rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.stub__net { font: 600 clamp(2.4rem, 1.8rem + 2.2vw, 3.3rem)/1.05 var(--serif); color: var(--green); letter-spacing: -.02em; }
.stub__sub { color: var(--ink-3); font-size: .9rem; }
.views { display: inline-flex; gap: 2px; background: var(--paper-2); border-radius: 9px; padding: 3px; margin-bottom: 16px; }
.views button { border: 0; background: none; font: 600 .84rem/1 var(--sans); color: var(--ink-2); padding: 8px 13px; border-radius: 7px; cursor: pointer; }
.views button[aria-pressed=true] { background: var(--card); color: var(--green); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--paper-2); gap: 2px; }
.bar__seg { min-width: 3px; }
.bar__seg--net, .dot--net { background: var(--c-net); } .bar__seg--fed, .dot--fed { background: var(--c-fed); }
.bar__seg--fica, .dot--fica { background: var(--c-fica); } .bar__seg--state, .dot--state { background: var(--c-state); }
.bar__seg--pre, .dot--pre { background: var(--c-pre); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0; margin: 10px 0 18px; list-style: none; font-size: .84rem; color: var(--ink-2); }
.legend b { color: var(--ink); font-weight: 600; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }
.stub__lines { width: 100%; border-collapse: collapse; font-size: .96rem; }
.stub__lines th { text-align: left; font-weight: 500; color: var(--ink-2); padding: 7px 0; }
.stub__lines td { text-align: right; padding: 7px 0; font-weight: 500; white-space: nowrap; }
.stub__lines tr + tr { border-top: 1px dotted var(--line); }
.stub__lines .is-gross th, .stub__lines .is-gross td { font-weight: 700; color: var(--ink); }
.stub__lines .is-tax td { color: var(--c-fed); }
.stub__lines .is-pre td, .stub__lines .is-post td { color: var(--ink-3); }
.stub__lines .is-net { border-top: 2px solid var(--ink) !important; }
.stub__lines .is-net th, .stub__lines .is-net td { font-weight: 700; color: var(--green); font-size: 1.06rem; padding-top: 11px; }
.stub__rates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 0; }
.stub__rates div { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius-s); padding: 9px 11px; }
.stub__rates dt { font-size: .72rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.stub__rates dd { margin: 2px 0 0; font: 600 1.12rem/1.2 var(--sans); }
.calc__note { font-size: .8rem; color: var(--ink-3); margin: 14px 0 0; }
.sticky-net { display: none; }
@media (max-width: 900px) {
  .calc { grid-template-columns: 1fr; }
  .calc__form { border-right: 0; border-bottom: 1px solid var(--line-2); padding: 20px 18px; }
  .calc__out { padding: 22px 18px; }
  .sticky-net { display: flex; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 25;
    justify-content: space-between; align-items: center; gap: 12px; background: var(--green); color: #EFE9D8; border-radius: 12px;
    padding: 12px 16px; text-decoration: none; box-shadow: 0 10px 30px -8px rgba(14, 59, 44, .6); font-size: .9rem; }
  .sticky-net b { font: 600 1.25rem/1 var(--serif); color: #fff; }
  .sticky-net.is-hidden { display: none; }
  body.has-calc { padding-bottom: 76px; }
}
@media (max-width: 480px) {
  .fields { grid-template-columns: 1fr; }
  .fields .field--half-m { grid-column: auto; }
  .stub__rates { grid-template-columns: 1fr 1fr; }
  .stub__rates div:last-child { grid-column: 1 / -1; }
}

/* content */
.section { margin: 34px 0; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.card h3:first-child, .card h2:first-child { margin-top: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 18px 0; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.tile span { display: block; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; }
.tile b { display: block; font: 600 1.6rem/1.15 var(--serif); color: var(--ink); margin-top: 4px; }
.tile small { color: var(--ink-3); font-size: .82rem; }
.tile--key { background: var(--green); border-color: var(--green); }
.tile--key span, .tile--key small { color: #CFE2D6; } .tile--key b { color: #fff; }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr 1fr; gap: 10px; } .tile { padding: 12px 13px; } .tile b { font-size: 1.3rem; } .tile--key, .tile--wide { grid-column: 1 / -1; } }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table.data { width: 100%; border-collapse: collapse; font-size: .94rem; }
table.data th, table.data td { padding: 10px 14px; text-align: right; white-space: nowrap; }
table.data th:first-child, table.data td:first-child { text-align: left; white-space: normal; }
table.data thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 600;
  background: var(--paper-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; }
table.data tbody tr + tr td, table.data tbody tr + tr th { border-top: 1px solid var(--line-2); }
table.data tbody tr:hover { background: #FBF8EE; }
table.data .is-here { background: var(--brass-soft) !important; font-weight: 600; }
table.data td.pos { color: var(--green-2); } table.data td.neg { color: var(--c-fed); }
.meter { display: inline-block; vertical-align: middle; width: 80px; height: 6px; border-radius: 3px; background: var(--paper-2); margin-left: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--green-3); }
.range { position: relative; height: 54px; margin: 26px 6px 10px; }
.range__track { position: absolute; left: 0; right: 0; top: 20px; height: 10px; border-radius: 5px; background: var(--paper-2); }
.range__iqr { position: absolute; top: 20px; height: 10px; background: var(--green-3); border-radius: 5px; opacity: .85; }
.range__mid { position: absolute; top: 12px; width: 3px; height: 26px; background: var(--green); border-radius: 2px; }
.range__lab { position: absolute; top: 38px; transform: translateX(-50%); font-size: .78rem; color: var(--ink-3); white-space: nowrap; }
.range__lab b { color: var(--ink); font-weight: 600; }
.range__lab--top { top: -6px; }
.links { columns: 3 220px; column-gap: 28px; padding: 0; list-style: none; margin: 0; }
.links li { break-inside: avoid; padding: 5px 0; border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; gap: 10px; }
.links li span { color: var(--ink-3); font-size: .9rem; white-space: nowrap; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 10px 0; list-style: none; }
.pills a { display: inline-block; padding: 6px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 99px;
  text-decoration: none; color: var(--ink-2); font-size: .9rem; font-weight: 500; }
.pills a:hover { border-color: var(--green-3); color: var(--green); }
.pills a.is-here { background: var(--green); border-color: var(--green); color: #fff; }
.note { background: var(--brass-soft); border: 1px solid #E8D79E; border-radius: var(--radius-s); padding: 12px 14px; font-size: .92rem; color: #5A4A14; }
.muted { color: var(--ink-3); }
.small { font-size: .88rem; }
.kicker { font-family: var(--serif); font-size: 1.25rem; color: var(--ink-2); }
.answer { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--green-3); border-radius: var(--radius-s);
  padding: 16px 18px; font-size: 1.08rem; margin: 8px 0 18px; }
.answer b { color: var(--green); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: start; }
.cols aside { position: sticky; top: 84px; }
@media (max-width: 960px) { .cols { grid-template-columns: 1fr; } .cols aside { position: static; } }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; font-size: .92rem; }
.toc h4 { margin: 0 0 8px; font: 600 .74rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.toc a { display: block; padding: 4px 0; text-decoration: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--green-2); color: #fff; border: 0;
  border-radius: 10px; padding: 11px 18px; font: 600 .95rem/1 var(--sans); text-decoration: none; cursor: pointer; min-height: 44px; }
.btn:hover { background: var(--green); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--line); }
.btn--ghost:hover { background: var(--paper-2); color: var(--ink); }
.linkbtn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
.faq details { border-top: 1px solid var(--line); padding: 2px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 14px 30px 14px 0; font-weight: 600; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.3rem; color: var(--green-2); }
.faq details[open] summary::after { content: "–"; }
.faq details div { padding: 0 0 14px; color: var(--ink-2); }
.ad { margin: 26px 0; text-align: center; min-height: 100px; }
.ad__label { display: block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.converter { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .converter { grid-template-columns: 1fr; } }
.big-out { font: 600 2rem/1.1 var(--serif); color: var(--green); }
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; padding: 0; margin: 14px 0; list-style: none; }
.state-grid a { display: flex; justify-content: space-between; align-items: center; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; text-decoration: none; color: var(--ink); font-weight: 500; }
.state-grid a:hover { border-color: var(--green-3); }
.state-grid a span { font-size: .8rem; color: var(--ink-3); }
.tag { display: inline-block; font-size: .72rem; font-weight: 600; border-radius: 5px; padding: 2px 7px; background: var(--green-soft); color: var(--green); letter-spacing: .02em; }
.tag--none { background: var(--brass-soft); color: #6E5A12; }

/* footer */
.foot { margin-top: 70px; background: var(--green); color: #CFDCD3; padding: 44px 0 26px; font-size: .92rem; }
.foot__in { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.foot h4 { color: #fff; font: 600 .78rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; margin: 6px 0 12px; }
.foot a { color: #CFDCD3; text-decoration: none; display: block; padding: 3px 0; }
.foot a:hover { color: #fff; }
.foot .logo { color: #EFE9D8; margin-bottom: 12px; display: inline-flex; }
.foot__legal { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 30px; padding-top: 18px; font-size: .8rem; color: #9FB4A7; }
@media (max-width: 760px) { .foot__in { grid-template-columns: 1fr 1fr; } .foot__brand { grid-column: 1 / -1; } }
.consent { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: 16px; width: min(640px, calc(100% - 24px));
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 48px -16px rgba(0, 0, 0, .35);
  padding: 16px 18px; display: flex; gap: 14px; align-items: center; font-size: .9rem; }
.consent[hidden] { display: none; }
.consent p { margin: 0; color: var(--ink-2); }
.consent div { display: flex; gap: 8px; flex: none; }
@media (max-width: 560px) { .consent { flex-direction: column; align-items: stretch; } .consent div > * { flex: 1; } }
@media print { .top, .foot, .consent, .sticky-net, .ad, .calc__form { display: none !important; } .calc { grid-template-columns: 1fr; } }
