/* ============================================================================
   Proposal Page Styles
   ============================================================================ */

.container {
    max-width: 900px;
}

/* ============================================================================
   Report Navigation
   ============================================================================ */

.report-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.report-tabs {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 3px;
}

.report-tab {
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.report-tab:hover {
    color: var(--text-primary);
}

.report-tab.active {
    background: var(--bg-primary);
    color: var(--accent);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.csv-downloads {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.csv-link {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    transition: color 0.15s, border-color 0.15s;
}

.csv-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* ============================================================================
   Rendered Markdown Content
   ============================================================================ */

.proposal-content h1 {
    font-size: 1.75rem;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5rem;
}

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

.proposal-content h2 {
    font-size: 1.25rem;
    margin: 1.75rem 0 0.75rem;
    color: var(--text-primary);
}

.proposal-content h3 {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.5rem;
    color: var(--text-primary);
}

.proposal-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.proposal-content strong {
    font-weight: 600;
}

.proposal-content code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875em;
    background: var(--bg-card);
    padding: 2px 6px;
    border-radius: 4px;
}

.proposal-content pre {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.proposal-content pre code {
    background: none;
    padding: 0;
    font-size: 0.8125rem;
    line-height: 1.6;
}

/* Tables */
.proposal-content table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.proposal-content th {
    background: var(--bg-secondary);
    font-weight: 500;
    color: var(--text-secondary);
}

.proposal-content th,
.proposal-content td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.proposal-content td {
    font-variant-numeric: tabular-nums;
}

/* Images */
.proposal-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin: 1rem 0;
    display: block;
}

/* Lists */
.proposal-content ul,
.proposal-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.proposal-content li {
    margin-bottom: 0.25rem;
    line-height: 1.7;
}

/* Anchor links in headings */
.proposal-content a {
    color: var(--accent);
    text-decoration: none;
}

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

/* ============================================================================
   Collapsible Opcode Sections
   ============================================================================ */

.opcode-section {
    border: 1px solid var(--border-light);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.opcode-section > summary {
    cursor: pointer;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.opcode-section > summary::-webkit-details-marker {
    display: none;
}

.opcode-section > summary::before {
    content: '\25b6';
    font-size: 0.65rem;
    transition: transform 0.15s;
}

.opcode-section[open] > summary::before {
    transform: rotate(90deg);
}

.opcode-section > summary h1 {
    display: inline;
    font-size: 1.1rem;
    margin: 0;
    border: none;
    padding: 0;
}

.opcode-section > :not(summary) {
    padding: 0 1rem;
}

/* ============================================================================
   Responsive
   ============================================================================ */

@media (max-width: 768px) {
    .report-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .report-tabs {
        overflow-x: auto;
    }

    .proposal-content h1 {
        font-size: 1.375rem;
    }

    .proposal-content h2 {
        font-size: 1.125rem;
    }

    .proposal-content table {
        display: block;
        overflow-x: auto;
    }
}
