/* TAD Report - Black & White + Poppins */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #000;
    --bg-card: #0a0a0a;
    --bg-highlight: #111;
    --border: #222;
    --border-light: #333;
    --text: #eee;
    --text-secondary: #999;
    --text-muted: #666;
    --accent: #fff;
    --negative: #ccc;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.report-container {
    max-width: 880px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

/* Header */
.report-header {
    text-align: center;
    margin-bottom: 56px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}

.report-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
}

.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8em;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.back-link:hover {
    color: var(--text);
}

.report-header h1 {
    font-size: 2.4em;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 12px;
    color: var(--text);
}

.report-subtitle {
    font-size: 0.95em;
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.report-meta {
    font-size: 0.78em;
    color: var(--text-muted);
    font-weight: 400;
}

/* Sections */
.report-section {
    margin-bottom: 56px;
    padding-bottom: 56px;
    border-bottom: 1px solid var(--border);
}

.report-section:last-of-type {
    border-bottom: none;
}

.report-section h2 {
    font-size: 1.4em;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.section-desc {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.7;
    font-weight: 300;
}

/* Highlight sections */
.highlight-section {
    background: var(--bg-highlight);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 32px;
    margin-left: -32px;
    margin-right: -32px;
}

/* Key findings */
.key-finding {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.finding-stat {
    text-align: center;
    padding: 16px 8px;
}

.stat-number {
    display: block;
    font-size: 2em;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 4px;
}

.stat-number.negative {
    color: #4da6e8;
}

.stat-label {
    font-size: 0.72em;
    color: var(--text-muted);
    line-height: 1.4;
    font-weight: 400;
}

.finding-text {
    font-size: 0.85em;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
    font-weight: 300;
}

/* Flaw comparison */
.flaw-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.flaw-card {
    padding: 20px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.flaw-bad {
    background: #0a0a0a;
}

.flaw-good {
    background: #0f0f0f;
    border-color: var(--border-light);
}

.flaw-card h4 {
    font-size: 0.82em;
    font-weight: 600;
    margin-bottom: 10px;
}

.flaw-card p {
    font-size: 0.78em;
    color: var(--text-secondary);
    line-height: 1.6;
    font-weight: 300;
}

.flaw-result {
    margin-top: 8px;
    font-style: italic;
    color: var(--text-muted) !important;
}

.distance-context {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px 20px;
}

.distance-context p {
    font-size: 0.82em;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Charts */
.chart-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 16px;
    height: 340px;
    position: relative;
}

.chart-wrapper.chart-tall {
    height: 420px;
}

/* Tables */
.chart-table {
    margin-top: 16px;
    overflow-x: auto;
}

.chart-table table,
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78em;
}

.chart-table th,
th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.chart-table td,
td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-weight: 300;
}

/* Implications */
.implications {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.implication-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 20px;
}

.implication-card h4 {
    font-size: 0.82em;
    font-weight: 600;
    margin-bottom: 8px;
}

.implication-card p {
    font-size: 0.78em;
    color: var(--text-secondary);
    line-height: 1.6;
    font-weight: 300;
}

/* Methodology */
.methodology-section {
    font-size: 0.88em;
}

.methodology-steps {
    padding-left: 20px;
    margin-bottom: 24px;
}

.methodology-steps li {
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.88em;
    line-height: 1.6;
    font-weight: 300;
}

.data-sources,
.caveats {
    margin-top: 24px;
}

.data-sources h4,
.caveats h4 {
    font-size: 0.82em;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.data-sources ul,
.caveats ul {
    list-style: none;
    padding: 0;
}

.data-sources li,
.caveats li {
    font-size: 0.82em;
    color: var(--text-secondary);
    margin-bottom: 6px;
    padding-left: 12px;
    border-left: 2px solid var(--border);
    line-height: 1.5;
    font-weight: 300;
}

/* Footer */
.report-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.75em;
    color: var(--text-muted);
    font-weight: 300;
}

.report-footer p {
    margin-bottom: 4px;
}

/* Map */
#report-map {
    height: 500px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.map-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
    font-size: 0.82em;
    color: var(--text-secondary);
}

.map-controls label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 400;
}

.map-controls input[type="radio"] {
    accent-color: #fff;
}

.map-legend {
    display: flex;
    gap: 14px;
    font-size: 0.75em;
    color: var(--text-muted);
    flex-wrap: wrap;
    margin-top: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.legend-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.map-footnote {
    font-size: 0.72em;
    color: var(--text-muted);
    margin-top: 8px;
    font-weight: 300;
}

/* Robustness grid */
.robustness-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 20px;
}

.robustness-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 18px;
}

.robustness-item h4 {
    font-size: 0.82em;
    font-weight: 600;
    margin-bottom: 8px;
}

.robustness-item p {
    font-size: 0.78em;
    line-height: 1.6;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Counterarguments */
.counterarguments {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.counter-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.counter-item summary {
    padding: 14px 18px;
    cursor: pointer;
    font-size: 0.85em;
    color: var(--text);
    font-weight: 500;
}

.counter-item summary:hover {
    background: #111;
}

.counter-item p {
    padding: 0 18px 14px;
    font-size: 0.8em;
    line-height: 1.7;
    color: var(--text-secondary);
    font-weight: 300;
}

.counter-item[open] {
    border-color: var(--border-light);
}

/* Verdicts */
.verdict-outperforms { color: #8bc472; font-weight: 600; }
.verdict-similar { color: #999; font-weight: 600; }
.verdict-underperforms { color: #e85d5d; font-weight: 600; }

/* Data download */
.data-download {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 18px 22px;
    margin-bottom: 20px;
    text-align: left;
}

.data-download h4 {
    font-size: 0.82em;
    font-weight: 600;
    margin-bottom: 8px;
}

.data-download p {
    font-size: 0.78em;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 300;
}

.data-download ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.data-download li a {
    display: inline-block;
    font-size: 0.72em;
    padding: 4px 10px;
    background: #111;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 400;
}

.data-download li a:hover {
    background: #1a1a1a;
    color: var(--text);
}

/* Responsive */
@media (max-width: 720px) {
    .key-finding {
        grid-template-columns: 1fr;
    }
    .flaw-comparison,
    .implications,
    .robustness-grid {
        grid-template-columns: 1fr;
    }
    .highlight-section {
        margin-left: -16px;
        margin-right: -16px;
        padding: 20px;
    }
}
