
@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-Medium.woff2') format('woff2'),
         url('fonts/Inter-Medium.woff') format('woff');
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-Bold.woff2') format('woff2'),
         url('fonts/Inter-Bold.woff') format('woff');
    font-weight: bold;
}


html {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    font-size: 1.1rem;
}

a {
    color: #22a;
    text-decoration: none;
}

a:visited {
    color: #a2a;
}

a:hover {
    text-decoration: underline;
}

.switch-language, .switch-language:visited {
    color: #444;
    font-size: 1.2em;
    float: left;
    text-decoration: underline;
    padding: 4px;
    margin-left: 5px;
}

.navigation {
    list-style: none;
    margin-right: 2px;
    margin-top: 2px;
    margin-left: auto;
    display: block;
    text-align: right;
    /* inline block fix */
    font-size: 0px;
}
    body > .navigation {
        margin-top: 12px;
        margin-right: 12px;
    }

.navigation li {
    display: inline-block;
    padding: 7px 15px;
    font-size: 1.1rem;
    text-align: center;
    border-width: 0px 1px;
    border-style: solid;
    border-color: #444;
}
    footer .navigation li {
        color: white;
        border-color: white
    }

.navigation a {
    color: inherit;
}

.navigation li + li {
    border-left: none;
}

body {
    margin: 0;
}

.content {
    margin: 4px;
}

footer {
    background-color: #d11;
    display: flex;
    justify-content: space-between;
    padding: 10px;
}

.logo {
    display: inline-block;
    height: 45px;
    width: auto;
}

footer .navigation {
    display: inline-block;
}

h1 {
    font-weight: bold;
    display: table;
    font-size: 3.5em;
    line-height: 1.1;
    padding: 5px 15px;
    color: white;
    background-color: #d11;
    clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

.main-title {
    margin: 20px 5px;
    padding: 15px 25px;
    font-size: 7rem;
    display: block;
    clip-path: polygon(20px 0, 100% 0, calc(100% - 20px) 100%, 0 100%);
}

.main-subtitle, .main-preamble {
    margin-left: 30px;
}

.main-subtitle {
    font-size: 1.5rem;
}
    .main-subtitle a {
        color: inherit;
        text-decoration: none;
    }
        .main-subtitle a:hover {
            text-decoration: underline;
        }
        .main-subtitle a::after {
            content: " →";
            font-weight: bold;
        }

.preamble {
    margin-top: 10px;
    font-weight: bold;
    font-size: 1.2rem;
}

h2 {
    font-size: 2.5rem;
}

.extra-info {
    font-weight: bold;
    margin-bottom: 1rem;
}

.examples-container {
    margin: 50px 25px;
    --hovered: 0;
}

.script .examples-container {
    overflow-x: hidden;
}

.noscript .examples-container {
    overflow-x: scroll;
}

.examples {
    --carousel-steps: 0;
    list-style: none;
    white-space: nowrap;
    font-size: 0;
    position: relative;
    width: 100%;
    padding: 0;
    margin: 0;
    /* height: 100px; */
    left: calc(50% * var(--carousel-steps))
}

.examples-container:hover, .examples-container:active {
    --hovered: 1;
}

.examples li { 
    box-sizing: border-box;
    font-size: 1rem;
    display: inline-block;
    width: 50%;
    white-space: normal;
    padding: 5px;
    vertical-align: top;
}

.no-var-support .examples li {
    width: 100%;
}

.examples-button-container {
    margin-left: auto;
    margin-right: 0;
    /* float: right; */
}

.script .examples-button {
    background: none;
    border: none;
    border-radius: none;
    line-height: 100%;
    padding: 5px;
    font-size: 2rem;
    transition: background 0.5s;
}

    .examples-button:hover {
        background: #999;
    }

.noscript .examples-button {
    display: none;
}

.replacethis {
    color: red
}

blockquote {
    border-left: 5px solid #666;
    padding: 2px;
    background: #ddd;
}

    blockquote .copy-button {
        float: right;
        padding: 2px;
        margin: 2px;
        border-radius: 4px;
        background: #999;
        cursor: pointer;
    }

    blockquote .copy-button::after {
        content: '';
        background-image: url('./images/copy.png');
        background-size: 15px 21px;
        width: 15px;
        height: 21px;
        display: block;
    }


@media (min-width: 90em) {
    .content {
        padding: 0 20%
    }
}

@media (min-width: 80em) {
    .content {
        padding: 0 10%
    }
}

/* based on the width of the word "flytträkning" */
@media (min-width: 70em) {
    .main-title {
        font-size: 9rem;
        padding: 15px 35px;
        clip-path: polygon(30px 0, 100% 0, calc(100% - 30px) 100%, 0 100%);
    }
    .main-subtitle, .main-preamble {
        margin-left: 40px;
    }
    .examples-container {
        margin-left: 35px;
        margin-right: 35px;
    }
}

/* default is 7rem at width 50em-70em */

@media (max-width: 50em) {
    .main-title {
        font-size: 5rem;
    }
    .examples {
        left: calc(100% * var(--carousel-steps))
    }
    .examples li { 
        width: 100%
    }
}

@media (max-width: 35em) {
    .main-title {
        font-size: 3rem;
    }
    .main-subtitle {
        font-size: 1.5rem;
    }
}

/* touch screens */
@media (hover: none) {
    .examples-button {
        padding: 10px;
        font-size: 2em;
    }
    .examples-container {
        --hovered: 1;
    }
}
