/* =============================================================================
   Site — the chrome around the calculators: header, footer, homepage, and the
   plain content pages (about, contact, privacy, terms, disclaimer, 404).

   Deliberately quiet. The calculator is the product; everything here is meant to
   get out of its way.
   ========================================================================== */

/* -----------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
}

/* No backdrop-filter, no transparency — otherwise the text sits on the page. */
@supports not (backdrop-filter: blur(4px)) {
  .site-header {
    background: var(--paper);
  }
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 60px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.site-nav__link {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--ink-soft);
  text-decoration: none;
}

.site-nav__link:hover {
  background: var(--surface-sunken);
  color: var(--ink);
}

.site-nav__link[aria-current='page'] {
  color: var(--brand-700);
  background: var(--brand-50);
}

/* -----------------------------------------------------------------------------
   Logo

   A wordmark, not an image: it is two DOM nodes, it inherits the type stack, and
   it is legible at any size without a single byte of network.
   -------------------------------------------------------------------------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.logo:hover {
  color: var(--ink);
}

.logo__mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--brand-600);
  color: var(--brand-contrast);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: 0;
}

.logo__word-accent {
  color: var(--brand-600);
}

/* -----------------------------------------------------------------------------
   Page scaffolding
   -------------------------------------------------------------------------- */
.page {
  padding-block: var(--space-7) var(--space-10);
}

@media (min-width: 48rem) {
  .page {
    padding-block: var(--space-9) var(--space-12);
  }
}

.page-title {
  font-size: clamp(1.75rem, 4.5vw, 2.25rem);
}

.page-lede {
  margin-top: var(--space-3);
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  color: var(--ink-soft);
}

.page-updated {
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

/* The trail at the top of a state page: Home › Paycheck Calculator › the page itself.
   The separator is decoration, so it is given empty alternative text where supported. */
.breadcrumbs {
  margin-bottom: var(--space-5);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs__item + .breadcrumbs__item::before {
  content: '›';
  content: '›' / '';
  margin-right: var(--space-2);
}

.breadcrumbs a {
  color: var(--ink-soft);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--brand-700);
  text-decoration: underline;
}

/* -----------------------------------------------------------------------------
   Contact

   One address, given the weight of the thing it is. There is no contact form,
   which is not a shortcut: a form needs somewhere to post to, and a site whose
   whole claim is that it has no server has nowhere to post it.
   -------------------------------------------------------------------------- */
.contact-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-6);
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

@media (min-width: 30rem) {
  .contact-card {
    padding: var(--space-6);
  }
}

.contact-card__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* `anywhere` rather than a fixed size: the address is the one string on the page
   that cannot be allowed to overflow a 320px screen. */
.contact-card__email {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: var(--space-3);
  min-height: 44px;
  font-size: clamp(1.125rem, 4.4vw, 1.375rem);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.contact-card__email:hover {
  text-decoration: underline;
}

.contact-card__icon {
  flex: none;
  color: var(--brand-600);
}

.contact-card__note {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--ink-muted);
}

/* -----------------------------------------------------------------------------
   Homepage

   Two calculators exist, so the homepage names them plainly. It is not a grid of
   cards for things that have not been built.
   -------------------------------------------------------------------------- */
.home-hero {
  padding-block: var(--space-9) var(--space-8);
  text-align: center;
}

@media (min-width: 48rem) {
  .home-hero {
    padding-block: var(--space-12) var(--space-10);
  }
}

.home-hero__title {
  max-width: 18ch;
  margin-inline: auto;
  margin-top: var(--space-5);
  font-size: clamp(2.25rem, 8vw, 3.5rem);
  letter-spacing: -0.035em;
}

.home-hero__tagline {
  color: var(--brand-600);
}

.home-hero__text {
  max-width: 46ch;
  margin-inline: auto;
  margin-top: var(--space-4);
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  color: var(--ink-soft);
}

.home-hero__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

@media (min-width: 30rem) {
  .home-hero__cta {
    flex-direction: row;
    justify-content: center;
  }
}

.home-hero__note {
  margin-top: var(--space-5);
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

.home-points {
  display: grid;
  gap: var(--space-4);
  padding-bottom: var(--space-10);
}

@media (min-width: 46rem) {
  .home-points {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-5);
  }
}

