


.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size-adjust: 0.52;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    transition: background-color var(--transition), color var(--transition);
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: visible;
    position: relative;
}

.active-section {
    display: flex !important;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    overflow-y: visible;
}

body.page-scroll-benchmark {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
}

main.page-scroll-benchmark {
    overflow: visible;
    flex: 1;
}

body.page-scroll-benchmark .active-section {
    overflow-y: visible;
}


*:focus-visible {
    outline: 2px solid var(--bar-compare);
    outline-offset: 2px;
}

button:focus-visible,
select:focus-visible,
input:focus-visible {
    outline: 2px solid var(--bar-compare);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--bar-compare);
    color: var(--bg-primary);
    padding: 8px 16px;
    z-index: 1000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

.swipe-hint {
    display: none;
    text-align: center;
    padding: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.viz-fullscreen-target {
    position: relative;
}

.viz-fullscreen-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid color-mix(in srgb, var(--border-color) 82%, white 18%);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg-secondary) 82%, rgba(5, 10, 18, 0.4));
    color: var(--text-primary);
    cursor: pointer;
    z-index: 60;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0.88;
    transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.viz-fullscreen-btn:hover,
.viz-fullscreen-btn:focus-visible,
.viz-fullscreen-target.viz-fullscreen-active > .viz-fullscreen-btn {
    opacity: 1;
    transform: translateY(-1px);
    background: color-mix(in srgb, var(--bg-secondary) 88%, var(--bar-compare) 12%);
    border-color: color-mix(in srgb, var(--bar-compare) 55%, var(--border-color) 45%);
}

.viz-fullscreen-btn svg {
    width: 1rem;
    height: 1rem;
    pointer-events: none;
}

.viz-fullscreen-target:fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow: auto !important;
    background: var(--bg-primary) !important;
}

.viz-fullscreen-target:fullscreen > .viz-fullscreen-btn {
    display: none !important;
}

.viz-fullscreen-target:fullscreen::backdrop {
    background:
        radial-gradient(circle at top, rgba(74, 144, 217, 0.12), transparent 40%),
        rgba(4, 7, 12, 0.96);
}

.viz-fullscreen-target:fullscreen canvas,
.viz-fullscreen-target:fullscreen svg {
    max-width: 100%;
    max-height: 100%;
}

.compare-panel-grid.viz-fullscreen-target:fullscreen {
    aspect-ratio: auto;
}

@media (max-width: 768px) {
    .swipe-hint {
        display: block;
    }
}