/* hub.css - Knowledge Hub home page and Literature Review page (used together with products.css) */

.intro-wide {
    max-width: 880px;
}

.hub {
    padding-top: 34px;
    padding-bottom: 60px;
}

.hub-section {
    margin-bottom: 48px;
}

.hub-section:last-child {
    margin-bottom: 0;
}

.hub-section h2 {
    font-size: 26px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 16px;
}

/* Tools */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.tool-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--line);
    border-top: 3px solid var(--accent);
    box-shadow: var(--shadow);
    padding: 26px 26px 22px;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease;
}

.tool-card:hover {
    border-color: var(--accent);
}

.tool-icon {
    width: 40px;
    height: 40px;
    fill: none;
    stroke: var(--teal);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    margin-bottom: 14px;
}

.tool-card h3 {
    font-size: 21px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
}

.tool-card p {
    flex: 1;
    line-height: 1.6;
}

.tool-more {
    margin-top: 18px;
    align-self: flex-start;
    font-weight: 500;
    color: var(--white);
    background: var(--accent);
    padding: 10px 18px;
    border-radius: 2px;
}

.tool-card:hover .tool-more {
    background: var(--accent-dark);
}

/* Files */
.file-list {
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.file-row {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 24px;
}

.file-row + .file-row {
    border-top: 1px solid var(--line);
}

.file-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}

.file-text {
    flex: 1;
    min-width: 0;
}

.file-text h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 2px;
}

.file-text p {
    font-size: 15px;
    line-height: 1.55;
}

.file-btn {
    flex-shrink: 0;
    text-decoration: none;
    white-space: nowrap;
}

.file-btn:hover {
    border-color: var(--accent);
}

.file-meta {
    font-size: 13px;
    font-weight: 400;
    color: var(--muted);
}

.about-text {
    max-width: 980px;
    line-height: 1.65;
}

.about-text p + p {
    margin-top: 10px;
}

.section-intro {
    max-width: 980px;
    line-height: 1.65;
    margin-bottom: 18px;
}

/* Footer of pages without a disclaimer */
.site-footer > #site-footer-common:first-child .acknowledgements {
    margin-top: 0;
    border-top: none;
}

/* Literature Review assistant */
.page-head-compact {
    padding: 14px 0 14px;
}

.page-head-compact .breadcrumb {
    margin-bottom: 6px;
}

.page-head-compact h1 {
    font-size: 30px;
    margin-bottom: 4px;
}

.page-head-compact .intro {
    font-size: 15px;
    line-height: 1.5;
    max-width: none;
}

.hub-chat {
    padding-top: 16px;
    padding-bottom: 16px;
}

/* the round buttons stay clear of the message box of the assistant */
body[data-page="literature"] .a11y {
    bottom: 96px;
}

body[data-page="literature"] .to-top {
    bottom: 160px;
}

.chat-frame {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--teal);
    box-shadow: var(--shadow);
    height: 620px;
    min-height: 440px;
}

.chat-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--teal);
    color: var(--white);
    padding: 10px 16px;
    font-size: 15px;
}

.chat-bar-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.chat-bar a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--white);
    text-decoration: none;
    white-space: nowrap;
}

.chat-bar a:hover {
    text-decoration: underline;
}

.chat-bar a .icon {
    width: 15px;
    height: 15px;
}

.chat-body {
    position: relative;
    flex: 1;
    min-height: 0;
}

.chat-body iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
}

.chat-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--white);
}

.chat-note {
    font-size: 14px;
    color: var(--muted);
    margin-top: 10px;
}

@media (max-width: 760px) {
    .tool-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .file-row {
        flex-wrap: wrap;
    }

    .file-btn {
        margin-left: 56px;
    }

    .chat-bar-title {
        font-size: 14px;
    }

    .hub-chat {
        padding-bottom: 84px;
    }

    .chat-frame {
        min-height: 360px;
    }

    body[data-page="literature"] .a11y {
        bottom: 14px;
    }

    body[data-page="literature"] .to-top {
        bottom: 78px;
    }
}
