/* Uptrip-only presentation. Table and cards share the exact same rows. */
.upc-section{background:#fff;border:1px solid #dce4eb;border-radius:18px;padding:24px;margin:18px 0;min-width:0;scroll-margin-top:16px}.upc-section h2{font-size:28px;line-height:1.2;margin:6px 0 14px}.upc-section p{line-height:1.55}.upc-section details{margin:12px 0}.upc-section summary{cursor:pointer;font-weight:600}.upc-heading,.upc-tools{display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:space-between}.upc-tools{justify-content:flex-start}.upc-tools button,.upc-section select,.upc-tools input{font:inherit;max-width:100%;border:1px solid #c6d1dd;border-radius:8px;background:#fff;padding:8px 12px}.upc-tools button{cursor:pointer}.upc-tools .upc-selected{background:#223c44;color:#fff}.upc-note{color:#65758a;font-size:13px}.upc-scroll{overflow-x:auto;max-width:100%}.upc-section table{width:100%;border-collapse:collapse}.upc-section td,.upc-section th{padding:10px;text-align:left;border-bottom:1px solid #e1e8f0;vertical-align:top}.upc-section [hidden]{display:none!important}.upc-cards table,.upc-cards tbody{display:block;width:100%}.upc-cards thead{display:none}.upc-cards tr{display:grid;grid-template-columns:38px minmax(0,2fr) 100px repeat(4,minmax(0,1fr));gap:8px 14px;border:1px solid #dce4eb;border-radius:12px;padding:12px;margin:8px 0;align-items:start}.upc-cards td{display:block;padding:0;border:0;min-width:0;overflow-wrap:anywhere}.upc-cards td:not(.upc-name)::before{content:attr(data-label);display:block;font-size:11px;color:#65758a;font-weight:400}.upc-name{font-weight:700}.upc-cards .upc-history{grid-column:2/-1;font-size:13px}.upc-total b{font-size:21px}.upc-cards .upc-scroll{overflow:visible}@media(max-width:800px){.upc-cards tr{grid-template-columns:28px minmax(0,1fr) 64px}.upc-cards td:nth-child(n+4):nth-child(-n+7){grid-column:auto}.upc-cards .upc-history{grid-column:1/-1}}@media(max-width:500px){.upc-section{padding:14px}.upc-section h2{font-size:24px}.upc-cards tr{gap:8px;grid-template-columns:26px minmax(0,1fr) 58px}.upc-cards td:nth-child(4),.upc-cards td:nth-child(6){grid-column:2}.upc-cards td:nth-child(5),.upc-cards td:nth-child(7){grid-column:3}.upc-tools input{width:100%;min-width:0}}

/* FIX-144: explicit grid placement prevents metrics falling into the narrow rank column.
   The local switch owns this table; no values, filters or private access are removed. */
.upc-cards table{table-layout:auto;min-width:0}
.upc-cards tr{grid-template-columns:38px repeat(4,minmax(0,1fr))}
.upc-cards tr[data-upc-row]>td:nth-child(1){grid-column:1;grid-row:1}
.upc-cards tr[data-upc-row]>td:nth-child(2){grid-column:2/5;grid-row:1}
.upc-cards tr[data-upc-row]>td:nth-child(3){grid-column:5;grid-row:1}
.upc-cards tr[data-upc-row]>td:nth-child(4){grid-column:2;grid-row:2}
.upc-cards tr[data-upc-row]>td:nth-child(5){grid-column:3;grid-row:2}
.upc-cards tr[data-upc-row]>td:nth-child(6){grid-column:4;grid-row:2}
.upc-cards tr[data-upc-row]>td:nth-child(7){grid-column:5;grid-row:2}
.upc-cards tr[data-upc-row]>td.upc-history{grid-column:2/-1;grid-row:3}
.upc-cards td::before{overflow-wrap:normal;word-break:normal}
@media(max-width:800px){
 .upc-cards tr{grid-template-columns:32px repeat(2,minmax(0,1fr));gap:10px 12px}
 .upc-cards tr[data-upc-row]>td:nth-child(1){grid-column:1;grid-row:1}
 .upc-cards tr[data-upc-row]>td:nth-child(2){grid-column:2/-1;grid-row:1}
 .upc-cards tr[data-upc-row]>td:nth-child(3){grid-column:1/-1;grid-row:2;display:flex;align-items:baseline;gap:10px}
 .upc-cards tr[data-upc-row]>td:nth-child(3)::before{display:inline}
 .upc-cards tr[data-upc-row]>td:nth-child(4){grid-column:1/3;grid-row:3}
 .upc-cards tr[data-upc-row]>td:nth-child(5){grid-column:3;grid-row:3}
 .upc-cards tr[data-upc-row]>td:nth-child(6){grid-column:1/3;grid-row:4}
 .upc-cards tr[data-upc-row]>td:nth-child(7){grid-column:3;grid-row:4}
 .upc-cards tr[data-upc-row]>td.upc-history{grid-column:1/-1;grid-row:5}
}
