body {
    background: #f6f7f9;
}

.app-container {
    max-width: 960px;
}

.dataset-summary {
    column-gap: 1.5rem;
}

.antigen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: .35rem .75rem;
    margin-left: 1rem;
}

.antigen-tag {
    border-radius: 999px;
    line-height: 1.15;
}

.result-card .display-4 {
    letter-spacing: -0.03em;
}

.result-table th,
.metadata-table th {
    width: 210px;
    font-weight: 600;
}

code.text-break {
    word-break: break-all;
}

@media (max-width: 575.98px) {
    .result-table th,
    .metadata-table th {
        width: 42%;
    }
}

.content-block > :last-child {
    margin-bottom: 0;
}

.disclaimer-block {
    line-height: 1.5;
}

.analytics-container {
    max-width: 1200px;
}

.analytics-cards .card {
    min-height: 118px;
}

.analytics-recent-table {
    font-size: .875rem;
}

.analytics-recent-table code {
    white-space: nowrap;
}


.ocr-paste-zone {
    border-style: dashed !important;
    cursor: pointer;
    min-height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ocr-paste-zone:focus {
    outline: 3px solid rgba(13, 110, 253, .25);
    outline-offset: 2px;
}

.ocr-preview-box {
    min-height: 190px;
    max-height: 420px;
    overflow: auto;
}

.ocr-preview-box img {
    display: block;
    max-height: 390px;
    object-fit: contain;
}

.ocr-raw-text {
    max-height: 220px;
    overflow: auto;
    white-space: pre-wrap;
    font-size: .8rem;
}

/* Accessibility enhancements */
.skip-link {
    position: fixed;
    top: .5rem;
    left: .5rem;
    z-index: 1080;
    padding: .75rem 1rem;
    background: #fff;
    border: 2px solid currentColor;
    border-radius: .375rem;
}

:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

.btn,
.form-control,
.form-select {
    min-height: 44px;
}

.btn-sm {
    min-height: 44px;
}

.form-check-input {
    width: 1.4rem;
    height: 1.4rem;
    margin-top: .1rem;
    margin-right: 0.55rem;
}

.form-check-label {
    min-height: 1.5rem;
    display: inline-flex;
    align-items: center;
    padding-inline-start: .15rem;
}

fieldset legend {
    float: none;
    width: auto;
    padding-top: 20px
}

legend {
    margin-left: 1rem;
}

[tabindex="-1"]:focus {
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* Keep checkbox/radio targets comfortably usable for touch and limited dexterity. */
.form-check {
    min-height: 44px;
    display: flex;
    align-items: center;
}

.form-check-label {
    min-height: 44px;
    padding-top: .55rem;
    padding-bottom: .55rem;
}

/* Do not depend on colour alone for invalid input state. */
[aria-invalid="true"] {
    border-width: 2px;
}

@media (forced-colors: active) {
    :focus-visible,
    .ocr-paste-zone:focus {
        outline: 3px solid Highlight;
    }

    .border,
    .card,
    .alert {
        border-color: CanvasText !important;
    }
}
