/* NeuroTrials Wiki Styles - Generated 1770673147 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Roboto:wght@400;500;600;700&family=Open+Sans:wght@400;600;700&family=Lato:wght@400;700&family=Source+Sans+Pro:wght@400;600;700&family=Poppins:wght@400;500;600;700&family=Nunito:wght@400;600;700&family=Montserrat:wght@400;500;600;700&family=Raleway:wght@400;500;600;700&family=Work+Sans:wght@400;500;600;700&family=PT+Sans:wght@400;700&family=Fira+Sans:wght@400;500;600;700&family=Rubik:wght@400;500;600;700&family=Merriweather:wght@400;700&family=Playfair+Display:wght@400;600;700&display=swap');

:root {
    --nav-bg: #1e3a5f;
    --nav-logo-color: #ffffff;
    --nav-tab-color: rgba(255,255,255,0.8);
    --nav-tab-hover-bg: rgba(255,255,255,0.1);
    --nav-tab-active-bg: rgba(255,255,255,0.2);
    --nav-tab-active-color: #ffffff;
    --primary-blue: #1167b1;
    --primary-blue-light: #187bcd;
    --accent-blue: #187bcd;
    --text-primary: #222222;
    --text-secondary: #555555;
    --text-muted: #888;
    --bg-white: #ffffff;
    --bg-light: #f9fcff;
    --bg-sidebar: #ffffff;
    --border-color: #cce4f9;
    --border-light: #e8f4fc;
    --sidebar-width: 320px;
    --sidebar-section-bg: #0660a9;
    --sidebar-section-color: #ffffff;
    --sidebar-topic-color: #1167b1;
    --sidebar-topic-hover-bg: #e8f4fc;
    --sidebar-topic-active-bg: #127eda;
    --sidebar-topic-active-color: #ffffff;
    --sidebar-subsection-bg: #f8fafc;
    --sidebar-subsection-color: #374151;
    --sidebar-subsection-active-bg: #e8f4fc;
    --sidebar-subsection-active-color: #1167b1;
    --sidebar-highlight-bg: #0090e7;
    --sidebar-highlight-color: #ffffff;
    --sidebar-highlight-border: #f59e0b;
    --sidebar-transition: 0.25s ease;
    --topnav-height: 38px;
    --content-max-width: 1080px;
    --transition-fast: 0.25s ease;
    --transition-normal: 0.25s ease;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --welcome-title-color: #1167b1;
    --welcome-title-size: 28px;
    --search-border-color: #cce4f9;
    --search-focus-color: #74a7fe;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.65;
}

.app-container { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* Ensure HubSpot chat widget is visible - override any hiding CSS */
#hubspot-messages-iframe-container,
#hubspot-messages-iframe-container.widget-align-right,
#hubspot-messages-iframe-container.widget-align-left,
.hs-messages-widget-open,
iframe[id^="hubspot-messages-iframe"] {
    display: initial !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 2147483647 !important;
}

