.alert-activity-secondary { color: var(--ink-faint); margin: 0; line-height: 1.6; }
.alert-earlier { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.alert-earlier-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.alert-earlier-row > span { flex: 1; min-width: 160px; color: var(--ink-faint); }
#alert-investigation-dialog { box-sizing: border-box; width: min(900px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); overflow: auto; }
#alert-investigation-dialog::backdrop { background: rgba(0, 0, 0, .75); }
.alert-investigation-header { position: sticky; top: 0; z-index: 1; background: var(--surface); display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.alert-investigation-header h2 { margin: 0; font-size: 18px; }
.alert-investigation-header p { margin: 6px 0 0; font-size: 13px; }
#alert-investigation-content { padding: 24px; overflow-wrap: anywhere; }
.alert-investigation-trigger h3 { margin: 6px 0 10px; font-size: 28px; line-height: 1.25; }
.alert-investigation-trigger p { margin: 10px 0; line-height: 1.6; }
.alert-investigation-route { font-size: 18px; }
.alert-investigation-warning { border-left: 3px solid var(--signal-warn); padding: 8px 12px; color: var(--ink-dim); background: var(--signal-warn-bg); }
.alert-investigation-evidence { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; scroll-margin-top: 110px; }
.alert-investigation-proof-toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.alert-investigation-proof-toolbar h3 { margin: 0; font-size: 16px; }
#alert-investigation-scope { width: auto; max-width: 100%; }
#alert-investigation-proof-status { margin: 12px 0; font-size: 13px; line-height: 1.6; }
.alert-investigation-proof { padding-left: 28px; margin: 0; }
.alert-investigation-proof > li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.alert-proof-heading { display: flex; gap: 8px 16px; justify-content: space-between; margin-bottom: 6px; flex-wrap: wrap; }
.alert-proof-heading time { font-size: 13px; color: var(--ink-faint); }
.alert-proof-heading strong { font-weight: 600; font-size: 14px; }
.alert-investigation-proof p { margin: 6px 0; font-size: 13px; line-height: 1.6; }
.alert-investigation-proof details { margin-top: 8px; font-size: 13px; }
#alert-investigation-dialog summary { cursor: pointer; color: var(--ink-faint); }
.alert-proof-source { margin-top: 8px; line-height: 1.8; }
.alert-investigation-pagination { display: flex; gap: 12px; align-items: center; justify-content: flex-end; margin-top: 16px; }
.alert-investigation-context, .alert-investigation-technical { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; font-size: 13px; line-height: 1.7; }
.alert-investigation-context ol { padding-left: 24px; }
.alert-investigation-context li { margin: 8px 0; }
#alert-investigation-dialog footer { margin-top: 20px; }
.gd-investigation { border-color: var(--line-strong); overflow-wrap: anywhere; }
.gd-investigation-hd { padding: 20px; gap: 16px; background: var(--surface-raised); }
.gd-investigation-kicker { font-size: 12px; color: var(--ink-faint); }
.gd-investigation-hd h2 { margin-top: 6px; line-height: 1.4; }
.gd-investigation-context { padding: 16px 20px; gap: 8px 16px; }
.gd-investigation-subheading { padding: 20px 20px 10px; }
.gd-investigation-proof { padding: 12px 20px; line-height: 1.7; }
.gd-investigation-calculation { margin: 8px 20px; padding: 14px; border-left: 3px solid var(--signal-warn); }
.gd-investigation-logged { margin: 8px 20px; padding: 14px; border-left: 3px solid var(--signal-info); }
.gd-investigation .table-wrap { margin: 8px 20px 16px; }
.gd-investigation-balances td, .gd-investigation-trigger-assets td, .gd-investigation-trigger-checks td { line-height: 1.6; padding: 12px; }
.gd-investigation-linked > summary { padding: 16px 20px; }
.gd-investigation-note { line-height: 1.6; }
@media (max-width: 760px) {
  .alerts-history-toolbar > label:not(.toggle-row) { min-width: 0; max-width: 100%; width: 100%; }
  #alerts-history-rule { min-width: 0; max-width: 100%; width: 100%; }
  #alert-investigation-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .alert-investigation-header, #alert-investigation-content { padding: 16px; }
  .alert-investigation-trigger h3 { font-size: 24px; }
  .alert-investigation-proof-toolbar { align-items: flex-start; flex-direction: column; }
  .alert-proof-heading { flex-direction: column; }
  .alert-investigation-pagination { justify-content: space-between; }
  .gd-investigation-balances, .gd-investigation-trigger-assets, .gd-investigation-trigger-checks { min-width: 0; width: 100%; }
  .gd-investigation-balances thead, .gd-investigation-trigger-assets thead, .gd-investigation-trigger-checks thead { display: none; }
  .gd-investigation-balances tbody, .gd-investigation-trigger-assets tbody, .gd-investigation-trigger-checks tbody,
  .gd-investigation-balances tr, .gd-investigation-trigger-assets tr, .gd-investigation-trigger-checks tr { display: block; }
  .gd-investigation-balances tr, .gd-investigation-trigger-assets tr, .gd-investigation-trigger-checks tr { padding: 10px 0; border-bottom: 1px solid var(--line-strong); }
  .gd-investigation-balances td, .gd-investigation-trigger-assets td, .gd-investigation-trigger-checks td { display: block; padding: 5px 12px; width: auto; border: 0; }
  .gd-investigation-balances td::before, .gd-investigation-trigger-assets td::before, .gd-investigation-trigger-checks td::before { display: inline-block; margin-right: 8px; color: var(--ink-faint); }
  .gd-investigation-balances td:nth-child(1)::before { content: 'Account'; }
  .gd-investigation-balances td:nth-child(2)::before { content: 'Before'; }
  .gd-investigation-balances td:nth-child(3)::before { content: 'After'; }
  .gd-investigation-balances td:nth-child(4)::before { content: 'Change'; }
  .gd-investigation-trigger-assets td:nth-child(1)::before { content: 'Item / UID'; }
  .gd-investigation-trigger-assets td:nth-child(2)::before { content: 'Observed route'; }
  .gd-investigation-trigger-assets td:nth-child(3)::before { content: 'Recorded value'; }
  .gd-investigation-trigger-checks td:nth-child(1)::before { content: 'Check / UID'; }
  .gd-investigation-trigger-checks td:nth-child(2)::before { content: 'Face value'; }
  .gd-investigation-trigger-checks td:nth-child(3)::before { content: 'Created by / when'; }
  .gd-investigation-trigger-checks td:nth-child(4)::before { content: 'Held at alert save'; }
  .gd-investigation-hd, .gd-investigation-context { padding: 16px; }
  .gd-investigation .table-wrap { margin: 8px 12px 16px; }
}
