body {
    background-color: #fdf8f7;
}

a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: #ff653f;
    text-underline-offset: 2px;
}

a:visited {
    color: inherit;
    text-decoration-color: #ff653f;
}

a:hover {
    background-color: #ff653f;
    color: #fff;
    text-decoration: none;
}

header,
footer,
main {
    max-width: 660px;
    width: 100%;
    margin: 0 auto;
    margin-top: 2em;
    padding: 0 20px;
    box-sizing: border-box;
    color: #333;
    font-family: "PT Sans", sans-serif;
}

header .header-container {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 2em;
}

header .header-logo {
    flex-shrink: 0;
}

header .header-logo img {
    max-width: 80px;
    max-height: 80px;
    width: 100%;
    height: auto;
    display: block;
}

header .header-content {
    flex-grow: 1;
}

header .header-content h1 {
    margin: 0;
    margin-bottom: 8px;
}

header nav {
    font-size: 14px;
}

header nav a {
    margin: 0 4px;
}

ol.linenums {
    padding: 0;
    margin: 0;
    list-style-type: none;
}
ol.linenums li {
    padding: 0;
    margin: 0;
}
strong {
    color: #000;
}
h1 {
    margin-bottom: 12px;
}
h2 {
    margin-bottom: 6px;
}
td.code {
    width: 100%;
}
a.permalink {
    visibility: hidden;
    text-decoration: none;
}
h1:hover a.permalink {
    visibility: visible;
    color: #eee;
    font-size: 85%;
}
h2:hover a.permalink {
    visibility: visible;
    color: #eee;
    font-size: 85%;
}
h3:hover a.permalink {
    visibility: visible;
    color: #eee;
    font-size: 85%;
}
h4:hover a.permalink {
    visibility: visible;
    color: #eee;
    font-size: 85%;
}
h1 a.permalink:hover {
    color: #555;
}
h2 a.permalink:hover {
    color: #555;
}
h3 a.permalink:hover {
    color: #555;
}
h4 a.permalink:hover {
    color: #555;
}

pre {
    font-family: consolas, monospace;
    font-size: 80%;
    line-height: 1.5em;
    padding: 0.5em 1em;
    border-radius: 5px;
    background-color: #f2f2f2;
    text-shadow: 0 1px 0 white;
    overflow-x: auto;
}
code {
    font-family: consolas, monospace;
    font-size: 85%;
    color: #000;
    font-weight: bold;
}

footer {
    font-size: 14px;
    font-weight: italic;
}

footer img {
    max-width: 1em;
    max-height: 1em;
    margin-left: 0.2em;
}

/* Responsive styles for mobile devices */
@media (max-width: 640px) {
    header,
    footer,
    main {
        margin-top: 1em;
        padding: 0 15px;
    }

    header .header-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }

    header .header-logo img {
        max-width: 60px;
        max-height: 60px;
    }

    header .header-content h1 {
        font-size: 1.5em;
    }

    header nav {
        font-size: 13px;
    }

    header nav a {
        margin: 0 2px;
    }

    pre {
        font-size: 75%;
        padding: 0.4em 0.8em;
        overflow-x: auto;
        word-wrap: break-word;
    }

    code {
        font-size: 80%;
        word-wrap: break-word;
    }

    main img {
        max-width: 100%;
        height: auto;
    }

    main table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
