.states-page {
    --map-cell: 42px;
}

.tax-note {
    font-family: 'Gill Sans', sans-serif;
    font-size: 0.72em;
    line-height: 1.45;
    color: #555;
    max-width: 760px;
}

.tax-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 1rem 2rem;
    margin: 1.5rem 0 2rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.tax-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-family: 'Gill Sans', sans-serif;
    font-size: 0.74em;
    line-height: 1.25;
}

.tax-form .inline-input,
.tax-form .inline-select {
    width: 100%;
    margin: 0;
    font-size: 1.25em;
}

.income-classification-section {
    margin-top: 2.5rem;
}

.table-breakout {
    overflow-x: auto;
    margin: 1rem 0 2rem;
}

.state-tax-table {
    min-width: 900px;
    font-size: 0.68em;
}

.state-tax-table th,
.state-tax-table td {
    vertical-align: top;
}

.state-tax-table th:nth-child(1),
.state-tax-table td:nth-child(1) {
    text-align: right;
    width: 3rem;
}

.state-tax-table th:nth-child(3),
.state-tax-table th:nth-child(4),
.state-tax-table th:nth-child(5),
.state-tax-table td:nth-child(3),
.state-tax-table td:nth-child(4),
.state-tax-table td:nth-child(5) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.state-tax-table th:nth-child(2),
.state-tax-table td:nth-child(2),
.state-tax-table th:nth-child(6),
.state-tax-table td:nth-child(6) {
    text-align: left;
}

.state-tax-table th:nth-child(2),
.state-tax-table td:nth-child(2) {
    width: 11rem;
    white-space: nowrap;
}

.state-select-row {
    cursor: pointer;
}

.state-select-row.is-selected td {
    background: rgba(240, 59, 32, 0.035);
    color: #f03b20;
}

.state-watch {
    display: inline-block;
    margin-left: 0.18rem;
    font-weight: bold;
    cursor: help;
    vertical-align: super;
    line-height: 1;
}

.state-watch:focus {
    outline: 1px solid #111;
    outline-offset: 2px;
}

.watchlist-note {
    margin-top: -1rem;
}

.best-row td {
    font-weight: bold;
}

.state-map {
    margin: 1.5rem 0 3rem;
    overflow-x: auto;
}

.state-map svg {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
}

.state-map svg [data-state-code] {
    cursor: pointer;
    outline: none !important;
}

.state-map svg [data-state-code]:focus,
.state-map svg [data-state-code]:focus-visible {
    outline: none !important;
}

.state-map svg .state path {
    fill: #111 !important;
    stroke: #111 !important;
    stroke-opacity: 1 !important;
    stroke-width: 0.45 !important;
    vector-effect: non-scaling-stroke;
}

.state-map svg .borders,
.state-map svg .borders path,
.state-map svg circle.borders {
    stroke: #111 !important;
    opacity: 1 !important;
    stroke-opacity: 1 !important;
    stroke-width: 0.45 !important;
    vector-effect: non-scaling-stroke;
}

.state-map svg .separator1 {
    stroke: #111 !important;
    stroke-opacity: 1 !important;
    stroke-width: 0.45 !important;
    vector-effect: non-scaling-stroke;
}

.state-map svg .state path.is-selected,
.state-map svg circle.state.is-selected {
    stroke: #f03b20 !important;
    stroke-width: 2.2 !important;
}

.federal-section {
    margin-top: 2.5rem;
}

.federal-table-wrap {
    margin: 0;
    overflow-x: auto;
}

.federal-tax-table {
    width: auto;
    min-width: 0;
    max-width: 720px;
    margin: 0 0 1rem;
    font-size: 0.68em;
}

.federal-tax-table th:nth-child(1),
.federal-tax-table td:nth-child(1) {
    text-align: left;
}

.federal-tax-table th:nth-child(2),
.federal-tax-table td:nth-child(2) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

@media (min-width: 1180px) {
    .state-map,
    .table-breakout {
        width: calc(100% + 200px);
        margin-left: -100px;
        margin-right: -100px;
    }

    .state-map {
        overflow: visible;
    }
}

.source-section {
    margin-top: 6rem;
}

@media (max-width: 720px) {
    .tax-form {
        grid-template-columns: 1fr;
    }

    .state-tax-table {
        font-size: 0.62em;
    }

    .state-map {
        overflow-x: hidden;
    }
}
