/* BioBTree Q&A - Scientific Style */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,500;0,8..60,600;1,8..60,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --text-color: #2c2c2c;
    --text-muted: #555;
    --text-light: #666;
    --bg-color: #e8e5de;
    --bg-paper: #f5f4ef;
    --accent-color: #1a6b7c;
    --accent-light: #e8f4f6;
    --accent-dark: #145566;
    --border-color: #d0cbc2;
    --border-dark: #b8b3aa;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Source Serif 4', 'Georgia', 'Times New Roman', serif;
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-color);
    background: var(--bg-color);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* Container */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem 3rem;
}

/* Header */
header {
    background: var(--bg-paper);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
}

header nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--accent-dark);
    letter-spacing: -0.01em;
}

.tagline {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.3;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.4rem;
    margin-top: 2.5rem;
}

h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

p {
    margin: 1rem 0;
    line-height: 1.8;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2.5rem 0;
}

/* Q&A Page */
.qa-page {
    background: var(--bg-paper);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

/* Light sage green header */
.qa-header {
    text-align: center;
    padding: 2rem 2.5rem 1.5rem;
    background: #dae3d4;
    border-bottom: 3px solid #b8c9ad;
}

.qa-header h1 {
    margin-bottom: 0.75rem;
    font-size: 1.75rem;
    color: var(--text-color);
}

.question {
    font-size: 0.95rem;
    font-style: italic;
    color: var(--text-muted);
    margin: 0.75rem auto;
    max-width: 90%;
    text-align: center;
    line-height: 1.6;
}

/* Collapsible long question */
.question-details {
    margin: 0.75rem auto;
    max-width: 90%;
    text-align: center;
}

.question-details summary.question-preview {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1.6;
    list-style: none;
}

.question-details summary.question-preview::-webkit-details-marker {
    display: none;
}

.question-details summary.question-preview::after {
    content: " [show full question]";
    font-size: 0.8rem;
    color: var(--accent-color);
    font-style: normal;
}

.question-details[open] summary.question-preview::after {
    content: " [collapse]";
}

.question-details .question-full {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-muted);
    margin: 1rem 0 0 0;
    padding: 1rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: left;
    line-height: 1.7;
    white-space: pre-wrap;
}

.meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    margin-top: 1rem;
}

.meta span {
    margin: 0 0.75rem;
}

.entity {
    font-weight: 500;
    color: var(--accent-dark);
}

/* Answer content */
.qa-content {
    padding: 2rem 2.5rem;
    line-height: 1.85;
    color: var(--text-color);
}

.qa-content h2,
.qa-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.qa-content ul,
.qa-content ol {
    margin: 1rem 0;
    padding-left: 1.75rem;
}

.qa-content li {
    margin: 0.4rem 0;
}

/* Tables */
.table-wrapper {
    margin: 1.75rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.4rem;
}

.table-copy-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    background: var(--bg-color);
    border: 1px solid var(--border-dark);
    border-radius: 3px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
}

