* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



:root {
    /* Modern Professional Medical Theme */
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    --primary-color: #2563eb;
    /* Modern Royal Blue */
    --secondary-color: #0891b2;
    /* Cyan/Teal Accent - Professional & Fresh */
    --bg-primary: #f8fafc;
    /* Slate-50 - Crisp White/Grey */
    --bg-secondary: #ffffff;
    /* Pure White */
    --bg-card: #ffffff;
    /* White Cards */
    --bg-sidebar: #f1f5f9;
    /* Slate-100 Sidebar */
    --text-primary: #0f172a;
    /* Slate-900 - Sharp Dark Text */
    --text-medium: #475569;
    /* Slate-600 - Slightly Lighter for Headings */
    --text-secondary: #64748b;
    /* Slate-500 */
    --border-color: rgba(37, 99, 235, 0.1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --accent-gold: #F4A62A;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(0, 129, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(0, 89, 178, 0.03) 0%, transparent 50%);
    background-attachment: fixed;
    height: 100vh;
    padding: 0;
    margin: 0;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-y: auto;
    /* Enable scroll if needed, or stick to hidden and scroll inner */
    overflow-x: hidden;
}

.container {
    width: 100%;
    height: 100vh;
    margin: 0;
    background: var(--bg-card);
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    border: none;
    animation: fadeIn 0.6s ease-out;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    /* Allow container to scroll if it's the main scroller */
}


/* Return Link Highlight Animation */
@keyframes flashYellow {
    0% {
        background-color: rgba(255, 215, 0, 0.6);
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
    }

    100% {
        background-color: transparent;
        box-shadow: none;
    }
}

.flash-highlight {
    animation: flashYellow 5s ease-out forwards;
    border-radius: 4px;
    /* Soft edges */
    transition: background-color 0.3s;
}

/* Font Size Controls - Floating Style for Mobile Content Areas */
.font-size-controls {
    position: absolute;
    top: 10px;
    right: 15px;
    display: none;
    gap: 12px;
    z-index: 100;
}

body.is-mobile .font-size-controls {
    display: flex;
}

.font-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(37, 99, 235, 0.2);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    font-size: 14px;
}

.font-btn:active {
    transform: scale(0.9);
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.font-btn span {
    pointer-events: none;
}

.font-btn-small {
    font-size: 13px !important;
}

.font-btn-large {
    font-size: 20px !important;
}

/* Cross Reference Items - General */
.reference-footer .ref-item {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

.reference-footer a {
    margin: 0 2px !important;
}

.reference-footer .ref-separator {
    display: none !important;
}