/* Misc */
body {
    word-wrap: break-word;
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    background-color: #fffff9;
}

ol li ul, ol li ol {
    margin-bottom: 1.25em;
}

article {
    padding-left: 1em;
    padding-right: 0.5em;
    margin-bottom: 1.5em;
}


/* Base.html - top navigation */
.top-bar {
    background: #2B0034;
    padding: 0.5em 0;
    margin-bottom: 1.5em;
}

.top-bar h1 {
    font-size: 1.6rem;
    margin: 0;
    padding: 0.3em 0;
}

.top-bar a {
    color: #fff;
    text-decoration: none;
}

.top-bar a:hover {
    color: #ddd;
}

ul.button-group.navigation {
    margin-bottom: 1em;
}


/* Base.html sidebar */
h5.sidebar-title {
    border-bottom: 0.1em solid #eeeeee;
    margin-top: 1em;
    font-weight: bold;
    text-transform: uppercase;
    color: #555;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.side-nav li a {
    color: #444;
    font-size: 0.95rem;
}

.side-nav li a:hover {
    color: #2B0034;
    text-decoration: underline;
}

.side-nav {
    padding: 0.5em 0;
}


/* Index / Article titles */
h3.article-title {
    margin-bottom: 0.1em;
    color: #3A91CB;
    font-size: 1.4rem;
    line-height: 1.3;
}

h3.article-title:hover {
    color: #2B6FA3;
}

a:has(> h3.article-title) {
    text-decoration: none;
}

/* Article summary text on index */
.article-summary {
    margin: 0.6em 0 0.8em 0;
    color: #444;
    font-size: 0.97rem;
    line-height: 1.65;
}

/* Clip long summaries that are truncated mid-code block */
.article-summary .highlight,
.article-summary pre,
.article-summary code {
    max-height: 180px;
    overflow: hidden;
    position: relative;
}


/* Article infos | infos_bottom.html */
.subheader {
    color: #888;
    margin-bottom: 0.8em;
    font-size: 0.9rem;
}

a.article-info {
    color: #888;
}


/* Archives.html */
.table-archive {
    border: none;
}


/* Index.html - line separator for posts */
hr.gradient {
    border: 0;
    height: 1px;
    margin-top: 2.5em;
    margin-bottom: 2.5em;
    background-image: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,0.3), rgba(0,0,0,0));
}


/* ─── Syntax Highlighting ─────────────────────────────────────── */

/* Wrap div that Pygments outputs */
.highlight {
    background: #f8f8f2 !important;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin: 1em 0;
    overflow: auto;
}

/* The actual <pre> inside .highlight */
.highlight pre,
.highlight > pre {
    background: transparent !important;
    border: none;
    border-radius: 0;
    margin: 0;
    padding: 1em 1.2em;
    overflow: auto;
    white-space: pre;
    word-wrap: normal;
    font-size: 0.88rem;
    line-height: 1.6;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    color: #333;
}

/* Inline code (not in a code block) */
p code, li code, td code {
    background: #f1f1f1;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    padding: 0.1em 0.35em;
    font-size: 0.88em;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    color: #c7254e;
}

/* Plain <pre> blocks (output cells, not highlighted) */
pre:not(.highlight pre) {
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1em 1.2em;
    overflow: auto;
    font-size: 0.88rem;
    line-height: 1.6;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    margin: 1em 0;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
}


/* ─── Read More button ────────────────────────────────────────── */
.button.secondary.small {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}


/* ─── Total Score Banner ──────────────────────────────────────── */
.total-score-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #2B0034, #5a0070);
    color: #fff;
    border-radius: 8px;
    padding: 0.9em 1.4em;
    margin-bottom: 2em;
}

.total-score-label {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.9;
}

.total-score-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}


/* ─── Footer ──────────────────────────────────────────────────── */
footer.row {
    margin-top: 2em;
    padding-top: 1em;
}


/* ─── Responsive tweaks ───────────────────────────────────────── */
@media (max-width: 768px) {
    article {
        padding-left: 0.5em;
        padding-right: 0.5em;
    }

    h3.article-title {
        font-size: 1.2rem;
    }

    .highlight pre,
    .highlight > pre {
        font-size: 0.82rem;
    }
}