/* Top Navigation */
.top-nav {
    display: flex;
    align-items: center;
    height: var(--topnav-height);
    background: #1e3a5f;
    padding: 0 16px;
    border-bottom: none;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
.logo { display: flex; align-items: center; gap: 12px; margin-right: 40px; text-decoration: none; }
.logo:hover { opacity: 0.85; }
.logo-icon { height: 36px; width: auto; max-width: 120px; object-fit: contain; }
.logo-text {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
}
.specialty-tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.specialty-tabs::-webkit-scrollbar { display: none; }
.specialty-tab {
    display: flex; align-items: center; gap: 8px; padding: 0 16px;
    background: transparent; border: none;
    color: rgba(255,255,255,0.7);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500; cursor: pointer; height: 38px;
    white-space: nowrap; transition: var(--transition-fast);
}
.specialty-tab:hover {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
}
.specialty-tab.active {
    background: rgba(255,255,255,0.2);
    color: #ffffff;
}
.nav-actions { display: flex; align-items: center; gap: 12px; }
.search-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 4px 12px; height: 28px; background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3); border-radius: 8px; color: rgba(255,255,255,0.8); cursor: pointer;
    font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 500;
    transition: var(--transition-fast);
}
.search-btn svg { flex-shrink: 0; }
.search-btn span { white-space: nowrap; }
.search-btn:hover { background: rgba(255,255,255,0.2); color: #ffffff; border-color: rgba(255,255,255,0.5); }
.search-btn:active { background: rgba(255,255,255,0.25); color: #ffffff; border-color: rgba(255,255,255,0.5); }

/* Home Tab (shows welcome screen) */
.specialty-tab.home-tab,
button.home-tab {
    background: transparent;
    color: rgba(255,255,255,0.8);
    border: none;
}
.specialty-tab.home-tab:hover,
button.home-tab:hover {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
}
.specialty-tab.home-tab:active,
.specialty-tab.home-tab.active,
button.home-tab:active {
    background: rgba(255,255,255,0.2);
    color: #ffffff;
}

/* Main Content Layout */
.main-content { display: flex; flex: 1; overflow: hidden; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-width); background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex; flex-direction: column; overflow: hidden;
}
.sidebar-header { padding: 20px 20px 16px; border-bottom: 1px solid var(--border-color); }
.sidebar-header h2 { font-size: 18px; font-weight: 600; color: var(--primary-blue); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 0; }

/* Menu Sections */
.menu-section { margin-bottom: 4px; }
.section-header {
    display: flex; align-items: center; gap: 10px; padding: 12px 20px;
    background: var(--sidebar-section-bg); border: none; width: 100%; text-align: left;
    cursor: pointer; transition: var(--transition-fast);
}
.section-header:hover { background: var(--sidebar-section-bg); filter: brightness(0.85); }
.section-icon { display: none; }
.section-name { flex: 1; font-size: 14px; font-weight: 600; color: var(--sidebar-section-color); text-transform: uppercase; letter-spacing: 0.3px; }
.section-toggle {
    width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
    color: var(--sidebar-section-color); transition: transform 0.4s ease;
}
.section-toggle svg { width: 16px; height: 16px; }
.menu-section.collapsed .section-toggle { transform: rotate(-90deg); }
.section-content {
    max-height: 600px;
    overflow: hidden;
    transition: max-height 0.6s ease, opacity 0.4s ease;
    opacity: 1;
}
.menu-section.collapsed .section-content {
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

/* Subsections */
.subsection { margin: 4px 0; }
.subsection-header {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 8px 20px 8px 28px;
    font-size: 13px; font-weight: 700; color: var(--sidebar-subsection-color);
    text-transform: uppercase; letter-spacing: 0.5px;
    background: var(--sidebar-subsection-bg); border: none; cursor: pointer; text-align: left;
    font-family: inherit; transition: var(--transition-fast);
    border-left: 3px solid transparent;
}
.subsection-header:hover {
    background: var(--sidebar-subsection-active-bg);
    color: var(--sidebar-subsection-active-color);
}
.subsection-header:focus { outline: none; }
/* Active/expanded subsection */
.subsection:not(.collapsed) > .subsection-header {
    background: var(--sidebar-subsection-active-bg);
    color: var(--sidebar-subsection-active-color);
    border-left-color: var(--sidebar-subsection-active-color);
}
.subsection-name { flex: 1; }
.subsection-toggle {
    width: 14px; height: 14px; display: flex; align-items: center; justify-content: center;
    transition: transform 0.3s ease; opacity: 0.5;
}
.subsection-toggle svg { width: 12px; height: 12px; }
.subsection.collapsed .subsection-toggle { transform: rotate(-90deg); }
.subsection-content {
    max-height: 500px; overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.3s ease;
    opacity: 1;
}
.subsection.collapsed .subsection-content {
    max-height: 0; opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease;
}

/* Highlighted Sections (e.g., Guidelines) */
.menu-section.highlighted .section-header {
    background: var(--sidebar-highlight-bg);
    border-left: 4px solid var(--sidebar-highlight-border);
}
.menu-section.highlighted .section-header:hover {
    background: var(--sidebar-highlight-bg);
    filter: brightness(0.95);
}
.menu-section.highlighted .section-name {
    color: var(--sidebar-highlight-color);
}
.menu-section.highlighted .section-toggle {
    color: var(--sidebar-highlight-color);
}

/* Topics */
.topic-list { list-style: none; }
.topic-item { display: block; }
.topic-link {
    display: block; padding: 10px 20px 10px 40px; font-size: 14px;
    color: var(--sidebar-topic-color); text-decoration: none;
    border-left: 3px solid transparent; transition: var(--transition-fast);
}
.topic-link:hover {
    background: var(--sidebar-topic-hover-bg);
    color: var(--sidebar-topic-color); filter: brightness(0.9);
    border-left-color: var(--accent-blue);
}
.topic-link.active {
    background: var(--sidebar-topic-active-bg);
    color: var(--sidebar-topic-active-color);
    border-left-color: var(--sidebar-topic-active-bg);
    font-weight: 600;
}
.topic-link.active:hover {
    background: var(--sidebar-topic-active-bg); filter: brightness(0.9);
    color: var(--sidebar-topic-active-color);
}
.topic-link.featured {
    color: #b8860b; font-weight: 600;
    border-left: 3px solid #daa520;
    background: linear-gradient(90deg, rgba(218,165,32,0.08) 0%, transparent 100%);
}
.topic-link.featured:hover {
    background: linear-gradient(90deg, rgba(218,165,32,0.15) 0%, transparent 100%);
    border-left-color: #b8860b;
}
.topic-link.featured.active {
    background: linear-gradient(90deg, rgba(218,165,32,0.18) 0%, rgba(218,165,32,0.05) 100%);
    color: #8b6914; border-left-color: #b8860b;
}

/* Content Frame */
.content-frame { flex: 1; overflow-y: auto; background: var(--bg-light); }
.content-wrapper { max-width: var(--content-max-width); margin: 0 auto; padding: 40px; }

/* Welcome Message */
.welcome-message {
    text-align: center; padding: 30px 0 0;
    height: calc(100vh - var(--topnav-height) - 20px);
    display: flex; flex-direction: column; overflow: hidden; width: 100%;
}
.welcome-message h1 { font-size: 28px; font-weight: 700; color: var(--primary-blue); margin-bottom: 12px; }
.welcome-message p { font-size: 16px; color: var(--text-secondary); margin-bottom: 6px; }
.welcome-message .subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }
.welcome-message .welcome-bg {
    flex: 1; width: 100vw; margin-left: calc(-50vw + 50%);
    background-image: url('WIKI-bg.jpg?v=1770673147');
    background-repeat: no-repeat; background-position: center center;
    background-size: contain;
}

/* Welcome Search Box */
.welcome-search {
    position: relative;
    width: 40%;
    max-width: 800px;
    margin: 0 auto 20px;
}
.welcome-search-input {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    border: 2px solid var(--search-border-color);
    border-radius: 8px;
    background: var(--bg-white);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.welcome-search-input:focus {
    outline: none;
    border-color: var(--search-focus-color);
    box-shadow: 0 0 0 3px rgba(17, 103, 177, 0.15);
}
.welcome-search-input::placeholder {
    color: var(--text-muted);
}
.welcome-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
}
.welcome-search-results:empty {
    display: none;
}
.welcome-search-results a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s;
}
.welcome-search-results a:hover {
    background: var(--bg-light);
}
.welcome-search-results a:last-child {
    border-bottom: none;
}
.welcome-search-item .result-name {
    font-weight: 500;
    font-size: 16px;
    color: var(--primary-blue);
    margin-bottom: 2px;
}
.welcome-search-item .result-path {
    font-size: 12px;
    color: var(--text-muted);
}
/* Search Modal Results */
.search-result-item .result-title {
    font-size: 16px;
}

