* {
    box-sizing: border-box;
}

:root {
    --imgcols: 2;
}

@media screen and (min-width: 800px) {
    :root {
        --imgcols: 1;
    }
}

html {
    scroll-behavior: smooth;
}

@media screen and (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
    font-family: system,Helvetica Neue,Helvetica,sans-serif;
    font-size: 16px;
    color: rgb(77, 86, 89);
}

.compat-table {
    grid-column: 1/-1;
    max-width: 100%;
    overflow-x: auto;
    text-align: center;
}

table {
    border-collapse: collapse; /* Use 'collapse' for better spacing */
}

table td {
    padding: 0.5em;
    border: 1px solid #ccc; /* Add a border to separate cells */
}

td:not(:empty) {
    background: lightgreen;
}

thead {
    background: none;
}

thead tr:first-child td {
    border-bottom: 2px solid gray; /* Increase the border thickness for headers */
    font-weight: bold;
    background: none;
}

td:first-child, td:nth-child(2) {
    background: none; /* Feature Name and Standardisation don't have implementation states, so don't highlight */
}

main {
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1em;
    max-width: 1024px;
}

h1, h2, h3 {
    grid-column: 1/-1;
}

.targetlink {
    color: grey;
    font-size: 0.8em;
    text-decoration: none;
}

table {
    grid-column: 1/span 4;
}

figure {
    grid-column-end: span 1;
    grid-column-end: span var( --imgcols);
}

figure a.img-a {
    display: inline-block;
    width: 100%;
    line-height: 0;
    position: relative;
    border: 3px solid #24aef4;
    padding-bottom: 66%;
    overflow: hidden;
}

figure a.img-a:hover img {
    transform: scale(1.2);
}

figure a.img-a img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s ease-out;
}

figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin: 0;
}

figcaption {
    margin-top: 0.5em;
}

footer {
    grid-column: 1/-1;
    padding-top: 1em;
    border-top: 1px solid grey;
}

nav[role="tablist"], .tabs {
    grid-column: 1/-1;
    max-width: 100%;
}


nav[role="tablist"] {
    border-bottom: 1px solid grey;
    margin-bottom: -1em;
    overflow-x: auto;
    white-space: nowrap;
    z-index: 2;
}

nav[role="tablist"] > a {
    background: #bcccd4;
    padding: 0.5em 0.5em 0.2em 0.5em;
    border-bottom: 2px solid cornflowerblue;
    display: inline-block;
}

nav[role="tablist"] > a:target {
    font-weight: bold;
}

.tabs {
    padding: 1em;
    background: #bcccd4;
}

.tabs > article:not(:target):not(.default-fallback) {
    display: none;
}

.tabs > article:target ~ .default-fallback {
    display: none;
}

.tabs > article {
    margin-top: -5em;
    padding-top: 5em;
    pointer-events: painted;
}

.tabs img {
    max-width: 100%;
}

*:focus {
    outline: 3px solid #24aef4;
}
