.results-grid { color: #1e293b; min-width: 0; }
.results-grid-controls { display: flex; align-items: end; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.results-grid-controls label { display: grid; gap: .35rem; font-size: .85rem; font-weight: 600; flex: 1 1 190px; max-width: 320px; }
.results-grid-comparison { padding: 1rem; background: #f0fdfa; border: 1px solid #99f6e4; border-radius: .65rem; margin-bottom: 1.25rem; overflow-wrap: anywhere; }
.results-grid-comparison p:last-child { margin-bottom: 0; }
.results-grid-meetings { list-style: none; padding: 0; margin: 0; }
.results-grid-meetings li { padding: .8rem 0; border-top: 1px solid #b8ded7; }
.results-grid-match { font-size: .95rem; font-weight: 650; margin: .25rem 0; }
.results-grid-help { font-size: .8rem; line-height: 1.6; color: #475569; margin: .6rem 0; }
.results-grid-matrix summary { font-weight: 650; color: #0f766e; cursor: pointer; margin-bottom: .75rem; }
.results-grid-scroll { max-width: 100%; overflow-x: auto; border: 1px solid #cbd5e1; border-radius: .5rem; isolation: isolate; }
.results-grid-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .78rem; font-variant-numeric: tabular-nums; background: #fff; }
.results-grid-table caption { caption-side: bottom; padding: .6rem; color: #475569; }
.results-grid-table td, .results-grid-table th { padding: 4px; border-right: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; text-align: center; min-width: 1.9rem; }
.results-grid-table th { background: #f1f5f9; color: #334155; font-weight: 650; }
.results-grid-table thead th { white-space: nowrap; }
.results-grid-table tr th:first-child { position: sticky; left: 0; z-index: 1; min-width: 0; text-align: left; white-space: nowrap; }
.results-grid-table thead th:first-child { white-space: normal; max-width: 7rem; }
.results-grid-table .results-grid-diagonal { background: #e2e8f0; color: #64748b; }
.results-grid-score { display: block; width: 100%; max-width: 6rem; padding: 4px; margin: 0; border: 0; border-radius: 5px; font: inherit; font-weight: 650; cursor: pointer; }
.results-grid-score:hover { text-decoration: underline; border-color: currentColor; }
.results-grid-score.result-win { background: #dcfce7; color: #166534; }
.results-grid-score.result-loss { background: #fee2e2; color: #991b1b; }
.results-grid-score.result-draw { background: #e2e8f0; color: #334155; }
.results-grid-score.result-pending { background: #eff6ff; color: #1e40af; }
.results-grid-table .is-selected { background: #ccfbf1; box-shadow: inset 0 0 0 2px #0f766e; }
.results-grid :is(button,select,summary,[tabindex]):focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
@media (max-width: 575.98px) {
    .results-grid-controls label { max-width: none; flex-basis: 100%; }
    .results-grid-controls button { min-height: 44px; }
    .results-grid-score { min-height: 32px; }
}
@media (prefers-reduced-motion: reduce) { .results-grid * { scroll-behavior: auto; } }

/* Page-level header: stays below the site navigation without an inner vertical scrollbar. */
.results-grid-floating-header { position: fixed; z-index: 1020; overflow: hidden; pointer-events: none; background: #f1f5f9; box-shadow: 0 2px 4px rgb(15 23 42 / 15%); }
.results-grid-floating-header .results-grid-table { table-layout: fixed; margin-bottom: 0; }
.results-grid-floating-header .results-grid-table thead th:first-child { position: relative; left: auto; z-index: 2; }
