    html {
        scroll-behavior: smooth;
    }
    body {
        width: 100%; height: 100%;
        margin: 0; padding: 0;
        background: var(--b);
    }
    table {
        border-collapse: collapse;
        margin: calc(2*var(--p));
        font-size: 1em;
    }
   .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* Enables smooth, momentum scrolling on iOS */
        margin: 20px 0;
    }
    h3 {
        margin: calc(2*var(--p));
   }
    h4, p {
        margin-left: calc(3*var(--p));
        margin-right: calc(3*var(--p));
    }
    th, td {
        border: 1px solid #ddd;
        padding: 12px;
        text-align: left;
        vertical-align: top;
    }
    .references {
        font-size: 0.85em;
        padding: 15px;
        border-radius: 5px;
        margin-top: 30px;
    }
    .references p {
        margin-bottom: 5px;
        scroll-margin-top: calc(80px + var(--p)); /* Clears the fixed nav when scrolled to */
        transition: background-color 0.3s ease;
    }
    /* Highlight reference when targeted via URL hash. A neutral amber
       "highlighter" tone (rather than the link's own blue/cyan) so the
       blue citation and DOI links inside stay legible against it. */
    .references p:target {
        background-color: rgba(255, 200, 0, 0.25);
        padding: 5px;
        border-left: 3px solid rgba(255, 170, 0, 0.9);
        border-radius: 3px;
    }
    /* Highlight body excerpts when targeted via a "Learn more" link */
    [id^="excerpt-"] {
        scroll-margin-top: calc(80px + var(--p));
        transition: background-color 0.3s ease;
    }
    [id^="excerpt-"]:target {
        background-color: rgba(255, 200, 0, 0.25);
        padding: 5px;
        border-left: 3px solid rgba(255, 170, 0, 0.9);
        border-radius: 3px;
    }
    .caption {
        font-size: 0.85em;
        font-style: italic;
        color: #666;
        margin-bottom: 20px;
    }
    .image-placeholder {
        background-color: #f0f0f0;
        border: 1px dashed #ccc;
        padding: 20px;
        text-align: center;
        margin: 20px 0;
        font-style: italic;
        color: #555;
    }
    
    /* --- NEW STYLES FOR CITATIONS & TOOLTIPS --- */
    .citation {
        text-decoration: none;
        color: var(--accent);
        cursor: pointer;
        font-size: 0.9em;
        vertical-align: super; /* Keep them superscripted slightly */
        scroll-margin-top: calc(80px + var(--p)); /* Clears the fixed nav when scrolled back to */
    }
    .citation:hover {
        text-decoration: underline;
    }
    /* "Back to text" pill, moved into whichever reference was last jumped to */
    .ref-back-link {
        display: block;
        width: fit-content;
        margin-top: 8px;
        padding: 0.3em 0.9em;
        border-radius: 999px;
        border: 1px solid var(--accent);
        font-size: 0.8em;
        font-weight: 600;
        text-decoration: none;
        color: var(--accent);
        background: var(--surface-card);
        cursor: pointer;
        transition: background-color 0.2s ease, color 0.2s ease;
    }
    .ref-back-link:hover {
        background: var(--accent);
        color: var(--surface-page);
        text-decoration: none;
    }
    .references a {
        color: var(--accent);
        text-decoration: none;
    }
    .references a:hover {
        text-decoration: underline;
    }
    .references p {
    margin-bottom: 5px;
    scroll-margin-top: calc(80px + var(--p));
    transition: background-color 0.3s ease;
    overflow-wrap: break-word;
    word-break: break-word;
    }
    #citation-tooltip {
        position: absolute;
        display: none;
        background: white;
        border: 1px solid #a2a9b1;
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
        padding: 15px;
        font-size: 0.85em;
        max-width: 350px;
        z-index: 1000;
        border-radius: 3px;
        color: #222;
        cursor: pointer;
        line-height: 1.5;
        pointer-events: auto;
    }	
    /* Style adjustments inside the tooltip */
    #citation-tooltip a {
        pointer-events: none; /* Prevent clicking the DOI inside the tooltip since clicking the box routes to the reference list */
        color: #0645ad;
        text-decoration: none;
    }
