* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Swiss-inspired professional palette */
    --swiss-red: #dc0018;
    --swiss-red-dark: #b80015;
    --dark-gray: #333333;
    --charcoal: #1a1a1a;
    --medium-gray: #666666;
    --light-gray: #f4f4f4;
    --border-gray: #d4d4d4;
    --white: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --accent-blue: #0066b3;
    --success-green: #2e7d32;
    --warning-amber: #b45309;
}

body {
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    background: var(--light-gray);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Top bar */
.top-bar {
    background: var(--charcoal);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
}

.top-bar a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.top-bar a:hover {
    color: white;
}

/* Header */
header {
    background: var(--white);
    border-bottom: 4px solid var(--swiss-red);
    padding: 1.25rem 2rem;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-link {
    text-decoration: none;
    color: inherit;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-mark {
    width: 44px;
    height: 44px;
    background: var(--swiss-red);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
}

.brand-text {
    border-left: 1px solid var(--border-gray);
    padding-left: 1rem;
}

.brand-text h1 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.brand-text span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.data-badge {
    background: var(--light-gray);
    border: 1px solid var(--border-gray);
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Navigation */
nav {
    background: var(--dark-gray);
}

nav ul {
    max-width: 1200px;
    margin: 0 auto;
    list-style: none;
    display: flex;
    padding: 0 2rem;
}

nav li a {
    display: block;
    padding: 0.9rem 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.15s ease;
}

nav li a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

nav li a.active {
    border-bottom-color: var(--swiss-red);
    color: white;
}

/* Main container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Disclaimer */
.disclaimer {
    background: #fef9e7;
    border: 1px solid #f0d78c;
    border-left: 4px solid #d4a600;
    padding: 0.9rem 1.25rem;
    margin-bottom: 1.75rem;
    font-size: 0.875rem;
    color: #6b5900;
}

.disclaimer strong {
    color: #5a4c00;
}

/* Content card */
.content-card {
    background: var(--white);
    border: 1px solid var(--border-gray);
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-gray);
}

.card-header h2 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.card-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.card-body {
    padding: 1.5rem;
}

/* Input section */
.controls-section {
    background: var(--light-gray);
    border: 1px solid var(--border-gray);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.controls-section h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.input-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
    min-width: 150px;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.input-group input,
.input-group select {
    background: var(--white);
    border: 1px solid var(--border-gray);
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    color: var(--text-primary);
    min-width: 0;
    width: 100%;
    transition: border-color 0.15s ease;
}

.input-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    cursor: pointer;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.input-group input::placeholder {
    color: #999;
}

/* Custom input with dropdown */
.input-with-dropdown {
    position: relative;
    display: flex;
}

.input-with-dropdown input {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.input-with-dropdown input:focus {
    border-color: var(--accent-blue);
}

.input-with-dropdown input:focus+.dropdown-toggle {
    border-color: var(--accent-blue);
}

.dropdown-toggle {
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-left: none;
    padding: 0.7rem 0.8rem;
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.dropdown-toggle:hover {
    background-color: var(--bg-light);
}

.preset-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--accent-blue);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
}

.preset-dropdown-menu.show {
    display: block;
}

.preset-option {
    padding: 0.7rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: background-color 0.1s ease, color 0.1s ease;
}

.preset-option:hover {
    background-color: var(--accent-blue);
    color: var(--white);
}



/* Map */
.map-container {
    position: relative;
}

#map {
    width: 100%;
    height: 550px;
    display: block;
    background: var(--light-gray);
    touch-action: none;
    /* Enable pinch-to-zoom via D3 */
}

.commune {
    stroke: #888888;
    stroke-width: 0.5px;
    cursor: pointer;
    transition: all 0.12s ease;
}

.commune:hover {
    stroke: var(--dark-gray);
    stroke-width: 1.5px;
    filter: brightness(1.06);
}

.commune.active {
    stroke: var(--dark-gray);
    stroke-width: 2px;
    filter: brightness(1.1);
}

.lake {
    fill: #6ba3d6;
    stroke: #5090c0;
    stroke-width: 0.5px;
    pointer-events: none;
}

/* Legend */
.legend {
    margin-top: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.legend h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
}

.legend-scale {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-bar {
    height: 10px;
    width: 200px;
    background: linear-gradient(90deg,
            #4caf50 0%,
            #8bc34a 25%,
            #ffc107 50%,
            #ff9800 75%,
            #f44336 100%);
}

.legend-labels {
    display: flex;
    font-size: 0.75rem;
    color: var(--text-secondary);
    gap: 0.25rem;
}

/* Tooltip */
.tooltip {
    position: fixed;
    pointer-events: none;
    background: var(--white);
    border: 1px solid var(--border-gray);
    min-width: 280px;
    display: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.12s ease, transform 0.12s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 1000;
}

.tooltip.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.tooltip-header {
    padding: 0.75rem 1rem;
    background: var(--dark-gray);
    border-bottom: 3px solid var(--swiss-red);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.commune-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white);
}

/* Close button - hidden by default on desktop */
.tooltip-close {
    display: none;
}

.tooltip-content {
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.tax-section h3 {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-gray);
    padding-bottom: 0.3rem;
}

.tax-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 0;
    font-size: 0.85rem;
    gap: 1rem;
}

.tax-row .label {
    color: var(--text-secondary);
}

.tax-row .value {
    font-weight: 600;
    color: var(--text-primary);
}

.tax-row.total {
    margin-top: 0.4rem;
    padding-top: 0.4rem;
    border-top: 1px solid var(--border-gray);
}

.tax-row.total .label,
.tax-row.total .value {
    color: var(--swiss-red);
    font-weight: 700;
}

.tax-row.effective-rate {
    margin-top: 0.4rem;
    padding-top: 0.4rem;
    border-top: 1px solid var(--border-gray);
}

.tax-row.effective-rate .label {
    color: var(--warning-amber);
    font-weight: 600;
}

.tax-row.effective-rate .value {
    color: var(--warning-amber);
    font-weight: 700;
}

.tax-row.chf-amount {
    margin-top: 0.4rem;
    padding-top: 0.4rem;
    border-top: 1px dashed var(--border-gray);
}

.tax-row .value.highlight {
    color: var(--success-green);
    font-size: 0.95rem;
    font-weight: 700;
}

/* Total Tax Section - Professional Subtle Highlight */
.total-tax-section {
    grid-column: 1 / -1;
    background: var(--light-gray);
    border-top: 2px solid var(--dark-gray);
    margin: 0.75rem -1rem -1rem -1rem;
    padding: 0.65rem 1rem !important;
}

.total-tax-section .tax-row {
    padding: 0;
    border: none;
    margin: 0;
}

.total-tax-section .tax-row .label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.total-tax-section .tax-row .value {
    color: var(--text-primary) !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
}

/* Footer */
footer {
    background: var(--charcoal);
    color: rgba(255, 255, 255, 0.7);
    padding: 2rem;
    margin-top: 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-section h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.75rem;
}

.footer-section p {
    font-size: 0.85rem;
    line-height: 1.6;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
    transition: color 0.15s ease;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-disclaimer {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--swiss-red);
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    max-width: 400px;
}

/* Map Path Highlight (from table row hover) */
path.commune.table-highlight {
    stroke: var(--dark-gray);
    stroke-width: 1.5px;
    filter: brightness(1.06);
}

/* Tax Rates Table */
.tax-table-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.tax-table-section h3 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.table-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.table-container {
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

#tax-rates-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.85rem;
}

#tax-rates-table thead {
    position: sticky;
    top: 0;
    z-index: 15;
}

#tax-rates-table th {
    position: sticky;
    top: 0;
    background-color: rgb(0, 82, 147);
    color: #ffffff;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
    z-index: 15;
}

#tax-rates-table th:hover {
    background-color: rgb(0, 60, 110);
}

