.language_flag {
    float: right;
    display: flex;
    align-items: center;
    gap: 0.4em;
    margin-bottom: 0.5em;
}
.language_flag img {
    width: 40px;
    margin-left: 0.4em;
    border: 1px solid var(--border);
    border-radius: 5px;
    transition: transform 0.2s, border-color 0.2s, outline-color 0.2s;
}
.language_flag img.active {
    outline: 2px solid var(--text);
}
.language_flag img:hover {
    border: 1px solid var(--accent);
    outline: 2px solid var(--accent);
    transform: scale(1.05);
}

.code-intro {
    margin-bottom: 0.8em;
}

.code-note {
    font-size: 90%;
    color: var(--muted);
    margin-bottom: 2em;
}

.code-section-title {
    font-family: 'EB Garamond', Georgia, serif;
    margin-top: 2em;
    padding-bottom: 0.3em;
    border-bottom: 1.5px solid var(--border);
}

.code-section-description {
    font-style: italic;
    color: var(--muted);
    margin-bottom: 1.2em;
}

.code-subsection-title {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 110%;
    font-weight: 600;
    margin-top: 1.6em;
    margin-bottom: 0.4em;
    color: var(--text);
}

.code-entry {
    background-color: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 0.9em 1.2em;
    margin: 0.8em 0;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.code-entry:hover {
    background-color: var(--highlight);
    box-shadow: 0 4px 16px rgba(58,82,196,0.1);
}

.code-name {
    font-size: 105%;
    margin-bottom: 0.3em;
}

.code-name a {
    color: var(--accent);
    text-decoration: none;
}

.code-name a:hover {
    color: var(--accent-dk);
    text-decoration: underline;
}

.code-desc {
    margin-bottom: 0.35em;
    color: var(--text);
}

.code-desc a {
    color: var(--accent);
}

.code-desc a:hover {
    color: var(--accent-dk);
}

.code-meta {
    font-size: 88%;
    color: var(--muted);
    font-style: italic;
}

@media (max-width: 600px) {
    .code-entry {
        padding: 0.7em 0.9em;
    }
}
