body {
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
}

a { text-decoration: none; }
a:hover { text-decoration: underline; }

.bg-boldi { background-color: #1a6496 !important; }

.sticky-indice {
    position: sticky;
    top: 56px;
    z-index: 1019;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
}

/* Guarantee flat rendering regardless of original nesting in source HTML */
.sticky-indice .dropdown-menu { list-style: none; padding-left: 0; }
.sticky-indice .dropdown-menu li { list-style: none; padding-left: 0; margin-left: 0; }

/* Fix scroll position for sticky navbar when jumping to anchors */
h1[id], h2[id], h3[id], h4[id], div[id] {
    scroll-margin-top: 70px;
}

/* Heading hierarchy */
h1 {
    font-size: 1.9rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #dee2e6;
    color: #212529;
}

h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #e9ecef;
    color: #343a40;
}

h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    color: #495057;
}

/* h3 sections promoted to h2 visual level by JS */
h3.h2-style {
    font-size: 1.35rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #e9ecef;
    color: #343a40;
}

/* Small external-link icon in navbar dropdowns */
.dropdown-item .bi {
    font-size: 0.7em;
    vertical-align: super;
    margin-left: 0.2em;
}

samp, tt, code, pre { font-family: "Courier New", Courier, monospace; }

/* Tables: apply bordered style globally since course pages have no Bootstrap classes */
table {
    border-collapse: collapse;
    margin: 1.25rem 0;
}
th, td {
    border: 1px solid #dee2e6;
    padding: 0.4rem 0.75rem;
    vertical-align: top;
}
thead th, th {
    background-color: #f8f9fa;
    font-weight: 600;
}
tbody tr:nth-child(even) td {
    background-color: #f8f9fa;
}

/* Legacy layout divs from old PHP pages */
div.banner { display: none; }
div.main    { /* plain block */ }
div.main::after { content: ''; display: block; clear: both; }

/* Constrain floated images (portrait on home page) */
div.main img.float-md-end { max-width: 280px; height: auto; }

/* Utility spans */
span.new    { color: #1a6496; font-weight: 700; font-size: 0.75em;
              text-transform: uppercase; letter-spacing: 0.05em;
              border: 1px solid currentColor; padding: 0.15em 0.4em;
              border-radius: 0.25em; vertical-align: 0.15em; }
span.amiga  { font-family: Palatino, Garamond, "Times New Roman", Times, serif; font-weight: bold; font-style: italic; }
span.tex    { font-family: "Times New Roman", Times, serif; }
span.tilted { position: relative; top: .4ex; margin: 0 -.1em 0 -.2em; }
