/* Distinct accents for ITR-4 and ITR-5 document, filing, and guidance sections. */
/* Remove the decorative gold bars from mistake cards. */
html body:is(.itr4-page, .itr5-page):not(.home-page) main .itr-mistake-rule,
html body:is(.itr4-page, .itr5-page):not(.home-page) main .itr-mistake-rule::before,
html body:is(.itr4-page, .itr5-page):not(.home-page) main .itr-mistake-rule::after {
    display: none !important;
}
/* Distinct accents for the ITR-5 tax-rules cards. */
html body.itr5-page:not(.home-page) main > section:nth-of-type(6) .info-card:nth-child(1) { --rules-accent: #2563eb; --rules-border: #93c5fd; --rules-tint: #eff6ff; }
html body.itr5-page:not(.home-page) main > section:nth-of-type(6) .info-card:nth-child(2) { --rules-accent: #7c3aed; --rules-border: #c4b5fd; --rules-tint: #f5f3ff; }
html body.itr5-page:not(.home-page) main > section:nth-of-type(6) .info-card:nth-child(3) { --rules-accent: #0f766e; --rules-border: #5eead4; --rules-tint: #f0fdfa; }
html body.itr5-page:not(.home-page) main > section:nth-of-type(6) .info-card:nth-child(4) { --rules-accent: #be185d; --rules-border: #f9a8d4; --rules-tint: #fdf2f8; }

html body.itr5-page:not(.home-page) main > section:nth-of-type(6) .info-card {
    border-color: var(--rules-border) !important;
}

html body.itr5-page:not(.home-page) main > section:nth-of-type(6) .card-icon {
    color: var(--rules-accent) !important;
    background: var(--rules-tint) !important;
    border-color: var(--rules-border) !important;
}

html body.itr5-page:not(.home-page) main > section:nth-of-type(6) .card-icon i {
    color: var(--rules-accent) !important;
}

/* Compact the ITR-5 eligibility cards without changing their grid. */
html body.itr5-page:not(.home-page) main .itr5-eligibility-grid {
    grid-auto-rows: 230px !important;
    gap: 12px !important;
}

html body.itr5-page:not(.home-page) main .itr5-eligibility-grid .info-card {
    padding: 12px 12px 12px !important;
}

html body.itr5-page:not(.home-page) main .itr5-eligibility-grid .card-icon {
    width: 48px;
    height: 48px;
    font-size: 20px;
}

html body.itr5-page:not(.home-page) main .itr5-eligibility-grid .card-title {
    margin-top: 7px;
    font-size: 18px;
}

html body.itr5-page:not(.home-page) main .itr5-eligibility-grid .card-text {
    margin-top: 7px;
    font-size: 15px;
    line-height: 1.4;
}

@media (max-width: 900px) {
    html body.itr5-page:not(.home-page) main .itr5-eligibility-grid {
        grid-auto-rows: auto !important;
    }

    html body.itr5-page:not(.home-page) main .itr5-eligibility-grid .info-card {
        height: auto !important;
        min-height: 0 !important;
    }
}

/* Animate ITR-4 cards only while the pointer is over them. */
html body.itr4-page:not(.home-page) main :is(.info-card, .itr-info-card, .itr-step-card, .itr-penalty-card, .itr-method-card, .itr-benefit-card, .itr-mistake-card, .itr-post-row) {
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

html body.itr4-page:not(.home-page) main :is(.info-card, .itr-info-card, .itr-step-card, .itr-penalty-card, .itr-method-card, .itr-benefit-card, .itr-mistake-card, .itr-post-row):hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 28px rgba(33, 68, 55, 0.14);
}

html body.itr4-page:not(.home-page) main :is(.info-card, .itr-info-card, .itr-step-card, .itr-penalty-card, .itr-method-card, .itr-benefit-card, .itr-mistake-card, .itr-post-row) :is(.card-top, .card-icon, .itr-card-icon, .itr-process-icon, .itr4-penalty-icon, .itr-method-icon, .itr-mistake-icon, .itr-post-icon) {
    transition: transform 220ms ease;
}

html body.itr4-page:not(.home-page) main :is(.info-card, .itr-info-card, .itr-step-card, .itr-penalty-card, .itr-method-card, .itr-benefit-card, .itr-mistake-card, .itr-post-row):hover :is(.card-top, .card-icon, .itr-card-icon, .itr-process-icon, .itr4-penalty-icon, .itr-method-icon, .itr-mistake-icon, .itr-post-icon) {
    transform: scale(1.06);
}

@media (prefers-reduced-motion: reduce) {
    html body.itr4-page:not(.home-page) main :is(.info-card, .itr-info-card, .itr-step-card, .itr-penalty-card, .itr-method-card, .itr-benefit-card, .itr-mistake-card, .itr-post-row) {
        transition: none;
    }
}
/* Keep section 12 comparable in height to the other desktop sections. */
html body.itr4-page:not(.home-page) main > .itr4-post-section .itr-panel {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
}

html body.itr4-page:not(.home-page) main > .itr4-post-section .itr-section-head {
    margin-bottom: 16px !important;
}

html body.itr4-page:not(.home-page) main > .itr4-post-section .itr-post-row {
    min-height: 88px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

html body.itr4-page:not(.home-page) main > .itr4-post-section .itr-post-list {
    gap: 8px !important;
}

/* Align the duration badges along the bottom of each filing-step row. */
html body.itr4-page:not(.home-page) main .itr4-process-section .itr-process-grid {
    grid-template-rows: repeat(4, auto);
    row-gap: 0 !important;
}

html body.itr4-page:not(.home-page) main .itr4-process-section .itr-step-card {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 4;
    justify-items: center;
    align-items: start;
}

html body.itr4-page:not(.home-page) main .itr4-process-section .itr-step-card > p {
    margin-bottom: 24px;
}

html body.itr4-page:not(.home-page) main .itr4-process-section .itr-duration {
    margin-top: 0;
    width: 100%;
    max-width: 280px;
    min-height: 48px;
    height: auto;
    align-self: stretch;
    flex-shrink: 0;
    padding: 8px;
    justify-content: center;
    box-sizing: border-box;
}

html body.itr4-page:not(.home-page) main .itr4-process-section .itr-duration i {
    flex-shrink: 0;
}

/* Keep the five ITR-4 mistake cards together in one row. */
html body.itr4-page:not(.home-page) main .itr4-mistakes-section .itr-mistake-grid {
    grid-template-columns: none !important;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 1fr);
    grid-auto-rows: auto;
    gap: 14px !important;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

/* Tighten the ITR-5 mistake cards while preserving readable spacing. */
html body.itr5-page:not(.home-page) main .itr-mistake-card {
    min-height: 200px !important;
    padding: 14px 14px 14px !important;
}
html body.itr5-page:not(.home-page) main .itr-mistake-card .itr-mistake-icon {
    width: 42px !important;
    height: 42px !important;
    font-size: 19px !important;
}
html body.itr5-page:not(.home-page) main .itr-mistake-card .itr-mistake-title {
    margin-top: 6px !important;
}
html body.itr5-page:not(.home-page) main .itr-mistake-card .itr-mistake-text {
    margin-top: 5px !important;
    line-height: 1.4 !important;
}

html body.itr4-page:not(.home-page) main .itr4-mistakes-section .itr-mistake-card {
    min-width: 0;
}

/* Tighten the filing-process section's outer spacing. */
html body.itr4-page:not(.home-page) main > .itr4-process-section .panel {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
}

html body.itr4-page:not(.home-page) main > .itr4-process-section .section-head {
    margin-bottom: 16px !important;
}

html body.itr4-page:not(.home-page) main .itr-colored-documents {
    gap: 14px !important;
}

html body.itr4-page:not(.home-page) main .itr-colored-documents > .info-card {
    min-height: 0 !important;
    height: auto;
    padding: 16px !important;
}

html body.itr4-page:not(.home-page) main .itr-colored-documents > .info-card > div:first-child {
    font-size: 26px !important;
    line-height: 1;
    margin-bottom: 8px !important;
}

html body.itr4-page:not(.home-page) main .itr-colored-documents > .info-card .card-text {
    margin-top: 6px !important;
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main :is(.itr-colored-documents > .info-card, .itr-method-card, .itr-benefit-card, .itr-mistake-card, .itr-post-row, .status-item, .itr-colored-document-table tbody tr):nth-child(10n + 1) {
    --card-accent: #2563eb;
    --card-border: #93c5fd;
    --card-tint: #eff6ff;
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main :is(.itr-colored-documents > .info-card, .itr-method-card, .itr-benefit-card, .itr-mistake-card, .itr-post-row, .status-item, .itr-colored-document-table tbody tr):nth-child(10n + 2) {
    --card-accent: #7c3aed;
    --card-border: #c4b5fd;
    --card-tint: #f5f3ff;
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main :is(.itr-colored-documents > .info-card, .itr-method-card, .itr-benefit-card, .itr-mistake-card, .itr-post-row, .status-item, .itr-colored-document-table tbody tr):nth-child(10n + 3) {
    --card-accent: #c2410c;
    --card-border: #fdba74;
    --card-tint: #fff7ed;
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main :is(.itr-colored-documents > .info-card, .itr-method-card, .itr-benefit-card, .itr-mistake-card, .itr-post-row, .status-item, .itr-colored-document-table tbody tr):nth-child(10n + 4) {
    --card-accent: #0e7490;
    --card-border: #67e8f9;
    --card-tint: #ecfeff;
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main :is(.itr-colored-documents > .info-card, .itr-method-card, .itr-benefit-card, .itr-mistake-card, .itr-post-row, .status-item, .itr-colored-document-table tbody tr):nth-child(10n + 5) {
    --card-accent: #be185d;
    --card-border: #f9a8d4;
    --card-tint: #fdf2f8;
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main :is(.itr-colored-documents > .info-card, .itr-method-card, .itr-benefit-card, .itr-mistake-card, .itr-post-row, .status-item, .itr-colored-document-table tbody tr):nth-child(10n + 6) {
    --card-accent: #4f46e5;
    --card-border: #a5b4fc;
    --card-tint: #eef2ff;
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main :is(.itr-colored-documents > .info-card, .itr-method-card, .itr-benefit-card, .itr-mistake-card, .itr-post-row, .status-item, .itr-colored-document-table tbody tr):nth-child(10n + 7) {
    --card-accent: #b91c1c;
    --card-border: #fca5a5;
    --card-tint: #fef2f2;
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main :is(.itr-colored-documents > .info-card, .itr-method-card, .itr-benefit-card, .itr-mistake-card, .itr-post-row, .status-item, .itr-colored-document-table tbody tr):nth-child(10n + 8) {
    --card-accent: #a16207;
    --card-border: #fcd34d;
    --card-tint: #fffbeb;
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main :is(.itr-colored-documents > .info-card, .itr-method-card, .itr-benefit-card, .itr-mistake-card, .itr-post-row, .status-item, .itr-colored-document-table tbody tr):nth-child(10n + 9) {
    --card-accent: #0f766e;
    --card-border: #5eead4;
    --card-tint: #f0fdfa;
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main :is(.itr-colored-documents > .info-card, .itr-method-card, .itr-benefit-card, .itr-mistake-card, .itr-post-row, .status-item, .itr-colored-document-table tbody tr):nth-child(10n + 10) {
    --card-accent: #a21caf;
    --card-border: #f0abfc;
    --card-tint: #fdf4ff;
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main :is(.itr-colored-documents > .info-card, .itr-method-card, .itr-benefit-card, .itr-mistake-card, .itr-post-row, .status-item, .itr-colored-document-table tbody tr) {
    border-color: var(--card-border) !important;
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main .itr-method-card {
    border-bottom-color: var(--card-accent) !important;
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main .itr-method-card--featured {
    border-color: var(--card-accent) !important;
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main .itr-colored-documents > .info-card i,
html body:is(.itr4-page, .itr5-page):not(.home-page) main :is(.itr-method-icon, .itr-badge-icon, .itr-mistake-icon, .itr-post-icon) i {
    color: var(--card-accent) !important;
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main :is(.itr-method-icon, .itr-badge-icon, .itr-mistake-icon, .itr-post-icon) {
    color: var(--card-accent) !important;
    border-color: var(--card-border) !important;
    background: var(--card-tint) !important;
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main .itr-post-row::before {
    background: linear-gradient(to bottom, var(--card-accent) 0 88%, #f0b429 88% 100%);
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main .itr-post-step,
html body:is(.itr4-page, .itr5-page):not(.home-page) main .itr-post-step strong {
    color: var(--card-accent);
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main .status-num {
    background: var(--card-accent);
    color: #ffffff;
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main .itr-colored-document-table tbody tr td:first-child {
    border-left: 0 !important;
}

/* Compact, individually colored filing-step icons. */
html body:is(.itr4-page, .itr5-page):not(.home-page) main .itr-process-grid .itr-step-card:nth-child(1) {
    --process-accent: #2563eb;
    --process-tint: #eff6ff;
    --process-border: #bfdbfe;
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main .itr-process-grid .itr-step-card:nth-child(2) {
    --process-accent: #7c3aed;
    --process-tint: #f5f3ff;
    --process-border: #ddd6fe;
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main .itr-process-grid .itr-step-card:nth-child(3) {
    --process-accent: #c2410c;
    --process-tint: #fff7ed;
    --process-border: #fed7aa;
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main .itr-process-grid .itr-step-card:nth-child(4) {
    --process-accent: #0e7490;
    --process-tint: #ecfeff;
    --process-border: #a5f3fc;
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main .itr-process-grid .itr-process-icon {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    margin-bottom: 60px;
    font-size: 26px;
    color: var(--process-accent);
    background: var(--process-tint);
    border-color: var(--process-border);
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main .itr-process-grid .itr-process-icon i {
    font-size: 26px;
    color: var(--process-accent);
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main .itr-process-grid .itr-duration i {
    color: var(--process-accent);
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main .itr-process-grid .itr-step-tag {
    top: 78px;
    width: 38px;
    height: 38px;
    min-height: 38px;
    background: var(--process-accent);
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main .itr-process-grid .itr-step-tag::after {
    font-size: 12px;
}

html body:is(.itr4-page, .itr5-page):not(.home-page) main .itr-process-grid::before,
html body:is(.itr4-page, .itr5-page):not(.home-page) main .itr-process-grid .itr-step-card::before {
    top: 97px;
}

html body.itr4-page main .itr4-process-section .itr-process-grid::after,
html body.itr4-page main .itr4-process-section .itr-step-card:not(:last-child)::after {
    top: 93px;
}

html body.itr5-page main .itr-process-grid::after,
html body.itr5-page main .itr-process-grid .itr-step-card:not(:last-child)::after {
    top: 97px;
}

/* Match the ITR-1 reference's pastel after-filing icon circles. */
html body.itr4-page:not(.home-page) main .itr4-post-section .itr-post-icon {
    width: 72px;
    height: 72px;
    margin-left: 8px;
    font-size: 30px;
    align-self: center;
}

html body.itr4-page:not(.home-page) main .itr4-post-section .itr-post-row:nth-child(1) .itr-post-icon {
    --card-accent: #2f8f78;
    --card-tint: #e4f4ed;
    --card-border: #b4ddce;
}

html body.itr4-page:not(.home-page) main .itr4-post-section .itr-post-row:nth-child(2) .itr-post-icon {
    --card-accent: #347eae;
    --card-tint: #e7f0fb;
    --card-border: #b9d2ea;
}

html body.itr4-page:not(.home-page) main .itr4-post-section .itr-post-row:nth-child(3) .itr-post-icon {
    --card-accent: #c98b1d;
    --card-tint: #fff2d8;
    --card-border: #efd294;
}

html body.itr4-page:not(.home-page) main .itr4-post-section .itr-post-row:nth-child(4) .itr-post-icon {
    --card-accent: #7558a8;
    --card-tint: #eee9fb;
    --card-border: #d0c2eb;
}

@media (max-width: 900px) {
    html body.itr4-page:not(.home-page) main .itr4-post-section .itr-post-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}

@media (max-width: 600px) {
    html body.itr4-page:not(.home-page) main .itr4-post-section .itr-post-icon {
        width: 52px;
        height: 52px;
        margin-left: 0;
        font-size: 22px;
    }
}