.home-point {
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.home-point__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--brand-50);
  color: var(--brand-600);
}

.home-point__title {
  font-size: var(--text-md);
}

.home-point__text {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--ink-muted);
}

/* -----------------------------------------------------------------------------
   Long-form content beneath the calculator (SEO section, FAQ)
   -------------------------------------------------------------------------- */
.content-section {
  padding-top: var(--space-9);
  border-top: 1px solid var(--line);
  margin-top: var(--space-9);
}

.content-section__title {
  font-size: var(--text-2xl);
  letter-spacing: -0.02em;
}

.content-section > .prose {
  margin-top: var(--space-4);
}

/* The calculator page's list of state pages: alphabetical, in columns where there is
   room. `role="list"` on the element keeps it a list for screen readers that drop the
   semantics once the bullets are gone. */
.prose .state-list {
  columns: 2;
  column-gap: var(--space-6);
  padding-left: 0;
  list-style: none;
}

@media (min-width: 40rem) {
  .prose .state-list {
    columns: 3;
  }
}

.prose .state-list li {
  margin-top: 0;
  padding-block: var(--space-1);
  break-inside: avoid;
}

/* A small table of worked figures, such as the salary-to-hourly examples. Three short
   columns fit a 320px screen without scrolling; the figures are right-aligned and
   tabular so the columns of dollars line up. */
.prose .pay-table {
  width: 100%;
  margin-top: var(--space-4);
  border-collapse: collapse;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.prose .pay-table caption {
  padding-bottom: var(--space-2);
  text-align: left;
  color: var(--ink-muted);
}

.prose .pay-table th,
.prose .pay-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--line);
  text-align: right;
}

.prose .pay-table th:first-child,
.prose .pay-table td:first-child {
  padding-left: 0;
  text-align: left;
}

.prose .pay-table th:last-child,
.prose .pay-table td:last-child {
  padding-right: 0;
}

.prose .pay-table thead th {
  font-weight: var(--weight-semibold);
  color: var(--ink);
  border-bottom-color: var(--line-strong);
}

.prose .pay-table + p {
  margin-top: var(--space-4);
}

/* The FAQ is authored as native <details> so it works before the module loads
   and stays open for printing. */
.faq {
  margin-top: var(--space-5);
  border-top: 1px solid var(--line);
}

/* Only the generated FAQ component carries a heading of its own; the authored one
   sits under a `.content-section__title`. */
.faq__title {
  padding-top: var(--space-5);
  font-size: var(--text-xl);
}

.faq__item {
  border-bottom: 1px solid var(--line);
}

.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__question::after {
  content: '';
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--ink-muted);
  border-bottom: 2px solid var(--ink-muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--duration) var(--ease);
}

.faq__item[open] > .faq__question::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.faq__answer {
  padding-bottom: var(--space-4);
  max-width: var(--prose-max);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--ink-soft);
}

.faq__answer p + p {
  margin-top: var(--space-3);
}

/* -----------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: auto;
  padding-block: var(--space-7);
  border-top: 1px solid var(--line);
  background: var(--surface-sunken);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

@media (min-width: 46rem) {
  .site-footer__inner {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.site-footer__tagline {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  padding: 0;
  margin: 0;
  list-style: none;
}

/* Three profiles, three inline glyphs, no icon font and no third-party script —
   an icon library would be a network request and a dependency for 2 KB of path
   data. The accessible name lives on the link, because the SVG is decoration:
   an icon-only link with nothing but a picture in it is a link with no name. */
.site-footer__social {
  display: flex;
  gap: var(--space-2);
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
}

.social-link {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--ink-muted);
  transition:
    color var(--duration) var(--ease),
    background-color var(--duration) var(--ease);
}

.social-link:hover {
  background: var(--surface);
  color: var(--brand-700);
}

.site-footer__links a {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--brand-700);
  text-decoration: underline;
}

.site-footer__legal {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
  color: var(--ink-muted);
}

/* -----------------------------------------------------------------------------
   Page shell — footer pinned to the bottom of short pages
   -------------------------------------------------------------------------- */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

