/* All colors, shadows, radii and fonts come from these variables; the light
   theme below only redefines them. */
:root {
    /* Dark theme (default) */
    --bg-body: #141316;
    --bg-surface: #1e1c21;
    --bg-surface-hover: #27242b;
    --text-primary: #f2f2f2;
    --text-secondary: #a3a0a8;
    --accent-color: #c99aff;
    --accent-hover: #d6b2ff;
    --accent-contrast: #2a1533;
    --border-color: rgba(255, 255, 255, 0.08);

    --status-fixed-bg: rgba(134, 197, 165, 0.15);
    --status-fixed-text: #8fc7ab;
    --status-pending-bg: rgba(224, 130, 118, 0.15);
    --status-pending-text: #e08276;
    /* -fill is for chart bars and swatches, -text for badge text. They only
       differ in light mode, where the fill is too light for small text. */
    --status-fixed-later-bg: rgba(230, 180, 34, 0.15);
    --status-fixed-later-text: #e6b422;
    --status-fixed-later-fill: #e6b422;

    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.35);
    --shadow-md: 0 12px 24px -8px rgba(0, 0, 0, 0.5);
    --shadow-accent: 0 12px 24px -10px rgba(201, 154, 255, 0.45);
    --accent-glow-rgb: 201, 154, 255;
    --radius-md: 14px;
    --radius-full: 9999px;

    --ff-display: 'Space Grotesk', sans-serif;
    --ff-mono: 'DM Mono', monospace;
}

[data-theme="light"] {
    --bg-body: #f7f6f9;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f0edf5;
    --text-primary: #211f26;
    --text-secondary: #6b6773;
    --accent-color: #78387b;
    --accent-hover: #8e4a92;
    --accent-contrast: #ffffff;
    --border-color: rgba(33, 31, 38, 0.1);

    --status-fixed-bg: rgba(74, 140, 106, 0.14);
    --status-fixed-text: #4a8c6a;
    --status-pending-bg: rgba(166, 74, 58, 0.14);
    --status-pending-text: #a64a3a;
    --status-fixed-later-bg: rgba(192, 138, 26, 0.14);
    --status-fixed-later-text: #8f6410;
    --status-fixed-later-fill: #c08a1a;

    --shadow-sm: 0 1px 2px 0 rgba(33, 31, 38, 0.08);
    --shadow-md: 0 12px 24px -8px rgba(33, 31, 38, 0.15);
    --shadow-accent: 0 12px 24px -10px rgba(120, 56, 123, 0.25);
    --accent-glow-rgb: 120, 56, 123;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.no-js .js-only {
    display: none !important;
}

.js .no-js-only {
    display: none !important;
}

.trends-chart-fallback {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--ff-mono);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}

/* Faint noise texture over the page background. Content sits above it with z-index: 1. */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: .5;
}

.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    fill: currentColor;
    stroke: currentColor;
}

.icon-sprite {
    display: none;
}

/* Navbar */

.navbar {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 1.5rem;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-full);
    background: color-mix(in srgb, var(--accent-color) 15%, transparent);
}

