#CPP_TEST_BANNER { position: sticky; top: 0; z-index: 2; }
.grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.actions, nav { display: flex; flex-wrap: wrap; gap: .65rem; }
nav { justify-content: flex-start; }
button, a.btn, summary { min-height: 44px; }
summary { cursor: pointer; padding-block: .7rem; }
button:disabled { opacity: .55; cursor: default; }
:is(button, a, input, select, summary):focus-visible { outline: 3px solid #60a5fa; outline-offset: 3px; }
.check { display: flex; gap: .65rem; align-items: center; min-height: 44px; }
.check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: #245ac5; }
.scan-item { border-inline-start-width: 4px; }
.scan-item[data-state="saved"] { border-inline-start-color: #34d399; }
.scan-item:is([data-state="failed"],[data-state="rejected"],[data-state="duplicate"]) { border-inline-start-color: #f59e0b; }
.scan-item h3, .scan-item pre, .trace-fields { overflow-wrap: anywhere; }
.scan-item img { max-width: 100%; max-height: 380px; object-fit: contain; }
.scan-item pre { white-space: pre-wrap; }
.trace-fields { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.trace-fields dd { margin: 0; }
.trace-fields dt { color: var(--muted); }
#history, #trace { scroll-margin-top: 5rem; }
@media (max-width: 540px) {
    main { padding: 12px; }
    section { padding: 14px; }
    .money { font-size: 1.65rem; }
    .actions button { flex-grow: 1; }
    nav a.btn { padding: 9px 10px; }
}