.site-main {
  flex: 1 0 auto;
}

/* -----------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */
.error-page {
  padding-block: var(--space-12);
  text-align: center;
}

.error-page__code {
  font-family: var(--font-numeric);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--brand-600);
}

.error-page__actions {
  display: flex;
  justify-content: center;
  margin-top: var(--space-6);
}

/* =============================================================================
   2026.1.60 — site-wide navigation, the homepage tool grid, the state-page figures
   and the salary-after-tax pages. The header, footer and the generated sections are
   written by scripts/generate-pages.mjs.
   ========================================================================== */

/* Header: the most-used calculators one click away. On a phone only the first and last
   links fit beside the logo; "All tools" leads to the full list on the homepage. */
.site-nav {
  flex-wrap: nowrap;
}

.site-nav__link {
  white-space: nowrap;
}

.site-nav__link--wide {
  display: none;
}

/* Footer: three short columns of links instead of one row. The calculators and the
   states run in two columns of their own and take the full width on a phone. */
.site-footer__nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6) var(--space-7);
}

.site-footer__nav .site-footer__col:nth-child(-n + 2) {
  grid-column: 1 / -1;
}

.site-footer__heading {
  margin-bottom: var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.site-footer__nav .site-footer__links {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: var(--space-2);
}

.site-footer__nav .site-footer__col:nth-child(-n + 2) .site-footer__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2) var(--space-5);
}

@media (min-width: 46rem) {
  .site-nav__link--wide {
    display: inline-block;
  }

  .site-footer__nav {
    grid-template-columns: repeat(3, auto);
    gap: var(--space-7) var(--space-9);
  }

  .site-footer__nav .site-footer__col:nth-child(-n + 2) {
    grid-column: auto;
  }

  .site-footer__nav .site-footer__col:nth-child(-n + 2) .site-footer__links {
    grid-template-columns: repeat(2, auto);
  }
}

/* Homepage: the calculators as cards. */
.home-tools {
  padding-bottom: var(--space-10);
}

.home-tools__heading {
  font-size: var(--text-2xl);
  letter-spacing: -0.02em;
}

.home-tools__intro {
  margin-top: var(--space-2);
  max-width: var(--prose-max);
  color: var(--ink-muted);
}

.tool-grid {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding: 0;
  list-style: none;
}

@media (min-width: 40rem) {
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 62rem) {
  .tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-4);
  }
}

.tool-card {
  display: block;
  height: 100%;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition:
    border-color var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease);
}

.tool-card:hover {
  border-color: var(--brand-200);
  box-shadow: var(--shadow-md);
  color: var(--ink);
}

.tool-card__name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
}

.tool-card__name::after {
  content: '→';
  color: var(--brand-600);
}

.tool-card__text {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
  color: var(--ink-muted);
}

/* "Most used", "New": a short label under a home-page card's description. */
.tool-card__tag {
  display: inline-block;
  margin-top: var(--space-2);
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--brand-50);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--brand-700);
}

/* A row of short links: popular states, nearby states, other salaries. */
.link-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: 0;
  list-style: none;
}

.prose .link-chips {
  padding-left: 0;
}

.prose .link-chips li {
  margin-top: 0;
}

.link-chips a {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: var(--text-sm);
  color: var(--ink-soft);
  text-decoration: none;
}

.link-chips a:hover {
  border-color: var(--brand-200);
  color: var(--brand-700);
}

.link-chips a[aria-current='page'] {
  border-color: var(--brand-600);
  background: var(--brand-50);
  color: var(--brand-700);
}

/* Wide tables scroll sideways on a phone instead of squeezing the figures. The page
   itself never scrolls sideways; only the table inside its box does. */