.logo h1 {
    font-family: var(--ff-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.theme-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.55rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.theme-btn:hover {
    background-color: var(--bg-surface-hover);
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.nav-controls {
    display: flex;
    gap: 0.5rem;
}

.theme-btn:focus-visible,
.search-clear-btn:focus-visible,
.link-btn:focus-visible,
.page-btn:focus-visible,
.copy-link-btn:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

mark.highlight {
    background-color: color-mix(in srgb, var(--accent-color) 35%, transparent);
    color: var(--text-primary);
    padding: 0 3px;
    border-radius: 4px;
    font-weight: 600;
}

.copy-link-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background-color 0.2s, transform 0.2s;
    margin-top: 0.5rem;
}

.masonry-layout .copy-link-btn {
    margin-top: 0;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.copy-link-btn:hover {
    color: var(--accent-color);
    background-color: color-mix(in srgb, var(--accent-color) 15%, transparent);
}

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--accent-color);
    padding: 0.8rem 1.4rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    font-family: var(--ff-mono);
    font-size: 0.85rem;
    z-index: 1000;
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

[data-view="timeline"] .icon-timeline { display: block; }
[data-view="timeline"] .icon-masonry { display: none; }
[data-view="masonry"] .icon-timeline { display: none; }
[data-view="masonry"] .icon-masonry { display: block; }

/* Hero, quick links, search and filters */

.hero {
    position: relative;
    z-index: 1;
    padding: 4rem 1.5rem 2rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    font-family: var(--ff-display);
    font-size: clamp(40px, 6vw, 56px);
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.hero p {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    letter-spacing: .3px;
    margin-bottom: 2rem;
}

.quick-links {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    color: var(--text-secondary);
    font-family: var(--ff-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
}

.link-btn .icon {
    font-size: 1.125rem;
}

.link-btn:hover {
    background: var(--accent-color);
    color: var(--accent-contrast);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent);
}

.search-wrapper {
    position: relative;
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.15rem;
}

#search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3.25rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--ff-display);
    font-size: 1.05rem;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
}

#search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-color) 20%, transparent);
}

.search-clear-btn {
    position: absolute;
    right: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    padding: 0.25rem;
}

.search-clear-btn:hover {
    color: var(--accent-color);
}

.hidden {
    display: none !important;
}

.filter-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    font-family: var(--ff-mono);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.filter-chips {
    display: flex;
    gap: 4px;
    background: var(--bg-surface);
    padding: 4px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
}

.chip {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 6px 16px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--ff-mono);
    text-transform: uppercase;
    border-radius: var(--radius-full);
}

.chip:hover {
    color: var(--text-primary);
}

.chip.active {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: var(--accent-contrast);
    font-weight: 700;
    box-shadow: var(--shadow-accent);
}

.sort-dropdown {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 30px 6px 14px;
    font-size: 11px;
    font-family: var(--ff-mono);
    cursor: pointer;
    outline: none;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.filter-group:has(.sort-dropdown) {
    position: relative;
}

.filter-group:has(.sort-dropdown)::after {
    content: "";
    position: absolute;
    right: 13px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid var(--text-secondary);
    border-bottom: 1.5px solid var(--text-secondary);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.sort-dropdown:focus {
    border-color: var(--accent-color);
}

/* Summary stats */

.stats {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.stat {
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 16px 18px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-num {
    font-family: var(--ff-display);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-top: 4px;
}

.stat.done .stat-num { color: var(--status-fixed-text); }
.stat.pending .stat-num { color: var(--status-pending-text); }

/* Trends chart. The bars are built by renderTrendsChart() in script.js. */

.trends {
    position: relative;
    z-index: 1;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    scroll-margin-top: 88px;
}

.trends-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}

.trends-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.trends-title h3 {
    font-family: var(--ff-display);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.trends-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.1rem;
    margin-bottom: 1.1rem;
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.legend-swatch {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    display: inline-block;
}

.legend-swatch--fixed {
    background-color: var(--status-fixed-text);
}

.legend-swatch--fixed-later {
    background-color: var(--status-fixed-later-fill);
}

.legend-swatch--pending {
    background-color: var(--status-pending-text);
}

.legend-group {
    font-weight: 600;
    color: var(--text-primary);
}

.legend-swatch--launch {
    background-color: var(--accent-color);
    opacity: 0.35;
}

.legend-swatch--carried {
    background-color: var(--status-fixed-later-fill);
    opacity: 0.4;
}

.legend-item--launch,
.legend-item--carried,
.trends-note-carried,
.trends-note-timeline {
    display: none;
}

.trends[data-carried="true"] .legend-item--carried {
    display: inline-flex;
}

.trends[data-carried="true"] .trends-note-carried {
    display: inline;
}

.trends-options {
    margin: -0.4rem 0 1.1rem;
    font-size: 11px;
}

.trends-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.trends-toggle input {
    accent-color: var(--accent-color);
    margin: 0;
}

.legend-item + .legend-group {
    margin-left: 0.6rem;
}

.trends[data-range="timeline"] .legend-item--launch {
    display: inline-flex;
}

.trends[data-range="timeline"] .trends-note-timeline {
    display: inline;
}

.legend-hint {
    margin-left: auto;
    opacity: 0.75;
}

.trends-chart-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
}

.trends-chart {
    display: block;
    width: 100%;
    height: 280px;
}

.trends-chart text {
    font-family: var(--ff-mono);
    font-size: 11px;
}

.timeline-band {
    fill: var(--accent-color);
    opacity: 0.08;
}

.timeline-band-label {
    fill: var(--text-secondary);
}

.timeline-tick {
    stroke: var(--accent-color);
    stroke-width: 2;
    stroke-linecap: round;
}

.timeline-grid {
    stroke: var(--border-color);
    stroke-width: 1;
}

.timeline-year {
    fill: var(--text-secondary);
}

.trend-baseline {
    stroke: var(--text-secondary);
    stroke-width: 1;
    opacity: 0.6;
}

.trend-bar-hit {
    fill: transparent;
    cursor: pointer;
}

.trend-bar-fixed,
.trend-bar-fixed-later,
.trend-bar-carried,
.trend-bar-pending {
    pointer-events: none;
    transition: filter 0.15s ease;
}

.trend-bar-fixed {
    fill: var(--status-fixed-text);
}

.trend-bar-fixed-later {
    fill: var(--status-fixed-later-fill);
}

.trend-bar-carried {
    fill: var(--status-fixed-later-fill);
    opacity: 0.4;
}

.trend-bar-pending {
    fill: var(--status-pending-text);
}

.trend-bar-group:hover .trend-bar-fixed,
.trend-bar-group:hover .trend-bar-fixed-later,
.trend-bar-group:hover .trend-bar-carried,
.trend-bar-group:hover .trend-bar-pending,
.trend-bar-group:focus-visible .trend-bar-fixed,
.trend-bar-group:focus-visible .trend-bar-fixed-later,
.trend-bar-group:focus-visible .trend-bar-carried,
.trend-bar-group:focus-visible .trend-bar-pending {
    filter: brightness(1.2);
}

.trend-bar-group:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.trends-tooltip {
    margin-top: 0.85rem;
    padding: 0.6rem 1rem;
    background-color: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--ff-mono);
    font-size: 12px;
    color: var(--text-primary);
    min-height: 1.2em;
}

.trends-note {
    margin-top: 0.85rem;
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-secondary);
}

@media (prefers-reduced-motion: reduce) {
    .trend-bar-fixed,
    .trend-bar-fixed-later,
    .trend-bar-carried,
    .trend-bar-pending {
        transition: none;
    }
}

@media (max-width: 640px) {
    .trends {
        padding: 1.1rem;
    }

    #trends-range {
        width: 100%;
    }

    #trends-range .chip {
        flex: 1;
        padding: 6px 6px;
    }
}

