body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #f5f5f5;
    color: #000000;
    line-height: 1.6;
}

h1 {
    margin: .75rem 0;
    font-size: 1.75rem;
}

a {
    text-decoration: none;
    color: #3776ab;
}

a:hover {
    text-decoration: underline;
}

blockquote {
    margin: 0 0 .5rem;
    padding: .5rem 1.25rem;
    background-color: #f0f8ff;
    border-left: 4px solid #3776ab;
    overflow-x: auto;
}

tt {
    white-space: nowrap;
    background: rgba(128, 182, 255, 0.15);
    font-size: 1rem;
    padding: .075rem .125rem;
}

ul {
    margin: .5rem 0;
    padding-left: 1.25rem;
}

li {
    margin-bottom: .25rem;
}

header {
    background-color: #4b8bbe;
    color: #ffffff;
    padding: .4rem 1rem .3rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 4rem;
}

.logo-letters {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: .075rem;
    margin-left: 1rem;
}

.logo-letters a {
    color: #ffffff;
}

.text-image {
    height: 1rem;
    padding-top: .25rem;
}

.category-menu {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: .5rem 1rem;
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    white-space: nowrap;
}

.category-menu a {
    font-size: 1rem;
    font-weight: 700;
    color: #174163;
    padding: .5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s;
    background-color: #f8fcff;
}

.category-menu a:hover {
    background-color: #e0f0ff;
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    max-width: 1600px;
    margin: 1.75rem auto;
    gap: 1.75rem;
    padding: 0 1rem;
}

.content {
    flex: 4 0 300px;
    min-width: 300px;
    max-width: 100%;
}

.content article a {
    font-weight: 700;
    color: #3776ab;
}

.content article a:hover {
    color: #0056b3;
}

