.language-switcher {
    position: fixed;
    top: 50px;
    right: 20px;
    z-index: 1000;
    background: #f4f4f4;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.language-switcher a {
    margin: 0 5px;
    text-decoration: none;
    color: #006;
    cursor: pointer;
}

.language-switcher a:hover {
    text-decoration: underline;
}

.language-switcher .current {
    font-weight: bold;
    color: #000;
}
/* Custom LaTeX-style formatting */

/* Note style - yellow background (similar to \note{}) */
.note {
    background-color: #fff3cd;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

/* Comment style - green text (similar to \comm{}) */
code.comment {
    background-color: #d4edda;
    color: #155724;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Code style - cyan background (similar to \code{}) */
code.code {
    background-color: #d1ecf1;
    color: #0c5460;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Blockquote styling for notes */
blockquote {
    border-left: 4px solid #ffc107;
    background-color: #fff8e1;
    padding: 10px 15px;
    margin: 15px 0;
    border-radius: 0 4px 4px 0;
}

blockquote p {
    margin: 0;
}

/* Figure frame: wrap images in a subtle card to improve visibility */
.fig-frame {
    display: inline-block;
    padding: 3px; /* reduced padding for thinner colored band */
    border: 0.5px solid rgba(0,0,0,0.05);
    background: rgba(255, 248, 220, 0.9); /* warm lemon tint */
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.035);
    margin: 0.6em 0;
}
.fig-frame img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Apply frames to all TP images (TP01..TP10) */
img[src*="/images/TP0"], img[src*="images/TP0"] {
    display: block;
    border: 0.5px solid rgba(0,0,0,0.05);
    padding: 3px; /* reduced padding for thinner colored band */
    background: rgba(231, 234, 234, 0.9);
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.035);
    margin: 0.6em 0;
    max-width: 100%;
    height: auto;
}

/* Hide automatic numbers added by mdBook in the sidebar/nav (broader selectors) */
.sidebar-nav ol, .book .sidebar nav ol, .mdbook-sidebar ol, nav.book-nav ol {
    list-style: none; /* remove numbers */
    counter-reset: none;
}
/* Remove numeric markers for browsers that use ::marker */
.sidebar-nav ol li::marker, .book .sidebar nav ol li::marker, .mdbook-sidebar ol li::marker, nav.book-nav ol li::marker {
    content: none;
}
/* Remove mdBook-specific chapter-number spans if present */
.sidebar-nav ol li a .chapter-number, .book .sidebar nav ol li a .chapter-number, .mdbook-sidebar li a .chapter-number {
    display: none !important;
}
/* Hide leading numbers inserted via pseudo-elements on links */
.sidebar-nav ol li a::before, .book .sidebar nav ol li a::before, .mdbook-sidebar li a::before, nav.book-nav li a::before {
    content: none !important;
}

/* Hide numeric prefixes that mdBook inserts as <strong aria-hidden="true">N.</strong> */
.chapter-item a > strong[aria-hidden="true"],
.chapter a > strong[aria-hidden="true"],
#sidebar a > strong[aria-hidden="true"],
.sidebar a > strong[aria-hidden="true"],
.sidebar-iframe-inner a > strong[aria-hidden="true"] {
    display: none !important;
}

/* Focus box: highlights an important section for the current session */
.focus-box {
    border: 1px solid rgba(46, 125, 50, 0.15);
    background: linear-gradient(135deg, #f1f8e9 0%, #fff 100%);
    padding: 1.2em 1.5em;
    border-radius: 8px;
    margin: 1.5em 0;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.12);
}
.focus-box h2 {
    color: #2E7D32;
    margin-top: 0;
    font-size: 1.3em;
    border-bottom: none;
}