main {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    scroll-margin-top: 88px;
}

/* Driver cards. Shared by both views; masonry overrides come further down. */

.grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 3rem;
    position: relative;
}

.driver-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    display: grid;
    grid-template-columns: 140px 1fr;
    position: relative;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    animation: fadeIn 0.5s ease forwards;
    will-change: transform;
    scroll-margin-top: 88px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.driver-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-6px);
    box-shadow: var(--shadow-accent);
}

/* Brief pulse on the card a #driver-<version> link points to. */
.driver-card.highlight-pulse {
    animation: driver-highlight-pulse 1.3s ease-out 2;
    border-color: var(--accent-color);
}

@keyframes driver-highlight-pulse {
    0% { box-shadow: 0 0 0 0 rgba(var(--accent-glow-rgb), 0.55); }
    70% { box-shadow: 0 0 0 16px rgba(var(--accent-glow-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--accent-glow-rgb), 0); }
}

@media (prefers-reduced-motion: reduce) {
    .driver-card.highlight-pulse {
        animation: none;
        box-shadow: 0 0 0 3px rgba(var(--accent-glow-rgb), 0.4);
    }
}

.driver-header {
    background-color: var(--bg-surface-hover);
    padding: 1.5rem 1rem;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

/* List view: the header column is narrow, so the version runs vertically.
   The 180deg rotation makes it read bottom to top. */
.driver-version {
    font-family: var(--ff-display);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--accent-color);
    text-decoration: none;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
}

.driver-version:hover {
    text-decoration: underline;
}

.driver-version:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
    border-radius: 4px;
}

.bug-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1px;
    background-color: var(--border-color);
}

/* Masonry view: CSS columns, cards flow in DOM order. */
.masonry-layout {
    display: block;
    column-count: 3;
    column-gap: 1.5rem;
    margin-bottom: 3rem;
}

.masonry-layout .driver-card {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    margin-bottom: 1.5rem;
    break-inside: avoid;
}

