/* Science Fair Fund — Data Room Styles */

/* ============================================================
   1. BASE TYPOGRAPHY
   ============================================================ */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #1f2937;
}

/* ============================================================
   2. SIDEBAR
   ============================================================ */

#sidebar {
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

#sidebar::-webkit-scrollbar {
    width: 4px;
}

#sidebar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}

/* Sidebar fund branding area */
#sidebar > div:first-child {
    border-bottom: 1px solid #e5e7eb;
}

/* Active nav indicator */
nav a[aria-current="page"] {
    background-color: #eff6ff;
    color: #1d4ed8;
    font-weight: 500;
}

/* ============================================================
   3. DOCUMENT CONTENT — Full typography system
   Replaces broken Tailwind prose plugin classes
   ============================================================ */

.document-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #374151;
    max-width: none;
}

/* --- Headings --- */

.document-content h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    line-height: 1.3;
}

.document-content h1:first-child {
    margin-top: 0;
}

.document-content h2 {
    font-size: 1.375rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    padding-top: 0.5rem;
    line-height: 1.35;
}

.document-content h3 {
    font-size: 1.125rem;
    font-weight: 500;
    color: #1f2937;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.document-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

/* --- Paragraphs --- */

.document-content p {
    margin-top: 0;
    margin-bottom: 1.25rem;
    color: #374151;
    line-height: 1.7;
}

/* --- Links --- */

.document-content a {
    color: #2563eb;
    text-decoration: none;
}

.document-content a:hover {
    text-decoration: underline;
}

/* --- Strong / Emphasis --- */

.document-content strong {
    font-weight: 600;
    color: #111827;
}

.document-content em {
    font-style: italic;
}

/* --- Lists --- */

.document-content ul {
    list-style-type: disc;
    padding-left: 1.75rem;
    margin-top: 0.5rem;
    margin-bottom: 1.25rem;
}

.document-content ol {
    list-style-type: decimal;
    padding-left: 1.75rem;
    margin-top: 0.5rem;
    margin-bottom: 1.25rem;
}

.document-content li {
    margin-bottom: 0.375rem;
    line-height: 1.6;
    color: #374151;
}

.document-content li > ul,
.document-content li > ol {
    margin-top: 0.375rem;
    margin-bottom: 0.375rem;
}

.document-content ul ul {
    list-style-type: circle;
}

.document-content ul ul ul {
    list-style-type: square;
}

/* --- Tables --- */

.document-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.document-content thead {
    border-bottom: 2px solid #d1d5db;
}

.document-content th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
    padding: 0.625rem 0.75rem;
    text-align: left;
    white-space: nowrap;
}

.document-content td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    color: #4b5563;
}

/* Right-align numeric columns (cells that start with $, %, or digit) */
.document-content td:not(:first-child) {
    text-align: right;
}

.document-content th:not(:first-child) {
    text-align: right;
}

/* Alternating row shading */
.document-content tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.document-content tbody tr:hover {
    background-color: #f3f4f6;
}

/* --- Blockquotes --- */

.document-content blockquote {
    border-left: 3px solid #3b82f6;
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    background-color: #f8fafc;
    color: #4b5563;
    font-style: italic;
}

.document-content blockquote p {
    margin-bottom: 0.5rem;
}

.document-content blockquote p:last-child {
    margin-bottom: 0;
}

/* --- Horizontal Rules --- */

.document-content hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 2rem 0;
}

/* --- Code --- */

.document-content code {
    background-color: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
    color: #1f2937;
}

.document-content pre {
    background-color: #1f2937;
    color: #e5e7eb;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.document-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* ============================================================
   4. DOCUMENT HEADER BAR
   ============================================================ */

.document-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.8125rem;
}

.document-header .fund-name {
    font-weight: 600;
    color: #334155;
    letter-spacing: 0.025em;
}

.document-header .confidential-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    background-color: #fef3c7;
    color: #92400e;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ============================================================
   5. LANDING PAGE — Metrics sections
   ============================================================ */

.metrics-section {
    margin-bottom: 2.5rem;
}

.metrics-section-header {
    margin-bottom: 1rem;
}

.metrics-section-header h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}

.metrics-section-header p {
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.5;
}

.metrics-section-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 2rem 0;
}

/* Cohort table section */
.cohort-section-header {
    margin-bottom: 1rem;
}

.cohort-section-header h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}

.cohort-section-header p {
    font-size: 0.8125rem;
    color: #6b7280;
}

/* ============================================================
   6. METRIC CARDS
   ============================================================ */

.metric-card {
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.metric-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ============================================================
   7. RESPONSIVE
   ============================================================ */

/* ============================================================
   8. METHODOLOGY PAGE — Hero, callouts, tier tables, charts
   ============================================================ */

/* Hero banner — 4 stat cards in a row */
.hero-banner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin: 1.5rem 0;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
}

.hero-stat {
    text-align: center;
    padding: 1.25rem 1rem;
    border-right: 1px solid #e5e7eb;
}

.hero-stat:last-child {
    border-right: none;
}

.hero-value {
    font-size: 2rem;
    font-weight: 700;
    color: #0D7377;
    line-height: 1.2;
}

.hero-label {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
    line-height: 1.3;
}