/* Topic Content Styles */
.topic-content {
    background: var(--bg-white); border-radius: 8px; box-shadow: var(--shadow-md);
    padding: 20px; border: 1px solid var(--border-color);
}

/* Article Container */
.article-container {
    font-family: 'Inter', sans-serif;
    color: #222222; background-color: #fff;
    padding: 20px; max-width: 1080px; margin: auto;
    font-size: 15px; line-height: 1.65;
}

.article-container h1, .topic-content h1 {
    font-family: 'Inter', sans-serif;
    color: #1167b1; font-size: 1.6em;
    margin-bottom: 0.6em; font-weight: 600; line-height: 1.3;
}

.article-container h2, .topic-content h2 {
    font-family: 'Inter', sans-serif;
    color: #187bcd; font-size: 1.3em;
    margin-top: 1.4em; margin-bottom: 0.5em; font-weight: 600;
    padding-left: 12px; border-left: 3px solid #2a9df4;
}

.article-container h3, .topic-content h3 {
    font-family: 'Inter', sans-serif;
    color: #187bcd; font-size: 1.1em;
    margin-top: 2em; margin-bottom: 0.5em; font-weight: 400;
}

.article-container p, .topic-content p {
    font-size: 15px; margin-bottom: 1em;
    color: #222222; line-height: 1.65;
}