#tax-rates-table th.sortable::after {
    content: '⇅';
    margin-left: 0.5rem;
    opacity: 0.5;
    font-size: 0.75rem;
}

#tax-rates-table th.sort-asc::after {
    content: '↑';
    opacity: 1;
}

#tax-rates-table th.sort-desc::after {
    content: '↓';
    opacity: 1;
}

#tax-rates-table td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

#tax-rates-table tbody tr:hover {
    background: rgba(0, 82, 147, 0.05);
}

#tax-rates-table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

#tax-rates-table tbody tr:nth-child(even):hover {
    background: rgba(0, 82, 147, 0.08);
}

#tax-rates-table .tax-value {
    text-align: right;
    font-family: 'Roboto Mono', monospace;
}

#tax-rates-table .canton-badge {
    display: inline-block;
    background: var(--light-gray);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

@media (max-width: 768px) {

    /* Container */
    .container {
        padding: 1rem;
    }

    /* Top bar - smaller on mobile */
    .top-bar {
        padding: 0.4rem 1rem;
        font-size: 0.75rem;
        gap: 1rem;
    }

    /* Header */
    header {
        padding: 1rem;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .brand-text h1 {
        font-size: 1rem;
    }

    .brand-text span {
        font-size: 0.7rem;
    }

    .data-badge {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }

    /* Navigation - scrollable on mobile */
    nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    nav ul {
        flex-wrap: nowrap;
        padding: 0 1rem;
        min-width: max-content;
    }

    nav li a {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    /* Disclaimer */
    .disclaimer {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }

    /* Card */
    .card-header {
        padding: 1rem;
    }

    .card-header h2 {
        font-size: 1.15rem;
    }

    .card-header p {
        font-size: 0.85rem;
    }

    .card-body {
        padding: 1rem;
    }

    /* Controls section */
    .controls-section {
        padding: 1rem;
        overflow: hidden;
    }

    .input-row {
        flex-direction: column;
        gap: 1rem;
    }

    .input-group {
        width: 100%;
        max-width: 100%;
    }

    .input-group input,
    .input-group select {
        min-width: 0;
        width: 100%;
        max-width: 100%;
        padding: 0.9rem 1rem;
        font-size: 16px;
        box-sizing: border-box;
        /* Prevents zoom on iOS */
    }

    .input-group select {
        padding-right: 2.5rem;
    }

    /* Custom dropdown mobile improvements */
    .input-with-dropdown {
        width: 100%;
    }

    .dropdown-toggle {
        padding: 0.9rem 1rem;
        min-width: 48px;
    }

    .preset-dropdown-menu {
        margin-top: 2px;
        width: 100%;
        left: 0;
        right: 0;
        box-sizing: border-box;
    }

    .preset-option {
        padding: 0.9rem 1rem;
    }

    /* Map - bigger on mobile */
    #map {
        height: 400px;
    }

    /* Legend - compact horizontal layout */
    .legend {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 0.75rem;
    }

    .legend h3 {
        width: 100%;
        margin-bottom: 0;
    }

    .legend-scale {
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }

    .legend-bar {
        flex: 1;
        height: 10px;
    }

    .legend-labels {
        display: flex;
        flex-direction: row;
        gap: 0;
        font-size: 0.75rem;
        font-weight: 500;
    }

    .legend-labels span {
        white-space: nowrap;
    }

    /* Tax Rates Table - Mobile */
    .tax-table-section {
        margin-top: 1.5rem;
        padding-top: 1rem;
    }

    .tax-table-section h3 {
        font-size: 0.95rem;
    }

    .table-description {
        font-size: 0.75rem;
    }

    .table-container {
        max-height: 350px;
    }

    #tax-rates-table {
        font-size: 0.7rem;
    }

    #tax-rates-table th {
        padding: 0.5rem 0.4rem;
        font-size: 0.65rem;
    }

    #tax-rates-table td {
        padding: 0.4rem 0.4rem;
    }

    #tax-rates-table .canton-badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.3rem;
    }

    /* Freeze first column (Municipality) on horizontal scroll */
    #tax-rates-table th:first-child,
    #tax-rates-table td:first-child {
        position: sticky;
        left: 0;
        z-index: 5;
        box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
    }

    #tax-rates-table th:first-child {
        top: 0;
        background-color: rgb(0, 82, 147);
        z-index: 25;
        /* Corner cell: above both header row and frozen column */
    }

    #tax-rates-table tbody tr:nth-child(odd) td:first-child {
        background-color: #ffffff;
    }

    #tax-rates-table tbody tr:nth-child(even) td:first-child {
        background-color: #fafafa;
    }

    #tax-rates-table tbody tr:hover td:first-child {
        background-color: #e8f0f7;
    }

    /* Tooltip - compact slide-up panel on mobile */
    .tooltip {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        transform: none !important;
        border-radius: 0;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
        max-height: 50vh;
        overflow-y: auto;
        border: none;
    }

    .tooltip-header {
        padding: 0.5rem 1rem;
        position: sticky;
        top: 0;
        z-index: 1;
        border-radius: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .commune-name {
        font-size: 0.95rem;
        flex: 1;
    }

    /* Show close button on mobile */
    .tooltip-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        background: transparent;
        border: none;
        color: var(--white);
        font-size: 1.5rem;
        line-height: 1;
        cursor: pointer;
        margin-left: 0.5rem;
        opacity: 0.7;
        transition: opacity 0.15s ease;
        padding-top: 2px;
    }

    .tooltip-close:hover,
    .tooltip-close:active {
        opacity: 1;
    }

    .tooltip-content {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 0.6rem 0.9rem 0.75rem;
    }

    .tax-section {
        flex: 1 1 45%;
        min-width: 0;
    }

    .tax-section h3 {
        font-size: 0.6rem;
        margin-bottom: 0.3rem;
        padding-bottom: 0.25rem;
    }

    .tax-row {
        font-size: 0.75rem;
        padding: 0.1rem 0;
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .tax-row .label {
        font-size: 0.7rem;
        flex-shrink: 1;
        min-width: 0;
    }

    .tax-row .value {
        font-size: 0.75rem;
        text-align: right;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .tax-row .value.highlight {
        font-size: 0.8rem;
    }

    .tax-row.total,
    .tax-row.effective-rate,
    .tax-row.chf-amount {
        margin-top: 0.2rem;
        padding-top: 0.2rem;
    }

    /* Total tax section mobile styling - full width at bottom */
    .total-tax-section {
        /* Break out of parent flex and set explicit width */
        flex: none;
        width: calc(100% + 1.8rem);
        /* Parent padding: 0.9rem left + 0.9rem right */
        margin-left: -0.9rem;
        margin-right: -0.9rem;
        margin-top: 0.3rem;
        margin-bottom: -0.75rem;
        padding: 0.6rem 1rem !important;
        border-radius: 0;
        order: 10;
        box-sizing: border-box;
    }

    .total-tax-section .tax-row {
        padding: 0;
    }

    .total-tax-section .tax-row .label {
        font-size: 0.8rem;
    }

    .total-tax-section .tax-row .value {
        font-size: 1rem !important;
    }


    /* Footer */
    footer {
        padding: 1.5rem 1rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    .footer-disclaimer {
        max-width: 100%;
    }

    /* Tax Brackets table - scrollable */
    #tax-brackets-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tax-brackets-table {
        font-size: 0.8rem;
        min-width: 400px;
    }

    .tax-brackets-table th,
    .tax-brackets-table td {
        padding: 0.5rem 0.75rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .top-bar {
        justify-content: center;
    }

    .brand {
        gap: 0.75rem;
    }

    .brand-text {
        padding-left: 0.75rem;
    }

    #map {
        height: 280px;
    }

    .legend {
        flex-direction: column;
        align-items: flex-start;
    }

    .legend-bar {
        width: 100%;
        max-width: 200px;
    }

    nav li a {
        padding: 0.7rem 0.8rem;
        font-size: 0.8rem;
    }
}


/* Map Layers */
.canton {
    fill: none;
    stroke: #333;
    stroke-width: 1.5px;
    pointer-events: none;
    vector-effect: non-scaling-stroke;
}

.lake {
    fill: #1e90ff;
    stroke: none;
    pointer-events: none;
}

/* Utility */
.hidden {
    display: none !important;
}

/* Tax Brackets Table */
.tax-brackets-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.tax-brackets-table th,
.tax-brackets-table td {
    padding: 0.6rem 1rem;
    text-align: left;
    border: 1px solid var(--border-gray);
}

.tax-brackets-table th {
    background: var(--dark-gray);
    color: var(--white);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tax-brackets-table tbody tr:nth-child(even) {
    background: var(--light-gray);
}

.tax-brackets-table tbody tr:hover {
    background: #e8f4fc;
}

.tax-brackets-table td:first-child {
    font-variant-numeric: tabular-nums;
}

.tax-brackets-table td:nth-child(2) {
    color: var(--swiss-red);
    font-weight: 600;
}

#tax-brackets-table-container h4 {
    font-size: 0.95rem;
    font-weight: 600;
}

.loading-text {
    color: var(--text-secondary);
    font-style: italic;
}