@import url('https://fonts.googleapis.com/css2?family=Istok+Web&display=swap');

body {
    font-family: 'Istok Web', sans-serif;
    background-color: #f8f9fb;
    color: #222;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header, nav, main, footer {
    margin: 10px;
    padding: 15px;
    border-radius: 8px;
}

header {
    background-color: #ffffff;
    border: 1px solid #ddd;
}

nav {
    background-color: #ffffff;
    border: 1px solid #ddd;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: #444;
    font-weight: bold;
    padding-bottom: 3px;
}

nav a:hover {
    color: #000;
}

nav a.active {
    border-bottom: 2px solid #000;
}

main {
    background-color: #ffffff;
    border: 1px solid #ddd;
    flex: 1;
}

h1, h2, h3 {
    font-family: "Times New Roman", serif;
}

p {
    text-indent: 20px;
    margin-bottom: 12px;
}

a {
    color: #555;
}

a:hover {
    color: #000;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th, td {
    border: 1px solid #ccc;
    padding: 6px;
}

footer {
    background-color: #ffffff;
    border: 1px solid #ddd;
    text-align: center;
}

footer h2 {
    margin-bottom: 8px;
}

footer p {
    text-indent: 0;
    margin: 4px 0;
}

footer ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

footer a {
    text-decoration: none;
    color: #444;
}

footer a:hover {
    color: black;
}

footer address {
    font-style: normal;
    color: #666;
    margin-top: 10px;
}

/* Download button */
.btn-download {
    display: inline-block;
    margin-top: 8px;
    padding: 10px 20px;
    background-color: #222;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-family: 'Istok Web', sans-serif;
}

.btn-download:hover {
    background-color: #000;
    color: #fff;
}

@media (max-width: 600px) { /*phone*/
    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    footer ul {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    header, nav, main, footer {
        margin: 6px;
        padding: 10px;
    }

    h1 { font-size: 1.4em; }
    h2 { font-size: 1.2em; }

    video {
        width: 100%;
    }

    pre {
        font-size: 0.8em;
        overflow-x: auto;
    }

    table {
        font-size: 0.85em;
        display: block;
        overflow-x: auto;
    }
}

@media (min-width: 601px) and (max-width: 1024px) { /* Pad */
    header, nav, main, footer {
        margin: 8px;
        padding: 12px;
    }

    video {
        width: 100%;
    }
}

@media (min-width: 1025px) { /* Desktop */
    body {
        max-width: 1100px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media print {
    body {
        background: white;
        color: black;
    }
    h1, h2, h3 {
        font-family: Arial, sans-serif;
    }
    p {
        font-family: "Times New Roman", serif;
    }
    nav {
        display: none;
    }
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 10px;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    z-index: 1000;
    transition: top 0.1s;
}

.skip-link:focus {
    top: 10px;
}

a:focus,
button:focus,
video:focus {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}

nav a[aria-current="page"] {
    border-bottom: 2px solid #000;
}