<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{TITLE}} - Deep Research Report</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 14px;
            line-height: 1.5;
            color: #1a1a1a;
            background: #ffffff;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            background: white;
        }

        .header {
            background: #003d5c;
            color: white;
            padding: 25px 40px;
            border-bottom: 3px solid #002840;
        }

        .header h1 {
            font-size: 26px;
            font-weight: 600;
            margin-bottom: 8px;
            letter-spacing: -0.5px;
        }

        .header-meta {
            font-size: 13px;
            color: #b8d4e6;
            display: flex;
            gap: 25px;
        }

        .metrics-dashboard {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 0;
            border-bottom: 2px solid #003d5c;
        }

        .metric {
            padding: 20px 30px;
            background: #f8f9fa;
            border-right: 1px solid #d1d5db;
            text-align: center;
        }

        .metric:last-child {
            border-right: none;
        }

        .metric-number {
            font-size: 32px;
            font-weight: 700;
            color: #003d5c;
            display: block;
            margin-bottom: 6px;
        }

        .metric-label {
            font-size: 12px;
            color: #4a5568;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            font-weight: 500;
        }

        .content {
            padding: 30px 40px;
        }

        .section {
            margin-bottom: 30px;
        }

        .section-title {
            font-size: 20px;
            font-weight: 700;
            color: #003d5c;
            margin: 32px 0 16px 0;
            padding-bottom: 8px;
            border-bottom: 2px solid #003d5c;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            line-height: 1.3;
        }

        .subsection-title {
            font-size: 16px;
            font-weight: 700;
            color: #1a1a1a;
            margin: 24px 0 12px 0;
            line-height: 1.4;
        }

        .executive-summary {
            background: #f8f9fa;
            padding: 20px;
            margin-bottom: 30px;
            border-left: 4px solid #003d5c;
        }

        .executive-summary p {
            margin-bottom: 12px;
            font-size: 14px;
            line-height: 1.6;
        }

        p {
            margin-bottom: 14px;
            line-height: 1.7;
            text-align: left;
        }

        /* Better paragraph spacing in content sections */
        .content > p,
        .section p {
            margin-bottom: 16px;
        }

        .findings-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
            margin-bottom: 30px;
        }

        .finding-card {
            background: #f8f9fa;
            padding: 18px;
            border-left: 3px solid #003d5c;
        }

        .finding-card h3 {
            font-size: 14px;
            font-weight: 700;
            color: #003d5c;
            margin-bottom: 10px;
        }

        .finding-card p {
            font-size: 13px;
            line-height: 1.5;
            margin-bottom: 8px;
        }

        .data-table {
            width: 100%;
            border-collapse: collapse;
            margin: 15px 0;
            font-size: 13px;
        }

        .data-table th {
            background: #003d5c;
            color: white;
            padding: 10px 15px;
            text-align: left;
            font-weight: 600;
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .data-table td {
            padding: 10px 15px;
            border-bottom: 1px solid #e5e7eb;
        }

        .data-table tr:hover {
            background: #f8f9fa;
        }

        ul, ol {
            margin: 16px 0 16px 28px;
            padding-left: 0;
        }

        li {
            margin-bottom: 10px;
            font-size: 14px;
            line-height: 1.6;
            padding-left: 8px;
        }

        /* Nested lists */
        li ul, li ol {
            margin-top: 10px;
            margin-bottom: 10px;
        }

        /* Better bullet/number spacing */
        ol {
            list-style-position: outside;
            padding-left: 0;
        }

        ul {
            list-style-position: outside;
            padding-left: 0;
        }

        .key-insight {
            background: white;
            border: 1px solid #d1d5db;
            border-left: 3px solid #003d5c;
            padding: 15px;
            margin: 15px 0;
        }

        .key-insight strong {
            color: #003d5c;
            font-weight: 600;
        }

        .citation {
            color: #003d5c;
            font-weight: 600;
            text-decoration: none;
            cursor: pointer;
            position: relative;
            padding: 2px 4px;
            background: #f0f7fc;
            border-radius: 2px;
            transition: all 0.2s ease;
        }

        .citation:hover {
            background: #003d5c;
            color: white;
        }

        /* Attribution Gradients (2025 Enhancement) */
        .citation-tooltip {
            display: none;
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            margin-bottom: 8px;
            background: white;
            border: 2px solid #003d5c;
            box-shadow: 0 4px 12px rgba(0, 61, 92, 0.15);
            padding: 12px;
            min-width: 300px;
            max-width: 500px;
            z-index: 1000;
            font-size: 12px;
            line-height: 1.5;
        }

        .citation:hover .citation-tooltip {
            display: block;
        }

        .tooltip-title {
            font-weight: 700;
            color: #003d5c;
            margin-bottom: 8px;
            font-size: 13px;
            border-bottom: 1px solid #d1d5db;
            padding-bottom: 6px;
        }

        .tooltip-source {
            color: #4a5568;
            margin-bottom: 8px;
            font-style: italic;
        }

        .tooltip-claim {
            background: #f8f9fa;
            padding: 8px;
            margin-top: 8px;
            border-left: 3px solid #003d5c;
            font-size: 11px;
        }

        .tooltip-claim-label {
            font-weight: 600;
            color: #003d5c;
            text-transform: uppercase;
            font-size: 10px;
            letter-spacing: 0.5px;
            margin-bottom: 4px;
        }

        .evidence-chain {
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid #d1d5db;
        }

        .evidence-chain-label {
            font-weight: 600;
            color: #003d5c;
            font-size: 11px;
            margin-bottom: 6px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .evidence-step {
            padding: 6px;
            background: #f8f9fa;
            margin-bottom: 4px;
            font-size: 11px;
            border-left: 2px solid #d1d5db;
            padding-left: 8px;
        }

        .bibliography {
            background: #f8f9fa;
            padding: 30px;
            margin-top: 40px;
            border-left: 4px solid #003d5c;
        }

        .bibliography-content {
            background: #f8f9fa;
            padding: 20px 0;
        }

        .bib-entry {
            margin-bottom: 18px;
            padding-left: 50px;
            text-indent: -50px;
            line-height: 1.6;
            font-size: 13px;
        }

        .bib-number {
            color: #003d5c;
            font-weight: 700;
            margin-right: 8px;
        }

        .bib-entry a {
            color: #003d5c;
            word-wrap: break-word;
            text-decoration: none;
        }

        .bib-entry a:hover {
            text-decoration: underline;
        }

        .compact-list {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
            margin: 15px 0;
        }

        .compact-list li {
            margin-bottom: 8px;
            font-size: 13px;
        }

        .info-box {
            background: white;
            border: 1px solid #d1d5db;
            padding: 15px;
            margin: 15px 0;
        }

        .info-box h4 {
            font-size: 13px;
            font-weight: 700;
            color: #003d5c;
            margin-bottom: 8px;
            text-transform: uppercase;
        }

        .highlight-stat {
            font-weight: 700;
            color: #003d5c;
        }

        strong {
            font-weight: 600;
            color: #1a1a1a;
        }

        @media print {
            .container {
                max-width: 100%;
            }
        }

        @media (max-width: 768px) {
            .metrics-dashboard {
                grid-template-columns: repeat(2, 1fr);
            }
            .findings-grid {
                grid-template-columns: 1fr;
            }
            .compact-list {
                grid-template-columns: 1fr;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>{{TITLE}}</h1>
            <div class="header-meta">
                <span>{{DATE}}</span>
                <span>•</span>
                <span>{{SOURCE_COUNT}} Sources</span>
            </div>
        </div>

        {{METRICS_DASHBOARD}}

        <div class="content">
            {{CONTENT}}

            <div class="bibliography">
                <div class="section-title">Bibliography</div>
                {{BIBLIOGRAPHY}}
            </div>

        </div>
    </div>
</body>
</html>
