/* wagestate 唯一样式源。令牌=doc/design/state-page-v1.html §3：系统栈/tabular-nums/信任绿/无阴影线框风 */
:root {
  --brand: #0f766e;
  --positive: #059669;
  --ink: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --calc-bg: #f0fdfa;
  --result-bg: #ecfdf5;
  --error: #dc2626;
  --radius-card: 12px;
  --radius-input: 8px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #2dd4bf;
    --positive: #34d399;
    --ink: #f9fafb;
    --muted: #9ca3af;
    --border: #374151;
    --calc-bg: #134e4a;
    --result-bg: #064e3b;
    --error: #f87171;
  }
}
* { box-sizing: border-box; }
html { color-scheme: light dark; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: Canvas;
  font-variant-numeric: tabular-nums;
}
main { max-width: 1120px; margin: 0 auto; padding: 24px 16px 48px; }
h1 { font-size: clamp(26px, 4vw, 32px); line-height: 1.25; margin: 0 0 12px; }
a { color: var(--brand); }

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1120px; margin: 0 auto; padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; font-size: 20px; text-decoration: none; color: var(--brand); letter-spacing: -0.02em; }

.bluf { font-size: 17.5px; max-width: 46em; margin: 0 0 24px; }

.calc-card {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px;
  background: var(--calc-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
}
.calc-result {
  background: var(--result-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
}
.field { margin-bottom: 16px; border: 0; padding: 0; min-inline-size: auto; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: 6px; padding: 0; }
.field input[type="text"], .field select {
  width: 100%; padding: 10px 12px; font-size: 16px;
  border: 1px solid var(--muted); border-radius: var(--radius-input);
  background: Canvas; color: var(--ink); font-variant-numeric: tabular-nums;
}
.field input[type="text"] { white-space: nowrap; }
.hint { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.field-error { display: block; color: var(--error); font-size: 13px; margin-top: 4px; min-height: 1.2em; }

.segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  border: 1px solid var(--muted); border-radius: 999px;
  padding: 6px 14px; font-size: 14px; background: Canvas; color: var(--ink);
  cursor: pointer; transition: transform 120ms var(--ease-out);
  display: inline-flex; align-items: center; gap: 6px;
}
.pill input { accent-color: var(--brand); margin: 0; }
.pill.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pill.active input { accent-color: #fff; }
.pill:active { transform: scale(0.98); }
.views { margin: 12px 0; }
.views .pill { background: transparent; }
.views .pill.active { background: var(--positive); border-color: var(--positive); color: #fff; }
button.pill { font: inherit; }

.breakdown-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 6px 0; font-size: 15px;
}
.breakdown-row + .breakdown-row { border-top: 1px solid var(--border); }
.breakdown-row .amount { white-space: nowrap; }
.net { font-size: 15px; color: var(--muted); margin: 8px 0 0; min-height: 48px; }
.net strong {
  display: inline-block; font-size: clamp(28px, 4vw, 40px); color: var(--positive);
  font-variant-numeric: tabular-nums; white-space: nowrap; margin-left: 8px;
  transition: opacity 140ms var(--ease-out), filter 140ms var(--ease-out);
}
.net strong.switching { opacity: 0.3; filter: blur(2px); }
.net-label { color: var(--muted); }

.noscript-note { margin-top: 16px; padding: 12px 16px; border: 1px dashed var(--muted); border-radius: var(--radius-input); color: var(--muted); font-size: 14px; }

.ad {
  margin: 24px auto; max-width: 728px; min-height: 90px;
  border: 1px dashed var(--border); border-radius: var(--radius-input);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
}

.site-footer {
  border-top: 1px solid var(--border); padding: 24px 16px; text-align: center;
  color: var(--muted); font-size: 14px;
}
.footer-links { margin-bottom: 8px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--brand); }

.content-placeholder { padding: 32px 0; color: var(--muted); }

#tax-table { margin: 32px 0; }
#tax-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
#tax-table th, #tax-table td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
#tax-table th { background: var(--calc-bg); }
#tax-table .amount { text-align: right; white-space: nowrap; }
#wage-examples, #neighbor-compare { margin: 32px 0; }
#wage-examples h2, #neighbor-compare h2 { font-size: 20px; }
#wage-examples table, #neighbor-compare table { width: 100%; border-collapse: collapse; font-size: 15px; }
#wage-examples th, #wage-examples td, #neighbor-compare th, #neighbor-compare td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
#wage-examples th, #neighbor-compare th { background: var(--calc-bg); }
#wage-examples .amount, #neighbor-compare .amount { text-align: right; white-space: nowrap; }
#neighbor-compare tr.home td { font-weight: 600; background: var(--result-bg); }
#state-directory { margin: 32px 0; }
#state-directory h2 { font-size: 20px; }
.state-list { columns: 3; padding-left: 18px; }
.state-list li { margin-bottom: 6px; break-inside: avoid; }
@media (max-width: 720px) {
  .state-list { columns: 1; }
}
.source-note { font-size: 13px; color: var(--muted); margin-top: 8px; }
.method-note { margin: 32px 0; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-card); }
.method-note h2 { font-size: 20px; margin-top: 0; }

#faq { margin: 32px 0; }
#faq h2 { font-size: 20px; }
#faq details { border: 1px solid var(--border); border-radius: var(--radius-input); margin-bottom: 10px; background: Canvas; }
#faq summary { cursor: pointer; font-weight: 600; padding: 12px 16px; list-style-position: inside; }
#faq summary:active { transform: scale(0.995); }
#faq details[open] summary { border-bottom: 1px solid var(--border); }
#faq details p { margin: 0; padding: 12px 16px; color: var(--ink); }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

@media (max-width: 720px) {
  .calc-card { grid-template-columns: 1fr; padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