/* Callout box — teal left border, light background */
.callout-box {
    border-left: 4px solid #0D7377;
    background-color: #E6F2F2;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 0.25rem 0.25rem 0;
}

.callout-box p {
    margin-bottom: 0;
    color: #333;
    line-height: 1.6;
}

/* Section headings */
.methodology-section-heading {
    color: #1B2A4A;
    font-size: 1.375rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    padding-top: 0.5rem;
}

/* Tier tables — navy header, green shading for top quintile */
.tier-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

.tier-table thead tr {
    background-color: #1B2A4A;
}

.tier-table th {
    background-color: #1B2A4A;
    color: #fff;
    font-weight: 600;
    padding: 0.5rem 0.625rem;
    text-align: center;
    font-size: 0.8125rem;
    white-space: nowrap;
}

.tier-table td {
    padding: 0.4rem 0.625rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
    color: #333;
}

.tier-table tbody tr:nth-child(even) {
    background-color: #F0F6F6;
}

.tier-table .top-quintile-row {
    background-color: #EAF4E8 !important;
}

.tier-table .ref-cohort-row {
    background-color: #F0F6F6;
}

.tier-table .baseline-row {
    background-color: #F0F6F6;
    border-top: 2px solid #d1d5db;
}

.teal-accent {
    color: #0D7377;
}

/* AUC table */
.auc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

.auc-table thead tr {
    background-color: #1B2A4A;
}

.auc-table th {
    background-color: #1B2A4A;
    color: #fff;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    text-align: center;
    font-size: 0.8125rem;
}

.auc-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
    color: #333;
}

.auc-table tbody tr:nth-child(even) {
    background-color: #F0F6F6;
}

/* Feature importance table */
.feature-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem 0;
    font-size: 0.875rem;
}

.feature-table thead tr {
    background-color: #1B2A4A;
}

.feature-table th {
    background-color: #1B2A4A;
    color: #fff;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    text-align: center;
    font-size: 0.8125rem;
}

.feature-table td {
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
    color: #333;
}

.feature-table tbody tr:nth-child(even) {
    background-color: #F0F6F6;
}

/* Chart frames */
.chart-frame {
    border: 1px solid #d0d5dd;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    background-color: #FAFBFC;
}

.chart-label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1B2A4A;
    margin-bottom: 0.5rem;
}

.chart-image {
    width: 100%;
    max-width: 600px;
    display: block;
    margin: 0 auto;
}

/* Definitions table */
.definitions-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.875rem;
}

.definitions-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: top;
}

.definitions-table tr:nth-child(even) {
    background-color: #FAFBFC;
}

.definitions-table .def-term {
    width: 140px;
    font-weight: 700;
    color: #1B2A4A;
    white-space: nowrap;
}

.definitions-table .def-desc {
    color: #666;
}

/* Methodology section divider */
.methodology-divider {
    border: none;
    border-top: 1px solid #d0d5dd;
    margin: 2rem 0;
}

/* ============================================================
   9. LP OVERVIEW PAGE
   ============================================================ */

/* Tagline — large italic below main title */
.overview-tagline {
    font-size: 1.25rem;
    font-style: italic;
    color: #0D7377;
    margin-bottom: 2rem;
    font-weight: 500;
}

/* Moat subsections */
.moat-section {
    margin-bottom: 1.25rem;
}

.moat-section h3 {
    margin-bottom: 0.25rem;
}

.moat-section p {
    margin-bottom: 0.5rem;
}

/* Pipeline card grid */
.pipeline-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1rem 0 1.5rem 0;
}

.pipeline-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    background-color: #FAFBFC;
}

.pipeline-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #1B2A4A;
    margin: 0 0 0.25rem 0;
}

.pipeline-card .pipeline-stage {
    font-size: 0.75rem;
    color: #0D7377;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
}

.pipeline-card p:last-child {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Fund terms — two-column key-value */
.terms-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    margin: 1rem 0 1.5rem 0;
}

.terms-row {
    display: flex;
    justify-content: space-between;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.terms-row:nth-child(odd) {
    border-right: 1px solid #e5e7eb;
}

.terms-row:nth-last-child(-n+2) {
    border-bottom: none;
}

.terms-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.terms-value {
    font-size: 0.875rem;
    color: #4b5563;
    text-align: right;
}

/* Manager card */
.manager-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.25rem 1.5rem;
    background-color: #FAFBFC;
    margin: 1rem 0 1.5rem 0;
}

.manager-card h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1B2A4A;
    margin: 0 0 0.125rem 0;
}

.manager-card .manager-role {
    font-size: 0.8125rem;
    color: #0D7377;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.manager-card p:last-child {
    margin-bottom: 0;
}

/* Page break marker (print only) */
.page-break-marker {
    display: none;
}

/* ============================================================
   10. RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    #sidebar {
        display: none;
        position: fixed;
        z-index: 40;
    }
    #sidebar.show {
        display: block;
    }
    main {
        margin-left: 0 !important;
    }
    .hero-banner {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-stat {
        border-bottom: 1px solid #e5e7eb;
    }
    .pipeline-grid {
        grid-template-columns: 1fr;
    }
    .terms-grid {
        grid-template-columns: 1fr;
    }
    .terms-row {
        border-right: none !important;
    }
}