.article-container ul, .article-container ol,
.topic-content ul, .topic-content ol { padding-left: 1.2em; margin-bottom: 1em; }

.article-container li, .topic-content li { margin-bottom: 0.4em; line-height: 1.6; }

.article-container em { font-style: italic; }

.article-container a, .topic-content a {
    color: #187bcd;
    text-decoration: none;
    text-underline-offset: 2px;
    font-weight: normal;
    font-style: normal;
}
.article-container a:hover, .topic-content a:hover {
    color: #2a9df4;
    text-decoration: none;
}

/* Key Points Box */
.bottom-line-box, .key-points {
    border: 1px solid #2a9df4;
    background-color: #ffffff;
    border-radius: 6px;
    padding: 10px 24px 10px;
    margin: 2rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.article-container .bottom-line-box h3,
.article-container .key-points h4,
.topic-content .bottom-line-box h3,
.topic-content .key-points h4,
.bottom-line-box h3, .key-points h4 {
    text-align: center; font-size: 1.15em; font-weight: 600;
    margin: 0 0 1rem 0 !important; padding: 0 !important;
    color: #187bcd;
    border: none;
}
.bottom-line-box ul, .key-points ul {
    font-size: 0.95em; padding-left: 1.2rem; margin: 0;
}
.bottom-line-box li, .key-points li { margin-bottom: 0.5rem; }

/* Clinical Relevance Box (blue) */
.clinical-box {
    border: 1px solid #2a9df4;
    background-color: #f9fcff;
    border-radius: 6px;
    padding: 10px 24px 10px;
    margin: 1.5rem 0;
}
.clinical-box h3, .clinical-box h4 {
    color: #187bcd;
    text-align: center;
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 0.75rem 0 !important;
    padding: 0 !important;
}
.clinical-box p { margin-bottom: 0.5rem; }
.clinical-box ul { margin-top: 0; margin-bottom: 0.75rem; padding-left: 1.2rem; }
.clinical-box ul:last-child { margin-bottom: 0; }
.clinical-box li { margin-bottom: 0.3rem; }

/* Warning/Red Flag Box (red) */
.warning-box {
    border: 1px solid #e74c3c;
    background-color: #fdf2f2;
    border-radius: 6px;
    padding: 10px 24px 10px;
    margin: 1.5rem 0;
}
.warning-box h3, .warning-box h4 {
    color: #c0392b;
    text-align: center;
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 0.75rem 0 !important;
    padding: 0 !important;
}
.warning-box p { margin-bottom: 0.5rem; }
.warning-box ul { margin-top: 0; margin-bottom: 0.75rem; padding-left: 1.2rem; }
.warning-box ul:last-child { margin-bottom: 0; }
.warning-box li { margin-bottom: 0.3rem; }

/* Tables */
.table-wrapper {
    max-width: 100%; margin: 2rem 0; padding: 1rem 2rem;
    background-color: var(--bg-white);
    border: 1px solid #cce4f9;
    border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); overflow-x: auto;
}
.styled-table, .topic-content table, .article-container table {
    font-family: 'Inter', sans-serif;
    font-size: 0.9em;
    border-collapse: collapse; width: 100%; text-align: left;
}
.styled-table th, .topic-content th, .article-container th {
    background-color: #2a9df4; color: #ffffff;
    font-weight: 600; padding: 8px 12px; border: 1px solid #cce4f9;
}
.styled-table td, .topic-content td, .article-container td {
    padding: 8px 12px; border: 1px solid #cce4f9;
}
.styled-table tr:nth-child(even), .topic-content tr:nth-child(even), .article-container tr:nth-child(even) {
    background-color: #f9fcff;
}