.masonry-layout .driver-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-accent);
}

.masonry-layout .driver-header {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 1.1rem;
    writing-mode: horizontal-tb;
}

.masonry-layout .driver-version {
    writing-mode: horizontal-tb;
    transform: none;
}

.masonry-layout .bug-list {
    display: block;
}

.masonry-layout .bug-item {
    border-bottom: 1px solid var(--border-color);
}

.masonry-layout .bug-item:last-child {
    border-bottom: none;
}

.bug-item {
    background-color: var(--bg-surface);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.85rem;
    transition: background-color 0.2s;
}

.bug-item:hover {
    background-color: var(--bg-surface-hover);
}

.bug-desc--empty {
    color: var(--text-secondary);
    font-style: italic;
}

.bug-desc {
    font-family: var(--ff-mono);
    font-size: 0.85rem;
    color: var(--text-primary);
    word-break: break-word;
    line-height: 1.6;
}

.bug-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.bug-ids {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-right: auto;
    font-family: var(--ff-mono);
    font-size: 11px;
    color: var(--text-secondary);
}

/* Channel, release date and release notes link under the version. */
.driver-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem 0.6rem;
    margin-top: 0.4rem;
    font-family: var(--ff-mono);
    font-size: 11px;
    color: var(--text-secondary);
}

.driver-meta a {
    color: var(--accent-color);
}

.driver-channel {
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.85rem;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-family: var(--ff-mono);
    border-radius: var(--radius-full);
}

.status-fixed {
    background-color: var(--status-fixed-bg);
    color: var(--status-fixed-text);
}

.status-fixed-later {
    background-color: var(--status-fixed-later-bg);
    color: var(--status-fixed-later-text);
}

.status-pending {
    background-color: var(--status-pending-bg);
    color: var(--status-pending-text);
}

/* Pagination (buttons built by renderPagination() in script.js) */

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding-bottom: 4rem;
    flex-wrap: wrap;
}

.page-btn {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    min-width: 38px;
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-family: var(--ff-mono);
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s;
    text-transform: uppercase;
    border-radius: var(--radius-full);
}

.page-ellipsis {
    border: none;
    background-color: transparent;
    cursor: default;
}

.page-btn:not(.page-ellipsis):hover:not(:disabled) {
    border-color: var(--accent-color);
    color: var(--accent-contrast);
    background: var(--accent-color);
}

.page-btn.active,
.page-btn.active:hover {
    border-color: var(--accent-color);
    color: var(--accent-contrast);
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    box-shadow: var(--shadow-accent);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Footer, empty and loading states, breakpoints */

footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 4rem 1.5rem;
    color: var(--text-secondary);
    font-size: 11px;
    letter-spacing: 0.5px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-surface);
}

footer p {
    margin-bottom: 0.5rem;
}

.credit {
    font-size: 12px;
    margin-top: 1rem;
    color: var(--text-primary);
}

.credit strong {
    color: var(--accent-color);
}

.footer-links {
    margin-top: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
    font-weight: 500;
    font-size: 0.8rem;
}

.footer-links a .icon {
    font-size: 1.125rem;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.no-results,
.loading-state {
    column-span: all;
    text-align: center;
    padding: 4rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.no-results .icon,
.loading-state .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.clear-search-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--accent-color);
    padding: 0.6rem 1.25rem;
    cursor: pointer;
    font-family: var(--ff-mono);
    text-transform: uppercase;
    font-size: 11px;
    transition: all 0.2s;
    border-radius: var(--radius-full);
}

.clear-search-btn:hover {
    background: var(--accent-color);
    color: var(--accent-contrast);
    border-color: var(--accent-color);
}

@media (max-width: 1024px) {
    .masonry-layout {
        column-count: 2;
    }
}

@media (max-width: 800px) {
    .masonry-layout {
        display: block;
        column-count: 1;
    }

    .driver-card {
        grid-template-columns: 1fr;
    }

    .driver-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-accent);
    }

    .driver-header {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
        writing-mode: horizontal-tb;
    }

    .driver-version {
        writing-mode: horizontal-tb;
        transform: none;
        font-size: 1.4rem;
    }

    .bug-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .stats {
        flex-direction: column;
    }
    .filter-controls {
        flex-direction: column;
        gap: 1rem;
    }
}
