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

body {
    font-family: Arial, sans-serif;
    font-size: 14px;
    background-color: #b0c4de;
    color: #000;
}

#wrapper {
    width: 780px;
    margin: 0 auto;
    background-color: #d6e8f5;
}

#header {
    background-color: #1a5276;
    color: #fff;
    text-align: center;
    padding: 16px;
}

#header h1 {
    font-size: 28px;
    letter-spacing: 4px;
    text-transform: uppercase;
}

#header p {
    font-size: 12px;
    color: #acd;
    margin-top: 4px;
}

#nav {
    background-color: #154360;
    display: flex;
}

#nav a {
    color: #fff;
    text-decoration: none;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    border-right: 1px solid #1a5276;
    letter-spacing: 1px;
}

#nav a:hover,
#nav a.active {
    background-color: #2980b9;
}

#content {
    display: flex;
    padding: 12px;
    gap: 12px;
}

#sidebar {
    width: 200px;
    flex-shrink: 0;
}

#main {
    flex: 1;
}

.sidebar-block {
    background-color: #a9cce3;
    border: 1px solid #5b8fa8;
    margin-bottom: 10px;
    padding: 8px;
}

.sidebar-block h3 {
    font-size: 12px;
    text-transform: uppercase;
    color: #154360;
    border-bottom: 1px solid #5b8fa8;
    padding-bottom: 4px;
    margin-bottom: 6px;
}

.sidebar-block ul {
    list-style: none;
    padding: 0;
}

.sidebar-block ul li {
    padding: 2px 0;
    font-size: 12px;
}

.sidebar-block ul li a {
    color: #154360;
    text-decoration: none;
}

.sidebar-block ul li a:hover {
    text-decoration: underline;
}

.news-item {
    border-bottom: 1px solid #5b8fa8;
    padding: 8px 0;
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    font-size: 12px;
    font-weight: bold;
    color: #154360;
}

.news-link {
    color: #1a5276;
    font-size: 13px;
}

.content-block {
    background-color: #eaf4fb;
    border: 1px solid #5b8fa8;
    padding: 12px;
    margin-bottom: 10px;
}

.content-block h2 {
    font-size: 16px;
    color: #154360;
    border-bottom: 1px solid #5b8fa8;
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.joke-card {
    background-color: #d6eaf8;
    border: 1px solid #5b8fa8;
    padding: 10px 14px;
    margin-bottom: 10px;
}

.joke-card p {
    font-size: 13px;
    line-height: 1.6;
}

.theory-list {
    list-style: none;
    padding: 0;
}

.theory-list li {
    border-bottom: 1px solid #a9cce3;
    padding: 8px 0;
}

.theory-list li a {
    color: #1a5276;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
}

.theory-list li a:hover {
    text-decoration: underline;
}

.theory-list li span {
    display: block;
    font-size: 11px;
    color: #555;
    margin-top: 2px;
}

#footer {
    background-color: #154360;
    color: #acd;
    text-align: center;
    font-size: 11px;
    padding: 8px;
}

html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

body {
    overflow-x: hidden;
}

@media (max-width: 820px) {
    #wrapper {
        width: 100%;
    }

    #content {
        flex-direction: column;
    }

    #sidebar {
        width: 100%;
    }

    #nav {
        flex-wrap: wrap;
    }

    #nav a {
        flex: 1 1 auto;
        text-align: center;
    }

    .compare-table {
        font-size: 11px;
    }

    pre.code-block {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    #header h1 {
        font-size: 20px;
        letter-spacing: 2px;
    }

    #header p {
        font-size: 11px;
    }

    .content-block {
        padding: 8px;
    }
}