/* Table size variants */
.compact-table, .topic-content table.compact-table, .article-container table.compact-table { font-size: 0.85em !important; }
.small-table, .topic-content table.small-table, .article-container table.small-table { font-size: 0.8em !important; }

/* Respect inline font-size on tables */
.topic-content table[style*="font-size"], .article-container table[style*="font-size"] { font-size: inherit; }

/* References */
.references { margin-top: 2em; border-top: 1px solid #ccc; padding-top: 1em; }
.references-title, .references h4 {
    color: var(--accent-blue); font-size: 1em; font-weight: 600; margin-bottom: 0.8em;
}
.references ol { padding-left: 1.2em; font-size: 13.5px; line-height: 1.5; }
.references li { margin-bottom: 0.4em; }

/* Search Modal */
.search-modal {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 1000;
    align-items: flex-start; justify-content: center; padding-top: 100px;
}
.search-modal.active { display: flex; }
.search-modal-content {
    width: 100%; max-width: 600px; background: var(--bg-white);
    border-radius: 8px; box-shadow: var(--shadow-lg); overflow: hidden;
    border: 1px solid var(--border-color);
}
.search-input-wrapper {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 20px; border-bottom: 1px solid var(--border-color);
}
.search-input-wrapper svg { color: var(--text-muted); flex-shrink: 0; }
.search-input-wrapper input {
    flex: 1; border: none; outline: none; font-size: 16px;
    color: var(--text-primary); font-family: 'Inter', sans-serif;
}
.search-input-wrapper input::placeholder { color: var(--text-muted); }
.search-input-wrapper kbd {
    background: var(--bg-light); border: 1px solid var(--border-color);
    border-radius: 4px; padding: 2px 8px; font-size: 12px; color: var(--text-muted);
}
.search-results { max-height: 400px; overflow-y: auto; }
.search-result-item {
    display: block; padding: 12px 20px; text-decoration: none;
    border-bottom: 1px solid var(--border-light); transition: var(--transition-fast);
}
.search-result-item:hover { background: var(--bg-light); }
.search-result-item .result-title { font-size: 15px; font-weight: 500; color: var(--primary-blue); margin-bottom: 4px; }
.search-result-item .result-path { font-size: 12px; color: var(--text-muted); }
.search-result-item .result-match { font-size: 11px; color: var(--text-muted); margin-top: 4px; line-height: 1.4; }
.welcome-search-item .result-match { font-size: 11px; color: var(--text-muted); margin-top: 4px; line-height: 1.4; }
.search-no-results { padding: 40px 20px; text-align: center; color: var(--text-muted); }

/* Mobile */
/* Menu Toggle Button - hidden on desktop */
.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    color: #1167b1;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition-fast);
}
.menu-toggle:hover {
    background: #f0f7ff;
}