.table-scroll {
  margin-top: var(--space-4);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-scroll > .pay-table {
  margin-top: 0;
  min-width: 34rem;
}

/* State pages' "at a glance" table: three short columns that fit a 320 px phone without
   scrolling, figures right-aligned under their headings like every other pay table. */
.table-scroll > .pay-table.glance-table {
  min-width: 0;
}

/* A figure keeps its minus sign on the same line; the row labels wrap instead. */
.prose .pay-table.glance-table td {
  white-space: nowrap;
}

.prose .pay-table.facts-table td {
  text-align: left;
}

.prose .pay-table.facts-table th[scope='row'] {
  width: 38%;
  font-weight: var(--weight-medium);
  color: var(--ink);
  text-align: left;
  vertical-align: top;
}

.prose .pay-table tbody th[scope='row'] {
  font-weight: var(--weight-medium);
  text-align: left;
}

.prose .pay-table .is-left {
  text-align: left;
}

.prose .pay-table tr.is-highlight td,
.prose .pay-table tr.is-highlight th {
  background: var(--brand-50);
}

.table-note {
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
  color: var(--ink-muted);
}

/* Salary-after-tax pages: the headline figures. */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding: 0;
  list-style: none;
}

@media (min-width: 46rem) {
  .stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.stat {
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.stat--primary {
  border-color: var(--brand-200);
  background: var(--brand-50);
}

.stat__label {
  display: block;
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

.stat__value {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.stat--primary .stat__value {
  color: var(--brand-700);
}

.page-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

/* -----------------------------------------------------------------------------
   Layout-shift guard for the calculators that build their form in JavaScript.

   Each of these pages serves only the calculator's heading; the form arrives when the
   module graph has loaded, which on a phone is after the first paint, and everything
   below it used to jump down by a screen or more. Until the calculator mounts — while
   the heading is the root's only child — the root reserves a little less than the
   height the mounted form takes, so the mount no longer moves the page copy below it.
   Once the form is in, `:only-child` stops matching and the reserve is gone. The work
   hours page serves a full shell instead and does not need this.
   -------------------------------------------------------------------------- */
main [id$='-calculator']:has(> .calculator-header:only-child) {
  min-height: var(--calc-reserve, 0);
}

#paycheck-calculator { --calc-reserve: 88rem; }
#hourly-paycheck-calculator { --calc-reserve: 97rem; }
#pay-stub-calculator { --calc-reserve: 110rem; }
#bonus-paycheck-calculator { --calc-reserve: 70rem; }
#raise-calculator { --calc-reserve: 180rem; }
#salary-to-hourly-calculator { --calc-reserve: 116rem; }
#overtime-pay-calculator { --calc-reserve: 155rem; }
#time-card-calculator { --calc-reserve: 215rem; }

@media (min-width: 30rem) {
  #paycheck-calculator { --calc-reserve: 84rem; }
  #hourly-paycheck-calculator { --calc-reserve: 88rem; }
  #pay-stub-calculator { --calc-reserve: 101rem; }
  #bonus-paycheck-calculator { --calc-reserve: 63rem; }
  #raise-calculator { --calc-reserve: 168rem; }
  #salary-to-hourly-calculator { --calc-reserve: 107rem; }
  #overtime-pay-calculator { --calc-reserve: 145rem; }
  #time-card-calculator { --calc-reserve: 188rem; }
}

@media (min-width: 48rem) {
  #paycheck-calculator { --calc-reserve: 79rem; }
  #hourly-paycheck-calculator { --calc-reserve: 77rem; }
  #pay-stub-calculator { --calc-reserve: 96rem; }
  #bonus-paycheck-calculator { --calc-reserve: 63rem; }
  #raise-calculator { --calc-reserve: 168rem; }
  #salary-to-hourly-calculator { --calc-reserve: 109rem; }
  #overtime-pay-calculator { --calc-reserve: 146rem; }
  #time-card-calculator { --calc-reserve: 187rem; }
}

@media (min-width: 62rem) {
  #paycheck-calculator { --calc-reserve: 72rem; }
  #hourly-paycheck-calculator { --calc-reserve: 74rem; }
  #pay-stub-calculator { --calc-reserve: 89rem; }
  #bonus-paycheck-calculator { --calc-reserve: 48rem; }
  #raise-calculator { --calc-reserve: 130rem; }
  #salary-to-hourly-calculator { --calc-reserve: 76rem; }
  #overtime-pay-calculator { --calc-reserve: 113rem; }
  #time-card-calculator { --calc-reserve: 175rem; }
}

@media print {
  main [id$='-calculator']:has(> .calculator-header:only-child) {
    min-height: 0;
  }
}
