.tax-page{padding-block:1.6rem 3.4rem}
.tax-intro{max-width:49rem;margin-block:1.25rem 1.6rem}
.tax-intro h1{font-size:clamp(2rem,5vw,3.4rem);line-height:1.09;letter-spacing:-.035em}
.tax-grid,.tax-guides{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;align-items:start}
.tax-card,.tax-guide{border:1px solid #cfded3;background:#fdfefa;border-radius:14px;min-width:0}
.tax-card{padding:clamp(1rem,3vw,1.65rem)}
.tax-card h2,.tax-resource h2{margin:0 0 .6rem;color:#1a4637;line-height:1.17}
.tax-card p,.tax-resource p{line-height:1.5}
.tax-field{display:grid;gap:.3rem;margin-top:.85rem;font-weight:620}
.tax-field input,.tax-field select{min-height:46px;width:100%;min-width:0;font:inherit;font-weight:500;padding:.55rem .7rem;border:1px solid #879c90;border-radius:8px;background:white;color:#173a2e}
.tax-field [aria-invalid=true]{border-color:#963620}
.tax-note{font-size:.91rem;color:#485e53;margin:.8rem 0}
.tax-actions{display:flex;gap:.45rem .7rem;align-items:center;flex-wrap:wrap;margin-block:1rem}
.tax-actions button{min-height:44px}
.tax-actions .quiet{padding-inline:.2rem;color:#1a533e;text-decoration:underline;text-underline-offset:3px}
.tax-result{margin:1rem 0;padding:.35rem .85rem;background:#e5f0e7;border-radius:10px;color:#173a2d}
.tax-result div{display:flex;align-items:baseline;justify-content:space-between;gap:.65rem;padding:.49rem 0;border-bottom:1px solid #c8dace}
.tax-result dd{margin:0;text-align:end;flex-shrink:0;font-variant-numeric:tabular-nums}
.tax-result div:last-child{border:0;font-weight:750}
.tax-error{color:#963620;font-weight:600}
.tax-links{display:grid;gap:.3rem;margin-top:.85rem}
.tax-links a,.tax-guide a{color:#1f573f;text-decoration:underline;text-underline-offset:.19em}
.tax-resource{margin-top:2rem}
.tax-guides{grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}
.tax-guide{padding:1rem}
.tax-guide h3{font-size:1.1rem;line-height:1.28;margin:0 0 .45rem;color:#1a4637}
@media(max-width:730px){.tax-grid,.tax-guides{grid-template-columns:1fr}}
@media(max-width:400px){.tax-result div{flex-wrap:wrap}.tax-result dd{margin-inline-start:auto}}

.payroll-card{margin-bottom:1rem}.payroll-card>p:not(.tax-note),.payroll-card form>.tax-note{max-width:76ch}
.payroll-fields,.payroll-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.payroll-results[hidden]{display:none}.payroll-results h3{font-size:1.12rem;margin:.15rem 0}.payroll-results .tax-result{margin:.4rem 0}
.payroll-results dd{max-width:52%}.payroll-card details:not([hidden]){border-top:1px solid #cfded3;padding-top:.55rem}.payroll-card summary{cursor:pointer;color:#1a533e;font-weight:600;padding:.35rem 0}
.payroll-links{display:flex;column-gap:1rem;flex-wrap:wrap}.payroll-links a{max-width:100%}
@media(max-width:730px){.payroll-fields,.payroll-results{grid-template-columns:1fr;gap:0}.payroll-results>div+div{margin-top:1rem}}

.payroll-card [hidden] { display: none; }
.payroll-card .tax-field { min-width: 0; align-content: start; }
.payroll-card .tax-field select {
  appearance: none;
  padding-inline-end: 2.5rem;
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23365448' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right .85rem center / .8rem .55rem;
}
.payroll-schedule { grid-template-columns: repeat(auto-fit,minmax(min(100%,12rem),1fr)); }
.payroll-results { margin-top: 1.3rem; }
.payroll-results > * { min-width: 0; }
.payroll-period-scroll { max-width: 100%; overflow-x: auto; }
.payroll-period-table {
  border-collapse: collapse;
  width: 100%;
  margin-block: .6rem .9rem;
  font-size: .975rem;
  line-height: 1.45;
  color: #173a2d;
}
.payroll-period-table th, .payroll-period-table td {
  border-bottom: 1px solid #d4e1d8;
  text-align: end;
  vertical-align: top;
  padding: .65rem .55rem;
}
.payroll-period-table thead th {
  background: #e5f0e7;
  font-size: .9rem;
  font-weight: 650;
}
.payroll-period-table th:first-child { text-align: start; }
.payroll-period-table tbody th { font-weight: 520; }
.payroll-period-table td { font-variant-numeric: tabular-nums; }
@media (max-width: 980px) {
  .payroll-results { grid-template-columns: minmax(0,1fr); gap: 1rem; }
}
@media (max-width: 540px) {
  .payroll-period-table th,.payroll-period-table td { padding: .55rem .35rem; }
}
