/* HourlyTakeHome — 2026 stylesheet
   Mobile-first, no external fonts, no layout shift, high contrast. */

:root {
  --ink: #0b1f33;
  --ink-2: #3d5670;
  --ink-3: #6b839c;
  --line: #dfe7f0;
  --line-strong: #c6d3e2;
  --bg: #f6f8fb;
  --card: #ffffff;
  --brand: #0f4c81;
  --brand-dark: #0a3a63;
  --brand-soft: #e8f0f9;
  --money: #0b7a5b;
  --money-soft: #e6f4ef;
  --warn: #a15c00;
  --danger: #b42318;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(11, 31, 51, .06), 0 8px 24px -12px rgba(11, 31, 51, .18);
  --shadow-sm: 0 1px 2px rgba(11, 31, 51, .07);
  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }

/* Author styles beat the user-agent sheet, so the hidden attribute needs a rule. */
[hidden] { display: none !important; }

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

h1, h2, h3, h4 { line-height: 1.22; margin: 0 0 .5em; letter-spacing: -0.015em; color: var(--ink); }
h1 { font-size: 1.85rem; font-weight: 750; }
h2 { font-size: 1.4rem; font-weight: 700; margin-top: 1.6em; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
ul, ol { padding-left: 1.25em; }
li { margin: .35em 0; }
strong { font-weight: 650; }
small { font-size: .85rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
a.sr-only:focus {
  position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto;
  margin: 0; padding: 10px 14px; background: #fff; color: var(--brand);
  border-radius: 8px; box-shadow: var(--shadow); z-index: 40; font-weight: 650;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 18px; }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 750;
  font-size: 1.06rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--brand) 0%, #14679f 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: .95rem;
  font-weight: 800;
  flex: none;
}
.brand small { display: block; font-size: .62rem; font-weight: 600; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 550;
  padding: 7px 10px;
  border-radius: 8px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-dark); }
@media (max-width: 720px) {
  .site-header .wrap { flex-wrap: wrap; min-height: 56px; padding-bottom: 8px; }
  .site-nav { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 2px; padding-bottom: 2px; }
  .site-nav a { font-size: .82rem; padding: 5px 8px; white-space: nowrap; }
}

/* ---------- Layout ---------- */
.page { padding: 22px 0 40px; }
.crumbs { font-size: .82rem; color: var(--ink-3); margin: 0 0 10px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { margin: 0 6px; color: var(--line-strong); }

.hero { padding: 8px 0 18px; }
.hero p.lede { font-size: 1.05rem; color: var(--ink-2); max-width: 66ch; margin-bottom: 14px; }
.eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 4px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; padding: 0; list-style: none; }
.chips li {
  font-size: .8rem;
  font-weight: 550;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
  margin: 0;
}