.table-copy-btn:hover {
    background: var(--border-color);
    color: var(--text-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-family: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 0.85rem;
    border: 1px solid var(--border-dark);
    background: #faf9f6;
}

th, td {
    padding: 0.65rem 1rem;
    text-align: left;
    vertical-align: top;
    border: 1px solid var(--border-color);
}

th {
    background: #edecea;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

td {
    color: var(--text-color);
    line-height: 1.5;
}

/* First column emphasis */
td:first-child {
    font-weight: 500;
}

/* Lists */
ul, ol {
    padding-left: 2rem;
    margin: 1rem 0;
}

li {
    margin: 0.4em 0;
    text-align: justify;
}

li::marker {
    color: var(--text-muted);
}

/* Strong/Bold */
strong {
    font-weight: 600;
}

/* Code - monospace */
pre, code {
    font-family: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
    font-size: 0.85rem;
}

pre {
    background: #f8f8f8;
    padding: 1.25rem;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin: 1.5rem 0;
}

code {
    background: #f0f0f0;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    font-size: 0.9em;
}

pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

/* Biobtree info box - header style */
.biobtree-info {
    margin: 1.5rem 0;
    padding: 0;
    font-size: 0.9rem;
    text-align: left;
}

.biobtree-info h3 {
    margin: 0 0 0.6rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #4a5240;
}

.biobtree-info p {
    margin: 0.5rem 0;
    color: #5a6350;
    line-height: 1.6;
}

.biobtree-info .explore-note {
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 0.5rem;
}

/* Q&A Footer */
.qa-footer {
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    background: #f5f7f2;
    border-top: 1px solid #d8ddd0;
    font-size: 0.85rem;
}

.qa-footer .explore-note {
    margin: 0;
    color: #5a6350;
    font-style: italic;
}

.datasets {
    margin: 0.75rem 0;
}

.datasets strong {
    color: #4a5240;
}

.generated-date {
    margin: 0.75rem 0;
    font-size: 0.85rem;
}

.generated-date strong {
    color: #4a5240;
}

.datasets code {
    background: #c8d0bc;
    color: #3a4230;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8rem;
}

.biobtree-info details summary {
    cursor: pointer;
    color: #4a5240;
    font-size: 0.85rem;
    margin-top: 0.75rem;
    font-weight: 500;
}

.biobtree-info details[open] summary {
    margin-bottom: 0.5rem;
}

.api-calls {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
}

.api-calls li {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: #eaede4;
    border: 1px solid #b8c0ad;
    border-radius: 4px;
}

.api-calls .api-desc {
    display: block;
    font-family: 'Source Serif 4', serif;
    font-size: 0.85rem;
    color: #4a5240;
    margin-bottom: 0.25rem;
}

.api-calls a {
    word-break: break-all;
    font-size: 0.7rem;
    color: #5a7050;
}

details pre {
    margin-top: 0.75rem;
    font-size: 0.8rem;
}

/* Footer */
footer {
    margin-top: 3rem;
    padding: 1.25rem 2rem;
    text-align: center;
    background: var(--bg-paper);
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-muted);
}

footer p {
    margin: 0.4rem 0;
}

footer .footer-links {
    font-size: 0.85rem;
}

footer .footer-links .sep {
    margin: 0 0.5rem;
    color: var(--border-dark);
}

footer .disclaimer {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.75rem;
}

/* Home page - Hero */
.hero {
    text-align: center;
    padding: 2rem 0 1.5rem;
    margin-bottom: 0;
}

.hero h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--text-color);
}

.hero-subtitle {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-muted);
    margin: 0;
    text-align: center;
}

/* About section */
.about {
    margin-bottom: 2.5rem;
    padding: 1.75rem 2rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.about-content p {
    text-align: left;
    margin: 0 0 1rem 0;
    color: var(--text-color);
}

.about-content p:last-of-type {
    margin-bottom: 1.25rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 0;
}

.feature {
    text-align: center;
    padding: 1.25rem 0.75rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.feature-icon {
    display: block;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.feature strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-dark);
    margin-bottom: 0.25rem;
}

.feature span:last-child {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* Questions section */
.questions-section h2 {
    margin-top: 0;
}

/* Search box */
.search-box {
    position: relative;
    margin-bottom: 0.5rem;
}

.search-box input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    font-family: inherit;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-paper);
    transition: border-color 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.search-box input::placeholder {
    color: #999;
}

.search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #999;
    pointer-events: none;
}

/* Q&A list */
.qa-list {
    list-style: none;
    padding: 0;
    text-align: left;
    margin-top: 1.25rem;
}

.qa-list li {
    margin: 0;
    padding: 1.25rem 1.5rem;
    background: var(--bg-paper);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 0.6rem;
    transition: border-color 0.15s;
}

.qa-list li:hover {
    border-color: var(--accent-color);
}

.qa-list a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.qa-list a:hover h3 {
    color: var(--accent-color);
}

.qa-entity {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--accent-dark);
    background: var(--accent-light);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.qa-list h3 {
    margin: 0.5rem 0 0.35rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.qa-list p {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    text-align: left;
    line-height: 1.6;
}

.qa-list .qa-question-preview {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-light);
    background: var(--bg-color);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    border-left: 3px solid var(--border-dark);
    margin: 0.5rem 0;
}

.qa-datasets {
    margin-top: 0.5rem;
}

.qa-datasets code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    background: #ece8e0;
    color: var(--text-muted);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    margin-right: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        font-size: 0.95rem;
    }

    main {
        padding: 1.5rem 1rem 2rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .hero {
        padding: 1.5rem 0;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.15rem;
    }

    .about {
        padding: 1.25rem;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .qa-list li {
        padding: 1rem 1.25rem;
    }

    table {
        font-size: 0.8rem;
    }

    th, td {
        padding: 0.5rem 0.75rem;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
    }

    header, footer, .biobtree-info {
        display: none;
    }
}
