/* LFC Action Now — tables that fit the screen (2026-11-17b). A table too wide for its space becomes a stack of cards. */
table.fit-stack { display: block; width: 100% !important; min-width: 0 !important; border: 0; background: none; }
table.fit-stack > thead { display: none; }
table.fit-stack > tbody, table.fit-stack > tfoot { display: block; width: 100%; }
table.fit-stack > tbody > tr, table.fit-stack > tfoot > tr {
  display: block; position: relative; margin: 0 0 10px; padding: 10px 14px 8px;
  border: 1px solid var(--line, #dfe5ee); border-radius: 12px; background: var(--card, #fff);
  box-shadow: 0 1px 2px rgba(15, 30, 60, .04);
}
table.fit-stack > tbody > tr:last-child { margin-bottom: 0; }
table.fit-stack > tbody > tr > td, table.fit-stack > tfoot > tr > td, table.fit-stack > tbody > tr > th {
  display: block; position: relative; padding-left: calc(min(34%, 150px) + 12px) !important; min-height: 26px;
  width: auto !important; min-width: 0 !important; max-width: none !important;
  padding-top: 5px !important; padding-bottom: 5px !important; padding-right: 0 !important; border: 0 !important; border-top: 1px solid var(--line, #eef1f5) !important;
  text-align: left !important; white-space: normal !important; overflow-wrap: anywhere; background: none !important;
}
table.fit-stack > tbody > tr > td::before, table.fit-stack > tfoot > tr > td::before, table.fit-stack > tbody > tr > th::before {
  content: attr(data-label); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted, #6b7a90); line-height: 1.35;
  position: absolute; left: 0; top: 8px; width: min(34%, 150px); overflow-wrap: break-word;
}
/* The first column is the card's title: full width, no label. */
table.fit-stack > tbody > tr > :first-child { display: block; border-top: 0 !important; padding-top: 0 !important; padding-left: 0 !important; font-size: 14.5px; }
table.fit-stack > tbody > tr > :first-child::before { content: none; }
/* Cells with no heading (buttons, check boxes) and rows that span the table: full width. */
table.fit-stack > tbody > tr > td:not([data-label]), table.fit-stack > tbody > tr > td.fit-span { display: block; padding-left: 0 !important; }
table.fit-stack > tbody > tr > td:not([data-label])::before, table.fit-stack > tbody > tr > td.fit-span::before { content: none; }
table.fit-stack > tbody > tr > td:empty { display: none; }
/* Buttons and links in a card wrap onto the next line instead of pushing the card wider. */
table.fit-stack td .btn, table.fit-stack td button, table.fit-stack td select { max-width: 100%; }
table.fit-stack td:not([data-label]) { display: flex !important; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: flex-start !important; }
table.fit-stack > tbody > tr > :first-child:not([data-label]) { display: block !important; }
table.fit-stack > tbody > tr > td > * { min-width: 0; max-width: 100%; }
/* Rows that are a group heading (one cell across the table) read as a heading, not a card. */
table.fit-stack > tbody > tr:has(> td.fit-span:only-child) { background: none; border: 0; box-shadow: none; padding: 6px 2px 0; }
/* Hover and stripes from the desktop tables stay on the card, not on each line. */
table.fit-stack > tbody > tr:hover { background: var(--accent-soft, #f1f6ff); }
table.fit-stack > tbody > tr:nth-child(even) { background: var(--surface-1, #fafbfd); }
/* The box around a stacked table needs no sideways scrolling. */
.table-card:has(> table.fit-stack), .op-tablewrap:has(> table.fit-stack), .al-scroll:has(> table.fit-stack) { overflow-x: visible !important; padding: 10px; }