.layout { display: grid; gap: 22px; }
@media (min-width: 940px) {
  .layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; }
  .layout .sticky { position: sticky; top: 78px; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
}
.card-pad { padding: 18px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-title h2, .card-title h3 { margin: 0; font-size: 1.02rem; }
.card-title .tag { font-size: .72rem; color: var(--ink-3); font-weight: 600; }

/* ---------- Form ---------- */
.calc-form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > label, .field-label {
  font-size: .82rem;
  font-weight: 650;
  color: var(--ink-2);
  letter-spacing: .01em;
}
.field .hint { font-size: .75rem; color: var(--ink-3); font-weight: 400; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group .prefix, .input-group .suffix {
  position: absolute;
  color: var(--ink-3);
  font-size: .92rem;
  font-weight: 550;
  pointer-events: none;
}
.input-group .prefix { left: 12px; }
.input-group .suffix { right: 12px; }
input[type="number"], input[type="text"], select {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 550;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  min-height: 44px;
  appearance: none;
  -webkit-appearance: none;
}
.input-group.has-prefix input { padding-left: 26px; }
.input-group.has-suffix input { padding-right: 44px; }
select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%236b839c' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(15, 76, 129, .35);
  outline-offset: 1px;
}
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.grid-2 { display: grid; gap: 12px; }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* Segmented control */
.segmented {
  display: grid;
  grid-auto-flow: column;
  gap: 4px;
  background: #eef3f9;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
}
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; width: 100%; height: 100%; left: 0; top: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: block;
  text-align: center;
  font-size: .87rem;
  font-weight: 600;
  color: var(--ink-2);
  padding: 8px 6px;
  border-radius: 7px;
  cursor: pointer;
}
.segmented input:checked + span { background: #fff; color: var(--brand-dark); box-shadow: var(--shadow-sm); }
.segmented input:focus-visible + span { outline: 3px solid rgba(15, 76, 129, .35); }

/* Period switch */
.period-switch { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.period-switch button {
  font-family: inherit;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}
.period-switch button[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* ---------- Result panel ---------- */
.result-card { padding: 0; overflow: hidden; }
.result-head {
  background: linear-gradient(165deg, #0d3f6b 0%, #0f4c81 60%, #14618f 100%);
  color: #fff;
  padding: 18px 18px 16px;
}
.result-head .label { font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #b9d3ea; margin: 0 0 4px; }
.result-head .amount {
  font-size: 2.2rem;
  font-weight: 780;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin: 0;
}
.result-head .sub { font-size: .84rem; color: #cfe1f2; margin: 6px 0 0; }
.result-body { padding: 16px 18px 18px; min-height: 240px; }

.bar {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #eef3f9;
  margin: 2px 0 14px;
}
.bar > span { display: block; height: 100%; }
.bar .b-net { background: #0b7a5b; }
.bar .b-fed { background: #0f4c81; }
.bar .b-state { background: #6f8fb0; }
.bar .b-fica { background: #b7c8da; }
.bar .b-pretax { background: #e0b25b; }

.legend { display: flex; flex-wrap: wrap; gap: 10px 14px; margin: 0 0 16px; padding: 0; list-style: none; font-size: .78rem; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

.rows { margin: 0; border-top: 1px solid var(--line); }
.rows .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: .92rem;
}
.rows .row .k { color: var(--ink-2); }
.rows .row .k small { display: block; color: var(--ink-3); font-size: .74rem; font-weight: 400; }
.rows .row .v { font-weight: 620; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rows .row.total { border-bottom: 0; padding-top: 12px; }
.rows .row.total .k { color: var(--ink); font-weight: 650; }
.rows .row.total .v { color: var(--money); font-size: 1.06rem; font-weight: 750; }
.rows .row.neg .v { color: var(--ink-2); }

.kpi-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.kpi {
  background: #f7fafd;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
}
.kpi dt { font-size: .72rem; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 2px; }
.kpi dd { margin: 0; font-size: 1.02rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1em; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
thead th {
  text-align: left;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-3);
  font-weight: 700;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-strong);
  background: #fbfcfe;
  white-space: nowrap;
}
tbody td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: #fbfcfe; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.num strong { font-weight: 700; }
.table-note { font-size: .78rem; color: var(--ink-3); margin: -4px 0 1em; }

/* ---------- Links grid ---------- */
.link-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 0 0 1.2em; padding: 0; list-style: none; }
.link-grid li { margin: 0; }
.link-grid a {
  display: block;
  padding: 9px 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: .87rem;
  font-weight: 550;
  color: var(--ink);
  text-decoration: none;
}
.link-grid a:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }
.link-grid a small { display: block; font-size: .74rem; color: var(--ink-3); font-weight: 500; }

/* ---------- Prose / content ---------- */
.prose { max-width: 74ch; }
.prose h2 { padding-top: 6px; }
.prose h3 { margin-top: 1.4em; }
.prose ul { margin: 0 0 1em; }
.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 14px;
  margin-bottom: 8px;
}
.faq details[open] { border-color: var(--line-strong); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 12px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.2rem; color: var(--ink-3); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details > p { margin: 0 0 12px; color: var(--ink-2); font-size: .95rem; }

.callout {
  background: var(--brand-soft);
  border: 1px solid #cfe1f2;
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: .9rem;
  color: var(--ink-2);
  margin: 0 0 1.2em;
}
.callout strong { color: var(--ink); }
.callout.warn { background: #fff8ec; border-color: #f0d8ac; border-left-color: var(--warn); }

/* ---------- Ad slots (fixed height = no layout shift) ---------- */
.ad-slot {
  display: block;
  width: 100%;
  background: repeating-linear-gradient(135deg, #f2f5f9, #f2f5f9 8px, #eef2f7 8px, #eef2f7 16px);
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  margin: 22px 0;
  position: relative;
}
.ad-slot::before {
  content: "Advertisement";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #9db0c4;
  font-weight: 600;
}
.ad-slot[data-size="leaderboard"] { min-height: 100px; }
.ad-slot[data-size="rectangle"] { min-height: 260px; }
.ad-slot[data-size="sidebar"] { min-height: 600px; }
@media (min-width: 940px) {
  .ad-slot[data-size="leaderboard"] { min-height: 90px; }
}
@media (max-width: 939px) {
  .ad-slot[data-size="sidebar"] { min-height: 260px; }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 28px 0 34px;
  margin-top: 20px;
  font-size: .87rem;
  color: var(--ink-2);
}
.footer-grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin-bottom: 8px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 5px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--brand); text-decoration: underline; }
.disclaimer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: .78rem;
  color: var(--ink-3);
  max-width: 90ch;
}

/* ---------- Buttons / misc ---------- */
.btn {
  font-family: inherit;
  font-size: .9rem;
  font-weight: 650;
  color: #fff;
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 9px;
  padding: 10px 16px;
  cursor: pointer;
}
.btn:hover { background: var(--brand-dark); }
.btn.secondary { background: #fff; color: var(--ink-2); border-color: var(--line-strong); }
.btn.secondary:hover { background: #f4f7fb; color: var(--ink); }
.form-actions { display: flex; gap: 8px; align-items: center; margin-top: 4px; }

.diff-positive { color: var(--money); }
.diff-negative { color: var(--danger); }

.two-col { display: grid; gap: 16px; }
@media (min-width: 700px) { .two-col { grid-template-columns: 1fr 1fr; } }

.compare-head { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.compare-box { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.compare-box.win { border-color: #9fd3c0; background: var(--money-soft); }
.compare-box .who { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 700; }
.compare-box .amt { font-size: 1.35rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.compare-box .sub { font-size: .78rem; color: var(--ink-2); }

.print-only { display: none; }
@media print {
  .site-header, .site-footer, .ad-slot, .form-actions, .period-switch { display: none; }
  body { background: #fff; }
  .layout { grid-template-columns: 1fr; }
}
