/* Paycheck Calculator — design system. One shared stylesheet for all pages. */
:root {
  --primary: #1b4965;
  --primary-dark: #12324a;
  --accent: #2a7f62;
  --accent-light: #e6f4ee;
  --bg: #ffffff;
  --bg-muted: #f4f7f9;
  --surface: #ffffff;
  --text: #1a2b3c;
  --muted: #5b6b7a;
  --border: #dbe3ea;
  --danger: #b3261e;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(16, 42, 67, .08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1020px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #7fb3d5;
    --primary-dark: #a8cbe4;
    --accent: #5cb98f;
    --accent-light: #16382c;
    --bg: #0f1c26;
    --bg-muted: #13222e;
    --surface: #16283a;
    --text: #e8eef2;
    --muted: #9fb0be;
    --border: #2b4256;
    --shadow: 0 2px 10px rgba(0, 0, 0, .35);
  }
}
* { box-sizing: border-box; }
html { font-size: 18px; }
body { margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.6; color: var(--text); background: var(--bg); }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
h1, h2, h3 { line-height: 1.25; margin: 1.4em 0 .5em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.45rem; border-bottom: 1px solid var(--border); padding-bottom: .3em; }
h3 { font-size: 1.15rem; }
p { margin: .7em 0; }
img { max-width: 100%; height: auto; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }
/* Header */
.site-header { background: var(--primary); color: #fff; }
.site-header .container { display: flex; align-items: center; gap: 1rem; padding-top: .7rem; padding-bottom: .7rem; flex-wrap: wrap; }
.site-logo { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.25rem; display: flex; align-items: center; gap: .5rem; }
.site-logo svg { flex: none; }
.site-nav { margin-left: auto; display: flex; gap: 1rem; flex-wrap: wrap; }
.site-nav a { color: #dce8f2; text-decoration: none; font-size: .95rem; }
.site-nav a:hover { color: #fff; text-decoration: underline; }
/* Breadcrumbs */
.breadcrumbs { font-size: .85rem; color: var(--muted); margin: 1rem 0 0; }
.breadcrumbs a { color: var(--muted); }
/* Tool card */
.tool-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; margin: 1rem 0 1.5rem; }
.tool-card h2 { border: 0; margin-top: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1.2rem; }
.form-field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .25rem; }
.form-field input, .form-field select { width: 100%; padding: .55rem .7rem; font-size: 1rem; font-family: var(--font); color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 6px; }
.form-field input:focus, .form-field select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.radio-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.radio-row label { font-weight: 400; }
.field-error { color: var(--danger); font-size: .85rem; margin-top: .2rem; display: none; }
.tool-actions { display: flex; gap: .7rem; margin-top: 1.1rem; flex-wrap: wrap; }
.btn { display: inline-block; padding: .6rem 1.2rem; font-size: 1rem; font-family: var(--font); border-radius: 6px; border: 1px solid var(--primary); background: var(--primary); color: #fff; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--primary-dark); }
.btn-secondary { background: transparent; color: var(--primary); }
.btn-secondary:hover { background: var(--bg-muted); }
/* Results */
.results { margin-top: 1.2rem; border-top: 2px solid var(--accent); padding-top: .8rem; }
.results .net-pay { font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.results .net-pay small { font-size: 1rem; font-weight: 400; color: var(--muted); }
table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--border); }
th { background: var(--bg-muted); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.total td { font-weight: 700; border-top: 2px solid var(--border); }
/* State grid (hub) */
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .6rem; list-style: none; padding: 0; }
.state-grid a { display: block; padding: .6rem .8rem; border: 1px solid var(--border); border-radius: 6px; text-decoration: none; color: var(--text); background: var(--surface); }
.state-grid a:hover { border-color: var(--primary); color: var(--primary); }
/* FAQ accordion */
details.faq { border: 1px solid var(--border); border-radius: 6px; margin: .6rem 0; padding: .6rem .9rem; background: var(--surface); }
details.faq summary { font-weight: 600; cursor: pointer; }
details.faq p { margin: .5em 0 0; }
/* Callouts */
.note { background: var(--bg-muted); border-left: 4px solid var(--primary); padding: .7rem 1rem; margin: 1rem 0; border-radius: 0 6px 6px 0; }
.warning { background: #fdf3e7; border-left: 4px solid #b7791f; padding: .7rem 1rem; margin: 1rem 0; border-radius: 0 6px 6px 0; }
@media (prefers-color-scheme: dark) { .warning { background: #3a2f16; } }
.author-box { display: flex; gap: .9rem; align-items: flex-start; background: var(--bg-muted); border-radius: var(--radius); padding: 1rem; margin: 1.2rem 0; }
.author-box img { width: 64px; height: 64px; border-radius: 50%; flex: none; }
.related { margin: 1.5rem 0; }
.related ul { columns: 2; }
.toc { background: var(--bg-muted); border-radius: var(--radius); padding: .8rem 1.2rem; margin: 1rem 0; }
.toc ul { margin: .3em 0; }
/* Footer */
.site-footer { background: var(--bg-muted); border-top: 1px solid var(--border); margin-top: 2.5rem; padding: 1.5rem 0 2rem; font-size: .9rem; color: var(--muted); }
.site-footer a { color: var(--muted); }
.footer-links { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-bottom: .8rem; }
/* Extension promo banner (homepage) */
.ext-banner { background: #12324a; color: #fff; }
.ext-banner .container { display: flex; align-items: center; gap: .8rem 1rem; padding-top: .55rem; padding-bottom: .55rem; flex-wrap: wrap; }
.ext-banner-icon { flex: none; display: flex; align-items: center; }
.ext-banner-icon svg { display: block; }
.ext-banner p { margin: 0; flex: 1 1 320px; font-size: .95rem; }
.ext-banner .btn { border-color: #2a7f62; background: #2a7f62; color: #fff; white-space: nowrap; }
.ext-banner .btn:hover { background: #227350; border-color: #227350; }
.ext-banner-close { background: transparent; border: 0; color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; padding: .2rem .5rem; flex: none; }
@media (max-width: 640px) {
  .ext-banner .container { gap: .5rem; }
}
/* Cookie banner */
.cookie-banner { position: fixed; left: 1rem; bottom: 1rem; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; z-index: 100; display: none; }
.cookie-banner.show { display: block; }
.cookie-banner .cookie-actions { display: flex; gap: .5rem; margin-top: .7rem; flex-wrap: wrap; }
.cookie-revisit { position: fixed; right: 1rem; bottom: 1rem; z-index: 99; background: var(--surface); border: 1px solid var(--border); border-radius: 50%; width: 44px; height: 44px; cursor: pointer; font-size: 1.2rem; display: none; }
.cookie-revisit.show { display: block; }
@media (max-width: 640px) {
  html { font-size: 17px; }
  .form-grid { grid-template-columns: 1fr; }
  .related ul { columns: 1; }
  .site-nav { margin-left: 0; }
  .cookie-banner { left: 0; right: 0; bottom: 0; max-width: none; border-radius: 12px 12px 0 0; }
  table { display: block; overflow-x: auto; }
}
