/* CapFi sitewide tables v1 (STAGED 2026-10-23). CSS only. Scope: content tables in #main .entry-content.
   Excludes: home 1869 (own patch .capfi-tbl), Austin 1905 (Nov 5 hold), rates 2296 (redesign 2511 owns it), calculators/forms. */
body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content :is(figure.wp-block-table){margin:28px 0!important;overflow:visible!important}
body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl):not(:is(.capfi-calc,.capfi-lo-calc,.wpforms-container,form) table){display:table!important;width:100%!important;max-width:100%!important;table-layout:auto;border-collapse:separate!important;border-spacing:0!important;border:1px solid #E3E7EE!important;border-radius:10px!important;overflow:hidden!important;box-shadow:0 6px 22px rgba(19,35,58,.06)!important;background:#fff!important;margin:28px 0!important;font-size:15px!important;line-height:1.5!important}
body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content figure.wp-block-table>table:not(.capfi-tbl){margin:0!important}
body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl) tr{background:transparent!important}
body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl) :is(th,td){padding:14px 18px!important;border:0!important;border-bottom:1px solid #E9EDF3!important;text-align:left!important;vertical-align:top!important;background:transparent!important;color:#3A4656!important;min-width:0!important;white-space:normal!important}
body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl) tbody tr:nth-child(even)>td{background:#FAFBFC!important}
body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl) :is(tbody td:first-child,tbody th){font-weight:600!important;color:#13233A!important}
body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl) :is(thead th,thead td,tbody tr:first-child:not(:has(>td))>th){background:#13233A!important;color:#fff!important;font:600 13.5px/1.4 Poppins,sans-serif!important;letter-spacing:0!important;text-transform:none!important;border-bottom:0!important;vertical-align:middle!important}
body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl) tbody tr:last-child>*{border-bottom:0!important}
body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl) a{color:#0B5CAD;text-decoration:underline;text-underline-offset:2px}
@media (max-width:640px){
 /* 2-column tables: stacked cards */
 body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl):not(:has(tr>:nth-child(3))){border:0!important;box-shadow:none!important;background:none!important;border-radius:0!important;overflow:visible!important}
 body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl):not(:has(tr>:nth-child(3))) :is(thead,tbody,tr,th,td){display:block!important;width:auto!important}
 body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl):not(:has(tr>:nth-child(3))) :is(thead,tbody tr:first-child:not(:has(>td))){position:absolute!important;left:-9999px!important}
 body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl):not(:has(tr>:nth-child(3))) tbody tr{border:1px solid #E3E7EE;border-radius:10px;overflow:hidden;margin:0 0 12px;background:#fff!important}
 body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl):not(:has(tr>:nth-child(3))) tbody tr>*{padding:12px 16px!important;background:#fff!important}
 body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl):not(:has(tr>:nth-child(3))) tbody tr>:first-child{background:#F4F7FC!important;box-shadow:inset 3px 0 0 #FCA404;border-bottom:1px solid #E9EDF3!important}
 /* 3+ column tables: contained horizontal scroll with sticky first column (labeled cards would need data-label markup) */
 body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl):has(tr>:nth-child(3)){display:block!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch;font-size:14px!important}
 body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl):has(tr>:nth-child(3)):not(:has(td[data-label])) :is(th,td){padding:11px 14px!important;min-width:132px!important}
 body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl):has(tr>:nth-child(3)):not(:has(td[data-label])) tr>:first-child{position:sticky;left:0;z-index:1;min-width:128px!important;max-width:none;overflow-wrap:normal!important;box-shadow:inset -1px 0 0 #E3E7EE}
 body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl):has(tr>:nth-child(3)):not(:has(td[data-label])) tbody tr>td:first-child{background:#fff!important}
 body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl):has(tr>:nth-child(3)):not(:has(td[data-label])) tbody tr:nth-child(even)>td:first-child{background:#FAFBFC!important}
 body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content figure.wp-block-table{overflow:visible!important}
}
/* v3 (audit pass 3-4 fixes): long unbroken header words must wrap inside their cell */
body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl) :is(th,td){overflow-wrap:break-word;word-break:normal;hyphens:manual}
@media (max-width:640px){body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl):has(tr>:nth-child(3)):not(:has(td[data-label])) thead th:first-child{z-index:2}}
/* v4: 3+ column tables with data-label cells stack as labeled cards at <=640px */
@media (max-width:640px){
 body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl):has(td[data-label]){display:block!important;border:0!important;box-shadow:none!important;background:none!important;border-radius:0!important;overflow:visible!important;font-size:15px!important}
 body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl):has(td[data-label]) :is(thead,tbody,tr,th,td){display:block!important;width:auto!important;min-width:0!important;max-width:none!important;position:static!important}
 body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl):has(td[data-label]) thead,body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl):has(td[data-label]) tbody tr:first-child:not(:has(>td)){position:absolute!important;left:-9999px!important}
 body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl):has(td[data-label]) tbody tr{border:1px solid #E3E7EE;border-radius:10px;overflow:hidden;margin:0 0 12px;background:#fff!important;box-shadow:0 4px 14px rgba(19,35,58,.05)}
 body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl):has(td[data-label]) tbody tr>*{padding:11px 16px!important;background:#fff!important;border-bottom:1px solid #EEF2F6!important}
 body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl):has(td[data-label]) tbody tr>*:last-child{border-bottom:0!important}
 body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl):has(td[data-label]) tbody tr>:not([data-label]):first-child{background:#F4F7FC!important;box-shadow:inset 3px 0 0 #FCA404;font-weight:700!important;color:#13233A!important}
 body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl):has(td[data-label]) td[data-label]::before{content:attr(data-label);display:block;font:700 11.5px/1.3 Poppins,sans-serif;letter-spacing:.04em;text-transform:uppercase;color:#6B7685;margin:0 0 4px}
 body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl):has(td[data-label]) td[data-label]:empty{display:none!important}
 body:not(.page-id-1869):not(.page-id-1905):not(.page-id-2296) #main .entry-content table:not(.capfi-tbl):has(td[data-label]) tbody tr:nth-child(even)>td{background:#fff!important}
}