/* Sidebar Overlay - for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: var(--topnav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 98;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sidebar-overlay.active {
    opacity: 1;
}

@media (max-width: 1024px) { .sidebar { width: 280px; } }

@media (max-width: 768px) {
    /* Nav adjustments */
    .top-nav { padding: 0 12px; }
    .logo { margin-right: 12px; }
    .logo-text { display: none; }
    .logo-icon { height: 30px; }

    /* Tabs - horizontal scroll */
    .specialty-tabs {
        gap: 4px;
        flex: 1;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 4px 0;
    }
    .specialty-tabs::-webkit-scrollbar { display: none; }
    .specialty-tab {
        padding: 8px 12px;
        font-size: 13px;
        flex-shrink: 0;
    }

    /* Search button - icon only on mobile */
    .search-btn span { display: none; }
    .search-btn {
        width: 44px;
        height: 44px;
        padding: 0;
    }

    /* Show menu toggle */
    .menu-toggle { display: flex; }

    /* Sidebar - slide from left */
    .sidebar {
        position: fixed;
        left: -100%;
        top: var(--topnav-height);
        bottom: 0;
        width: 85%;
        max-width: 320px;
        z-index: 99;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    .sidebar.open { left: 0; }

    /* Show overlay when sidebar open */
    .sidebar-overlay { display: block; }

    /* Content adjustments */
    .content-wrapper { padding: 20px 14px; }
    .topic-content { padding: 20px 16px; }
    .topic-content h1 { font-size: 1.3em; }
    .topic-content h2 { font-size: 1.15em; }
    .topic-content h3 { font-size: 1.05em; }

    /* Tables - horizontal scroll */
    .styled-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    /* Welcome page search */
    .welcome-search { width: 90%; }
    .welcome-message h1 { font-size: 1.5em; }

    /* Mobile specialty dropdown */
    .mobile-specialty-selector select {
        font-size: 14px;
        background-color: rgba(255,255,255,0.15);
        color: #ffffff;
    }

    /* Key points box */
    .key-points-box, .clinical-box, .warning-box, .bottom-line-box {
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .top-nav { padding: 0 8px; gap: 8px; }
    .specialty-tab { padding: 6px 10px; font-size: 12px; }
    .topic-content { padding: 14px 12px; font-size: 12px; }
    .topic-content p { font-size: 12px; line-height: 1.5; }
    .topic-content h1 { font-size: 1.2em; }
    .references ol { font-size: 12px; }
    .welcome-message h1 { font-size: 1.3em; }
    .welcome-message .subtitle { font-size: 12px; }
}

/* Scrollbar */
.sidebar-nav::-webkit-scrollbar, .content-frame::-webkit-scrollbar, .search-results::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-track, .content-frame::-webkit-scrollbar-track, .search-results::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb, .content-frame::-webkit-scrollbar-thumb, .search-results::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb:hover, .content-frame::-webkit-scrollbar-thumb:hover, .search-results::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Loading */
.loading { display: flex; align-items: center; justify-content: center; padding: 40px; color: var(--text-muted); }
.loading::after {
    content: ''; width: 24px; height: 24px;
    border: 2px solid var(--border-color); border-top-color: var(--accent-blue);
    border-radius: 50%; animation: spin 0.8s linear infinite; margin-left: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Error */
.error-message {
    background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px; padding: 20px; color: #ef4444; text-align: center;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    float: right;
    margin: 0 0 12px 16px;
}
.share-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 12px;
    padding: 0;
}
.share-btn:hover {
    border-color: #1167B1;
    color: #1167B1;
    background: #f0f7ff;
}
.share-x:hover { color: #000; border-color: #000; background: #f5f5f5; }
.share-linkedin:hover { color: #0A66C2; border-color: #0A66C2; background: #f0f7ff; }

/* Topic Navigation (Prev/Next) */
.topic-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.topic-nav-btn {
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition-fast);
    max-width: 45%;
}

.topic-nav-btn:hover {
    background: #f0f7ff;
    border-color: var(--primary-blue);
    box-shadow: 0 2px 8px rgba(17, 103, 177, 0.15);
}

.topic-nav-prev {
    align-items: flex-start;
}

.topic-nav-next {
    align-items: flex-end;
    margin-left: auto;
}

.nav-direction {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.nav-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-blue);
}

.topic-nav-spacer {
    flex: 1;
}

@media (max-width: 600px) {
    .topic-navigation {
        flex-direction: column;
        gap: 12px;
    }
    .topic-nav-btn {
        max-width: 100%;
    }
    .topic-nav-next {
        align-items: flex-start;
        margin-left: 0;
    }
}
/* ===== Grouped navigation: 3 group buttons (left) + member sub-tabs (right) ===== */
.subheader { display:flex; align-items:stretch; height:46px; background:#2a4a73; border-bottom:1px solid rgba(255,255,255,0.08); box-shadow:0 2px 4px rgba(0,0,0,0.06); padding:0 12px; z-index:90; }
.group-buttons { display:flex; align-items:center; gap:6px; flex-shrink:0; padding:6px 4px; }
.group-btn { display:flex; align-items:center; gap:7px; height:34px; padding:0 18px; background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.14); border-radius:8px; color:rgba(255,255,255,0.82); font-family:'Inter',sans-serif; font-size:13.5px; font-weight:600; letter-spacing:0.2px; cursor:pointer; transition:0.18s ease; white-space:nowrap; }
.group-btn .dot { width:7px; height:7px; border-radius:50%; background:currentColor; opacity:0.55; }
.group-btn:hover { background:rgba(255,255,255,0.14); color:#fff; }
.group-btn.active { background:#ffffff; color:#1e3a5f; border-color:#ffffff; box-shadow:0 1px 6px rgba(0,0,0,0.18); }
.group-btn.active .dot { background:#f59e0b; opacity:1; }
.subheader-divider { width:1px; margin:8px 12px; background:rgba(255,255,255,0.18); flex-shrink:0; }
.member-tabs { display:flex; align-items:center; gap:2px; flex:1; overflow-x:auto; scrollbar-width:none; }
.member-tabs::-webkit-scrollbar { display:none; }
.member-tab { height:46px; padding:0 15px; background:transparent; border:none; border-bottom:3px solid transparent; color:rgba(255,255,255,0.78); font-family:'Inter',sans-serif; font-size:13px; font-weight:500; cursor:pointer; white-space:nowrap; transition:0.15s ease; }
.member-tab:hover { color:#fff; background:rgba(255,255,255,0.06); }
.member-tab.active { color:#fff; font-weight:600; border-bottom-color:#f59e0b; }
.wiki-brand-text { color:#fff; font-weight:700; font-size:18px; letter-spacing:0.5px; font-family:'Inter',sans-serif; margin-right:auto; }
.top-nav .wiki-home-title { border-left:none !important; }
@media (max-width:820px){ .subheader{ flex-wrap:wrap; height:auto; padding:6px 8px; } .group-buttons{ width:100%; } .group-btn{ flex:1; justify-content:center; padding:0 8px; } .subheader-divider{ display:none; } .member-tabs{ width:100%; } .member-tab{ height:40px; } }

/* ===== Group-aware home: subject cards ===== */
.welcome-message .welcome-specialties { display: flex !important; flex-wrap: wrap !important; justify-content: center !important; align-items: stretch !important; width: 100% !important; max-width: 780px !important; gap: 12px !important; margin: 24px auto 0 !important; }
.welcome-card { display:flex; flex-direction:column; align-items:flex-start; gap:5px; min-width:150px; flex:1 1 150px; max-width:210px; padding:15px 18px; background:#fff; border:2px solid #cce4f9; border-radius:12px; cursor:pointer; transition:all .2s ease; box-shadow:0 2px 4px rgba(0,0,0,0.04); font-family:'Inter',sans-serif; text-align:left; }
.welcome-card:hover { background:#0a4f8a; border-color:#0a4f8a; box-shadow:0 4px 12px rgba(10,79,138,0.25); transform:translateY(-1px); }
.welcome-card .wc-name { font-size:15px; font-weight:600; color:#0a4f8a; line-height:1.25; }
.welcome-card:hover .wc-name { color:#fff; }
.welcome-card .wc-count { font-size:12px; color:#64748b; font-weight:500; }
.welcome-card:hover .wc-count { color:rgba(255,255,255,0.85); }
.welcome-card.coming-soon .wc-count { color:#b8860b; font-style:italic; }
.welcome-card.coming-soon:hover { background:#fff; border-color:#f0c060; transform:none; box-shadow:0 2px 4px rgba(0,0,0,0.04); }
.welcome-card.coming-soon:hover .wc-name { color:#0a4f8a; }
.welcome-card.coming-soon:hover .wc-count { color:#b8860b; }

/* ===== Polished tables for wiki topic content (overrides inline header styles) ===== */
.article-container table { width:100% !important; border-collapse:separate !important; border-spacing:0 !important; margin:1.4rem 0 !important; font-size:0.95em; border:1px solid #e2e8f0 !important; border-radius:10px; overflow:hidden; box-shadow:0 1px 3px rgba(15,23,42,0.10); }
.article-container table th { background:#1e3a5f !important; color:#ffffff !important; font-weight:600 !important; text-align:left !important; padding:11px 14px !important; border:none !important; letter-spacing:0.2px; }
.article-container table td { padding:10px 14px !important; border:none !important; border-top:1px solid #edf1f7 !important; color:#334155; vertical-align:top; }
.article-container table tbody tr:hover td, .article-container table tr:hover td { background:#f3f8fd; }
