/* LegacyCodeBench Static Web UI Styles
   Calm, research-oriented aesthetic inspired by SWE-bench
*/

:root {
    font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1f2933;
    background-color: #f8fafc;
    line-height: 1.6;
    --accent: #3b5bcc;
    --accent-muted: #d9e0ff;
    --border: #e2e8f0;
    --muted-text: #4b5563;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--muted-text);
    background-color: #ffffff;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
}

header {
    border-bottom: 1px solid var(--border);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo {
    font-weight: 600;
    font-size: 1.1rem;
    color: #111827;
}

nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

nav a {
    color: #111827;
    opacity: 0.7;
    font-size: 0.95rem;
}

nav a.active,
nav a:hover,
nav a:focus {
    opacity: 1;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4rem;
}

.hero {
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.hero p {
    max-width: 720px;
    font-size: 1.1rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    background: #fff;
}

.card h3 {
    margin-top: 0;
    color: #0f172a;
}

.btn-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.button {
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-weight: 500;
    color: #0f172a;
    background: #fff;
}

.button.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.section-title {
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: #0f172a;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th,
td {
    border: 1px solid var(--border);
    padding: 0.85rem;
    text-align: left;
    background: #fff;
}

th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    font-size: 0.9rem;
    color: #0f172a;
}

td {
    font-size: 0.92rem;
}

.table-hint {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.5rem;
}

.tooltip {
    cursor: help;
    border-bottom: 1px dotted var(--accent);
}

.state {
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.95rem;
    color: #475569;
}

.code-block {
    background: #0f172a;
    color: #f8fafc;
    padding: 1rem;
    border-radius: 10px;
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 0.95rem;
    overflow-x: auto;
}

footer {
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    padding: 2rem 1rem;
    font-size: 0.9rem;
    color: #475569;
    background: #fff;
}

footer a {
    color: var(--accent);
}

.faq {
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 1rem;
    background: #fff;
}

.faq summary {
    padding: 0.9rem 1rem;
    cursor: pointer;
    font-weight: 500;
    color: #0f172a;
}

.faq p {
    margin: 0;
    padding: 0 1rem 1rem;
}

.list-muted {
    color: #475569;
    padding-left: 1.25rem;
}

.diagram-placeholder {
    border: 1px dashed var(--border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.95rem;
    margin-top: 1.5rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: var(--accent-muted);
    color: var(--accent);
}

.dataset-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dataset-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #475569;
}

.anchor-nav {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.anchor-nav a {
    font-weight: 500;
    color: var(--accent);
}

.leaderboard-placeholder,
.datasets-placeholder {
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    background: #fff;
    text-align: center;
    color: #94a3b8;
}

@media (max-width: 768px) {
    header nav {
        flex-wrap: wrap;
    }
    
    th {
        top: 110px;
    }
}