.text-block {
    background: #ffffff;
    padding: 1.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.text-block .linkpromo {
    text-align: center;
    padding: 0 0 1.25rem 0;
    font-weight: 700;
    font-size: 125%;
}
.text-block p.pyfunc {
    margin: .75rem 0 .75rem 0;
}

.text-block a.headlink {
    letter-spacing: 1.5px;
}

.text-block .note {
    background: rgba(155, 192, 192, .2);
    padding: .675rem;
    margin: .5rem 0;
}

.text-block .note p:first-child {
    margin-top: 0;
}

.text-block .note p:last-child {
    margin-bottom: 0;
}

.more-link {
    text-align: center;
    margin: .5rem;
}

.more-link a:hover {
    text-decoration: none;
    font-size: 110%;
}

.gallery:has(.gallery-image) {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.content article img {
    margin: .75rem auto;
    display: block;
    border: 2px rgba(0, 0, 0, 0.5) solid;
    border-radius: 5px;
    object-fit: contain;
    max-width: 100%;
}

table.docutils {
    margin: .5rem auto;
    border: 0;
    border-spacing: 0 .375rem;
}

table.docutils caption {
    font-size: 125%;
    margin: .25rem 0;
}

table.docutils thead {
    font-size: 110%;
    margin: .25rem 0;
}

table.docutils tr {
    box-shadow: 0 2px 2px rgba(0, 0, 0, .25);
    background: rgba(0, 0, 0, 0.05);
}

table.docutils th, table.docutils td {
    padding: .25rem;
    border: 0;
}

.nav-cycle {
    display: flex;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding: .75rem;
    justify-content: space-around;
    border-top: 1px rgba(0, 0, 0, 0.5) solid;
}

.nav-cycle div {
    padding: 0 .5rem;
}

.sidebar {
    flex: 1 0 200px;
    background: #ffffff;
    padding: 1.3rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar .sticky {
    position: sticky;
    top: 2rem;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.3rem;
}

.button-group button {
    background: var(--bg-color);
    font: 700 1rem/2rem 'Roboto', 'sans-serif';
    border: 1px rgba(0, 0, 0, 0.75) solid;
    width: 100%;
    letter-spacing: .05rem;
    cursor: pointer;
}

.telegram-button {
    --bg-color: #0E8CE9;
    color: white;
}

.telegram-button:hover {
    --bg-color: #0FA0DC;
    transform: scale(1.02);
}

.tinkoff-button {
    --bg-color: rgb(224, 168, 0);
    color: #000;
}

.tinkoff-button:hover {
    --bg-color: rgb(255, 193, 7);
    transform: scale(1.02);
}

.latest-articles {
    margin-top: 2rem;
}

.latest-articles .article {
    margin-bottom: 1rem;
}

.latest-articles .article a {
    color: #4b8bbe;
}

.latest-articles .article a:hover {
    color: #0056b3;
}

.latest-articles .article p {
    margin: 0;
    color: #333333;
    font-size: 0.9rem;
}

footer {
    background-color: #4b8bbe;
    color: #ffffff;
    text-align: center;
    padding: 1.3rem;
    margin-top: 2.5rem;
}

footer a {
    color: #fcd43b;
}

footer a:hover {
    color: #ffffff;
}

.grid-container {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    gap: .375rem;
}

.grid-item {
    background: rgba(0, 255, 175, .125);
    padding: .25rem;
    flex: 1 0 min-content;
    text-align: center;
    font-weight: 400;
    font-size: .875rem;
    box-shadow: 0 2px 2px rgba(0, 0, 0, .25);
}

@media (max-width: 1024px) {
    .category-menu {
        flex-wrap: wrap;
        gap: .5rem;
    }

    .main-content {
        flex-direction: column;
    }

}

pre { font: 400 .95rem/1.25rem monospace; margin: 0; }
td.linenos .normal { color: inherit; background: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background: rgb(255,255,192); padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background: rgb(255,255,192); padding-left: 5px; padding-right: 5px; }
.highlight .hll { background: rgb(255,255,192); }
.highlight { background: rgb(232,255,216); padding: .375rem .5rem; margin: .75rem 0; overflow-x: auto; }
.code { background: rgb(232,255,216); }
.highlight .c { color: #3D7B7B; font-style: italic } /* Comment */
.highlight .err { border: 1px solid #FF0000 } /* Error */
.highlight .k { color: #008000; font-weight: bold } /* Keyword */
.highlight .o { color: #666666 } /* Operator */
.highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #9C6500 } /* Comment.Preproc */
.highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */
.highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #E40000 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #008400 } /* Generic.Inserted */
.highlight .go { color: #717171 } /* Generic.Output */
.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #0044DD } /* Generic.Traceback */
.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008000 } /* Keyword.Pseudo */
.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #B00040 } /* Keyword.Type */
.highlight .m { color: #666666 } /* Literal.Number */
.highlight .s { color: #BA2121 } /* Literal.String */
.highlight .na { color: #687822 } /* Name.Attribute */
.highlight .nb { color: #008000 } /* Name.Builtin */
.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
.highlight .no { color: #880000 } /* Name.Constant */
.highlight .nd { color: #AA22FF } /* Name.Decorator */
.highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */
.highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0000FF } /* Name.Function */
.highlight .nl { color: #767600 } /* Name.Label */
.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #19177C } /* Name.Variable */
.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb; } /* Text.Whitespace */
.highlight .mb { color: #666666 } /* Literal.Number.Bin */
.highlight .mf { color: #666666 } /* Literal.Number.Float */
.highlight .mh { color: #666666 } /* Literal.Number.Hex */
.highlight .mi { color: #666666 } /* Literal.Number.Integer */
.highlight .mo { color: #666666 } /* Literal.Number.Oct */
.highlight .sa { color: #BA2121 } /* Literal.String.Affix */
.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
.highlight .sc { color: #BA2121 } /* Literal.String.Char */
.highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */
.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: #BA2121 } /* Literal.String.Double */
.highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */
.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
.highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */
.highlight .sx { color: #008000 } /* Literal.String.Other */
.highlight .sr { color: #A45A77 } /* Literal.String.Regex */
.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
.highlight .ss { color: #19177C } /* Literal.String.Symbol */
.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0000FF } /* Name.Function.Magic */
.highlight .vc { color: #19177C } /* Name.Variable.Class */
.highlight .vg { color: #19177C } /* Name.Variable.Global */
.highlight .vi { color: #19177C } /* Name.Variable.Instance */
.highlight .vm { color: #19177C } /* Name.Variable.Magic */
.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */

#modal-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    font-family: sans-serif;
}

#modal-bottom p {
    margin: 0;
    max-width: 80%;
    font-size: 1rem;
}

#cookie-ok-btn {
    background-color: rgba(223, 224, 225, .75);
    color: #23262b;
    border: none;
    padding: 1rem 3rem;
    font-size: 1.25rem;
    cursor: pointer;
    margin: 0 4rem 0 0;
}

#cookie-ok-btn:hover {
    background-color: rgb(223, 224, 225);
}

@media (max-width: 1024px) {
    #modal-bottom p {
        font-size: .75rem;
    }
}
