/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 24px; }

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--border-color);
}
.logo-section { display: flex; align-items: center; gap: 16px; }
.logo { height: 32px; width: auto; }
.logo-divider { width: 1px; height: 24px; background: var(--border-color); }
.logo-subtitle, .nav-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
}
.logo-subtitle:hover, .nav-link:hover { color: var(--transcend-blue); }
.nav-link.active { color: var(--transcend-blue); font-weight: 600; }
.auth-section { display: flex; align-items: center; gap: 12px; }
.user-photo { width: 32px; height: 32px; border-radius: 50%; }
.user-name { font-size: 0.9rem; color: var(--text-secondary); }
.sign-out-btn {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
}
.sign-out-btn:hover { color: var(--danger-red); }

/* Confidential Banner */
.confidential-banner {
    background: #1e3a8a;
    border-radius: 6px;
    padding: 10px 16px;
    max-width: 900px;
    margin: 0 auto 24px auto;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Back Link */
.back-link {
    display: block;
    max-width: 900px;
    margin: 0 auto 24px auto;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
}
.back-link:hover { color: var(--transcend-blue); }

/* Page Header */
.page-header {
    max-width: 900px;
    margin: 0 auto 40px auto;
}
.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.page-meta { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.page-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #dbeafe;
    color: #1e40af;
}

/* Report Content Container */
.report-content {
    max-width: 900px;
    margin: 0 auto;
}

/* Footer */
.footer {
    max-width: 900px;
    margin: 40px auto 0 auto;
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Auth States */
.loading-state, .auth-required, .access-denied {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--transcend-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body { display: none; }
.auth-copy { margin: 16px 0 24px; }
.auth-copy-muted { color: var(--text-secondary); }
.no-underline { text-decoration: none; }
.comments-empty-help { font-size: 12px; margin-top: 8px; }

.page-contract,
.source-freshness {
    max-width: 900px;
    margin: 0 auto 18px;
    padding: 18px 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #f8fafc;
}

.page-contract {
    border-left: 4px solid #1e3a8a;
}

.page-contract h2 {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin: 0 0 8px;
    padding: 0;
    border: 0;
}

.page-contract p,
.source-freshness p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.6;
}

.access-summary {
    max-width: 900px;
    margin: 0 auto 18px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.access-summary > div {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    padding: 14px;
}

.access-label,
.source-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.access-summary span:last-child {
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.source-freshness {
    border-left: 4px solid #0f766e;
    background: #f0fdfa;
}

.monitoring-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 20px 0 24px;
}

.monitoring-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
    padding: 16px 18px;
}

.monitoring-card h3 {
    margin-top: 0;
}

/* ========== REPORT STYLES (from source) ========== */

/* Reset */


/* Base - Grey gutters for screen, white for print */


/* Document wrapper - white paper effect */


/* Brand Header Bar */






/* Title Section */












/* Main Content */


/* Headings - Clean hierarchy with breathing room */
h2 {
    font-family: 'Public Sans', sans-serif;
    font-size: 18pt;
    font-weight: 700;
    color: #1E3A8A;
    margin: 40px 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
    letter-spacing: -0.3px;
}

h2:first-of-type {
    margin-top: 8px;
}

h3 {
    font-family: 'Public Sans', sans-serif;
    font-size: 14pt;
    font-weight: 600;
    color: #111827;
    margin: 28px 0 10px 0;
    letter-spacing: -0.2px;
}

h4 {
    font-family: 'Public Sans', sans-serif;
    font-size: 11pt;
    font-weight: 600;
    color: #6b7280;
    margin: 20px 0 8px 0;
}

/* Paragraphs */
p {
    margin-bottom: 14px;
    orphans: 3;
    widows: 3;
}

/* Links */
a {
    color: #2c5aa0;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Tables - Rounded corners, cleaner styling */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0 24px 0;
    font-size: 10pt;
    table-layout: auto;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

thead {
    background: #1E3A8A;
}

th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 9pt;
    min-width: 70px;
    letter-spacing: 0.3px;
    border-bottom: 1px solid #1e3060;
}

th:first-child {
    border-top-left-radius: 7px;
}

th:last-child {
    border-top-right-radius: 7px;
    min-width: 100px;
}

/* Prevent text-heavy columns from being squashed */
td:last-child {
    min-width: 100px;
}

td {
    padding: 9px 14px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
    font-family: 'Inter', sans-serif;
    font-size: 9pt;
    font-variant-numeric: tabular-nums;
}

/* Last row - no bottom border, rounded corners */
tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:last-child td:first-child {
    border-bottom-left-radius: 7px;
}

tbody tr:last-child td:last-child {
    border-bottom-right-radius: 7px;
}

tbody tr:nth-child(even) {
    background: #fafbfc;
}

tbody tr:hover {
    background: #f5f7fa;
}

/* Text emphasis colors (use inline spans in markdown) */
.text-positive, .text-good {
    color: #27ae60;
    font-weight: 500;
}

.text-negative, .text-issue {
    color: #dc2626;
    font-weight: 500;
}

.text-warning, .text-muted {
    color: #f59e0b;
}

.text-emphasis, .text-key {
    color: #1E3A8A;
    font-weight: 600;
}

.text-secondary {
    color: #6b7280;
}

/* Labels (colored inline badges) */
.label {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 9pt;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.label-blue {
    background: #e8f0f8;
    color: #1E3A8A;
}

.label-green {
    background: #dcfce7;
    color: #166534;
}

.label-red {
    background: #fee2e2;
    color: #991b1b;
}

.label-amber {
    background: #fef3c7;
    color: #92400e;
}

/* Callout boxes (for key insights, action items) */
.callout {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 20px 0;
}

.callout-title {
    font-family: 'Public Sans', sans-serif;
    font-weight: 600;
    font-size: 10pt;
    color: #1E3A8A;
    margin-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
}

.callout-blue {
    border-left: 4px solid #2c5aa0;
}

.callout-green {
    border-left: 4px solid #27ae60;
}

.callout-red {
    border-left: 4px solid #dc2626;
}

/* Profile Cards (Competitor/Company profiles) */
.profile-card {
    margin: 32px 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 2px solid #1E3A8A;
}

.profile-header-left {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.profile-number {
    font-size: 28px;
    font-weight: 800;
    color: #1E3A8A;
    opacity: 0.25;
    line-height: 1;
    min-width: 40px;
}

.profile-title {
    font-size: 16pt;
    font-weight: 700;
    color: #1E3A8A;
    margin: 0 0 4px 0;
}

.profile-company {
    font-size: 10pt;
    color: #6b7280;
    font-weight: 500;
}

.profile-stats {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.profile-stat {
    font-size: 9pt;
    color: #6b7280;
}

.profile-stat-value {
    font-weight: 700;
    color: #1E3A8A;
    font-size: 11pt;
}

.profile-

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
    padding: 12px 16px;
    background: #fafbfc;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 9pt;
}

.profile-meta-item {
    color: #6b7280;
}

.profile-meta-item a {
    color: #2c5aa0;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.profile-section {
    padding: 16px;
    background: #fafbfc;
    border-radius: 6px;
}

.profile-section h4 {
    font-size: 8pt;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6b7280;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
}

.profile-section ul {
    margin: 0;
    padding-left: 16px;
}

.profile-section li {
    margin-bottom: 6px;
    font-size: 10pt;
}

.profile-relevance {
    background: #eff6ff;
    border-left: 4px solid #1E3A8A;
    padding: 16px 20px;
    border-radius: 0 6px 6px 0;
}

.profile-relevance h4 {
    color: #1E3A8A;
    font-weight: 600;
    font-size: 10pt;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-relevance h4::before {
    content: "🎯";
}

.profile-relevance ul {
    margin: 0;
    padding-left: 16px;
}

.profile-relevance li {
    margin-bottom: 6px;
    font-size: 10pt;
}

/* Print: profile grid becomes single column */
@media print {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

/* Blockquotes / Key Points */
blockquote {
    background: #f8fafc;
    border-left: 3px solid #2c5aa0;
    padding: 14px 18px;
    margin: 18px 0;
    font-style: italic;
    color: #6b7280;
}

/* Code */
code {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 9pt;
    background: #f1f5f9;
    padding: 2px 5px;
    border-radius: 3px;
    color: #475569;
}

pre.code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 14px 18px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 18px 0;
    font-size: 9pt;
}

pre.code-block code {
    background: transparent;
    padding: 0;
    color: inherit;
}

/* Lists */
ul, ol {
    margin: 14px 0;
    padding-left: 22px;
}

li {
    margin-bottom: 6px;
}

/* Horizontal Rule */
hr {
    border: none;
    height: 1px;
    background: #e5e7eb;
    margin: 28px 0;
}

/* Images */
figure {
    margin: 24px 0;
    text-align: center;
}

figure.inline-image {
    display: inline-block;
    margin: 8px;
}

figure img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

figcaption {
    font-size: 10pt;
    color: #6b7280;
    margin-top: 8px;
    font-style: italic;
}

/* Metrics */
.metric-positive {
    color: #27ae60;
    font-weight: 700;
}

.metric-negative {
    color: #dc2626;
    font-weight: 700;
}

.metric-neutral {
    color: #6b7280;
    font-weight: 600;
}

/* Footer */


.footer p {
    font-size: 9pt;
    color: #6b7280;
    margin-bottom: 2px;
}

/* Table of Contents */
.toc {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 18px 22px;
    margin: 20px 0 28px 0;
}

.toc h3 {
    font-family: 'Public Sans', sans-serif;
    font-size: 11pt;
    font-weight: 600;
    color: #111827;
    margin: 0 0 12px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.toc ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
    columns: 2;
    column-gap: 24px;
}

.toc > ul > li {
    margin-bottom: 6px;
    break-inside: avoid;
    font-size: 10pt;
}

.toc ul ul {
    padding-left: 16px;
    margin-top: 4px;
    columns: 1;
}

.toc ul ul li {
    margin-bottom: 3px;
}

.toc a {
    color: #6b7280;
    text-decoration: none;
}

.toc a:hover {
    color: #2c5aa0;
}

/* Print Styles */
@media print {
    /* Remove grey gutters for print */






    thead {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .toc {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    h2, h3 {
        page-break-after: avoid;
    }

    table, figure, blockquote {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .toc {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    pre.code-block {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    li {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .page-break {
        page-break-before: always;
    }

    /* Print link URLs */
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #6b7280;
    }

    /* Don't print TOC link URLs */
    .toc a::after {
        content: none;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container { padding: 16px; }
    .access-summary,
    .monitoring-grid,
    .profile-grid {
        grid-template-columns: 1fr;
    }
    .toc ul { columns: 1; }
    .profile-header { flex-direction: column; gap: 14px; }

    table {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        font-size: 10pt;
    }

    th, td {
        padding: 8px 12px;
    }
}


/* Override narrow widths from source */
.document { max-width: 100%; box-shadow: none; }
