/* A bounded HUD: its parent supplies the available height; only each list scrolls. */
.money-hud {
  --money-bg: #101713;
  --money-ink: #f7f2d9;
  --money-muted: #b2bca9;
  --money-rule: #4b5845;
  container-type: inline-size;
  container-name: money-panel;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  color: var(--money-ink);
  background: var(--money-bg);
  font-family: Arial, sans-serif;
}
.money-hud, .money-hud * { box-sizing: border-box; }
.money-hud button { font-family: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
.money-hud button:focus-visible, .money-hud-scroll:focus-visible { outline: 2px solid #fff2a4; outline-offset: -3px; }
.money-hud-filterbar { flex: 0 0 auto; display: flex; align-items: center; gap: 14px; min-width: 0; padding: 8px 12px; border-bottom: 1px solid var(--money-rule); background: #172019; }
.money-hud-filter-label { font: 9px monospace; letter-spacing: 1.3px; color: #c3cdb6; }
.money-hud-filters { display: flex; align-items: center; gap: 4px; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #5e6c4f transparent; }
.money-hud-filters button { flex: 0 0 auto; min-height: 34px; padding: 7px 12px; font-size: 11px; font-weight: 700; border: 1px solid #45513d; border-radius: 3px; white-space: nowrap; }
.money-hud-filters button:hover { background: #35422d; }
.money-hud-filters button[aria-pressed="true"] { background: #e4edab; color: #182313; border-color: #e4edab; }
.money-hud-panes { flex: 1 1 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; min-height: 0; overflow: hidden; }
.money-hud-pane { --money-accent: #ff8d9c; --money-pane-bg: #26171b; --money-card-bg: #301d22; --money-pane-rule: #73434c; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; background: var(--money-pane-bg); }
.money-hud-flavio { --money-accent: #d9ee91; --money-pane-bg: #102a21; --money-card-bg: #18372a; --money-pane-rule: #426653; border-left: 1px solid #98a877; }
.money-hud-pane-head { flex: 0 0 81px; height: 81px; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 12px 16px; background: linear-gradient(115deg, #8d2434, #531c28); border-bottom: 1px solid var(--money-pane-rule); }
.money-hud-flavio .money-hud-pane-head { background: linear-gradient(115deg, #096348, #163c2e); }
.money-hud-pane-head > div { min-width: 0; }
.money-hud-pane-caption { display: block; font: 8px monospace; letter-spacing: 1px; opacity: .8; margin-bottom: 5px; white-space: nowrap; }
.money-hud-pane-head h3 { margin: 0; color: var(--money-ink); font-size: 26px; font-weight: 900; letter-spacing: -.5px; line-height: 1.08; }
.money-hud-flavio .money-hud-pane-head h3 { color: #e8efae; }
.money-hud-record-count { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; color: var(--money-accent); }
.money-hud-record-count strong { font: 800 28px/1 Arial, sans-serif; letter-spacing: -1px; }
.money-hud-record-count > span { font: 7px monospace; letter-spacing: .5px; margin-top: 5px; }
.money-hud-scroll { flex: 1 1 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); align-content: start; gap: 10px; min-height: 0; min-width: 0; padding: 12px; overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; scrollbar-width: thin; scrollbar-color: var(--money-pane-rule) var(--money-pane-bg); scrollbar-gutter: stable; -webkit-overflow-scrolling: touch; }
.money-hud-card { height: 276px; min-height: 276px; min-width: 0; display: grid; grid-template-rows: 28px 36px 39px 21px 28px 25px 19px minmax(36px, 1fr); row-gap: 3px; padding: 13px 13px 0; overflow: hidden; border: 1px solid var(--money-pane-rule); border-top: 3px solid var(--money-accent); border-radius: 4px; background: var(--money-card-bg); box-shadow: 0 3px 0 #0002; }
.money-hud-entity { color: var(--money-accent); font: 700 10px/1.35 Arial, sans-serif; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.money-hud-record-title { margin: 0; padding: 0; min-width: 0; font-size: 12px; line-height: 1.4; font-weight: 600; }
.money-hud-record-title button { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; width: 100%; padding: 0; text-align: left; font: inherit; }
.money-hud-record-title button:hover { text-decoration: underline; }
.money-hud-amount { align-self: center; min-width: 0; color: #fff9df; white-space: nowrap; font-size: clamp(23px, 2.8vw, 34px); line-height: 1; font-weight: 900; letter-spacing: -1.3px; font-variant-numeric: tabular-nums; }
.money-hud-amount-missing { font-size: 21px; letter-spacing: -.7px; color: #d2cfbf; }
.money-hud-classification { display: flex; align-items: center; justify-content: space-between; gap: 5px; min-width: 0; color: #eee5cf; font: 8px/1.15 monospace; }
.money-hud-classification > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.money-hud-status { flex: 0 1 auto; padding: 4px 5px; background: #ffffff0d; border: 1px solid #ffffff25; border-radius: 2px; }
.money-hud-status-alleged { color: #f4dc95; border-color: #e3c67a66; }
.money-hud-period { margin: 0; padding: 0; color: #c0c1b4; font-size: 10px; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.money-hud-attribution { display: flex; align-items: center; color: var(--money-accent); font: 9px/1.25 monospace; border-top: 1px solid #ffffff16; overflow: hidden; }
.money-hud-trace { display: flex; align-items: center; justify-content: space-between; gap: 5px; min-width: 0; color: #c8c8b4; font: 8px/1.2 monospace; }
.money-hud-trace > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.money-hud-card-actions { display: grid; grid-template-columns: minmax(0, 1fr) 40px; margin: 0 -13px; border-top: 1px solid var(--money-pane-rule); }
.money-hud-card-actions button { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; padding: 0 13px; text-align: left; font-size: 10px; font-weight: 700; }
.money-hud-card-actions button:hover { background: #ffffff12; }
.money-hud-card-actions .money-hud-share { display: grid; place-items: center; padding: 0; border-left: 1px solid var(--money-pane-rule); }
.money-hud-card-missing { border-top-style: dashed; }
.money-hud-empty { grid-column: 1/-1; min-width: 0; padding: 28px 10px; text-align: center; color: #cccdbd; }
.money-hud-empty > span { display: block; margin-bottom: 15px; color: var(--money-accent); font-size: 32px; }
.money-hud-empty strong { display: block; font-size: 12px; line-height: 1.5; font-weight: 600; }
.money-hud-empty p { font-size: 10px; line-height: 1.5; margin: 12px 0 0; color: #aeb3a5; }
.money-hud-footnote { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; padding: 8px 12px; margin: 0; border-top: 1px solid var(--money-rule); font-size: 9px; line-height: 1.45; color: var(--money-muted); background: #151e17; }
.money-hud-footnote > span { color: #ecdea0; font-size: 15px; }
.money-hud-pair .money-hud-pane-head h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; line-height: 1.2; letter-spacing: -.2px; }
.money-hud-pane-filtered .money-hud-scroll { opacity: .7; }
@container money-panel (max-width: 650px) {
  .money-hud-filterbar { padding: 5px 6px; gap: 6px; }
  .money-hud-filter-label { display: none; }
  .money-hud-filters { width: 100%; gap: 4px; }
  .money-hud-filters button { min-height: 40px; padding: 6px 10px; font-size: 10px; }
  .money-hud-pane-head { flex-basis: 70px; height: 70px; padding: 10px 9px; gap: 6px; }
  .money-hud-pane-head h3 { font-size: 23px; }
  .money-hud-pane-caption { font-size: 6px; letter-spacing: .3px; }
  .money-hud-record-count strong { font-size: 22px; }
  .money-hud-record-count > span { font-size: 6px; letter-spacing: 0; }
  .money-hud-scroll { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 7px 5px; scrollbar-gutter: auto; }
  .money-hud-card { height: 276px; min-height: 276px; padding: 10px 8px 0; grid-template-rows: 27px 34px 36px 31px 27px 25px 17px minmax(44px, 1fr); row-gap: 3px; }
  .money-hud-entity { font-size: 9px; }
  .money-hud-record-title { font-size: 11px; line-height: 1.4; }
  .money-hud-amount { font-size: clamp(17px, 5.4cqw, 28px); letter-spacing: -1px; }
  .money-hud-amount-missing { font-size: clamp(14px, 4.3cqw, 21px); letter-spacing: -.5px; }
  .money-hud-classification { flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; font-size: 8px; }
  .money-hud-classification > span { max-width: 100%; }
  .money-hud-status { padding: 2px 4px; }
  .money-hud-period { font-size: 9px; line-height: 1.4; }
  .money-hud-attribution { font-size: 8px; }
  .money-hud-trace { font-size: 7px; gap: 3px; }
  .money-hud-card-actions { margin: 0 -8px; grid-template-columns: minmax(0, 1fr) 40px; }
  .money-hud-card-actions button { padding: 0 8px; font-size: 10px; }
  .money-hud-footnote { padding: 6px 8px; font-size: 8px; }
  .money-hud-pair .money-hud-pane-head h3 { font-size: 12px; }
  .money-hud-pair .money-hud-pane-caption { font-size: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .money-hud * { scroll-behavior: auto; }
}
@container money-panel (max-width: 650px) {
  .money-hud-filterbar { padding-top: 4px; padding-bottom: 4px; }
  .money-hud-filters button { min-height: 36px; }
  .money-hud-pane-head { flex-basis: 56px; height: 56px; padding-top: 7px; padding-bottom: 7px; }
  .money-hud-pane-head h3 { font-size: 21px; }
  .money-hud-pane-caption { margin-bottom: 3px; }
  .money-hud-record-count strong { font-size: 20px; }
}
@media(max-width:950px) and (orientation:landscape) and (max-height:520px) {
 .money-hud-pane-head { display:none; }
 .money-hud-filterbar { min-height:31px; padding:3px 8px; }
 .money-hud-filters button { min-height:25px; height:25px; padding:3px 9px; font-size:9px; }
 .money-hud-footnote { padding:3px 8px; font-size:7px; height:19px; min-height:19px; }
 .money-hud-scroll { padding:5px; gap:7px; }
 .money-hud-card { height:142px; min-height:142px; padding:6px 8px 0; grid-template-rows:14px 25px 24px 17px 0 17px 0 28px; row-gap:1px; }
 .money-hud-entity { font-size:8px; -webkit-line-clamp:1; }
 .money-hud-record-title { font-size:9px; line-height:1.3; }
 .money-hud-amount { font-size:21px; }
 .money-hud-classification { flex-direction:row; font-size:7px; align-items:center; justify-content:space-between; }
 .money-hud-status { padding:2px; }
 .money-hud-attribution { font-size:7px; }
 .money-hud-period,.money-hud-trace { display:none; }
 .money-hud-card-actions { margin:0 -8px; }
 .money-hud-card-actions button { font-size:8px; padding:0 8px; }
}
