/* MINIMALIST DESIGN SYSTEM - TIMES NEW ROMAN */
/* Copied from wmbench/vm-web/static/css/base.css. Keep the two in sync when iterating. */

:root {
    --black: #000000;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --gray-medium: #cccccc;
    --gray-dark: #666666;
    --border: #d0d0d0;
}

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

html { font-size: 16px; }

body {
    font-family: 'Times New Roman', Times, serif;
    background: var(--white);
    color: var(--black);
    line-height: 1.6;
    min-height: 100vh;
}

*:focus { outline: 1px solid var(--black); outline-offset: 2px; }

h1, h2, h3, h4, h5, h6 { font-weight: normal; line-height: 1.2; margin-bottom: 1rem; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p { margin-bottom: 1rem; }

a { color: var(--black); text-decoration: underline; }
a:hover { text-decoration: none; }

code {
    font-family: 'Courier New', Courier, monospace;
    background: var(--gray-light);
    padding: 0.2em 0.4em;
    border: 1px solid var(--border);
    border-radius: 3px;
}

pre {
    font-family: 'Courier New', Courier, monospace;
    background: var(--gray-light);
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--black);
    color: var(--white);
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 10001;
}
.skip-link:focus { top: 0; }

.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--black);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: relative;
}

.navbar-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--black);
    text-transform: uppercase;
    letter-spacing: 1px;
    pointer-events: none;
    white-space: nowrap;
}

.navbar-left { display: flex; align-items: center; gap: 2rem; flex: 1; min-width: 0; }
.navbar-brand { flex-shrink: 0; }
.navbar-brand .brand-link {
    font-size: 1.25rem;
    color: var(--black);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.navbar-brand .brand-link:hover { text-decoration: none; opacity: 0.8; }

.navbar-menu { display: flex; gap: 2rem; align-items: center; flex-shrink: 0; }
.nav-item-wrapper { position: relative; }
.nav-link { display: inline-block; padding: 0.5rem 0; color: var(--black); text-decoration: none; }
.nav-link:hover, .nav-link.active { text-decoration: underline; }

.navbar-actions {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: flex-end;
}

.main-content {
    min-height: calc(100vh - 200px);
    padding: 0.9rem 0;
}

.footer {
    background: #fafafa;
    padding: 2rem 0 1.5rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border);
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.footer-left { flex: 1; }
.footer-right { display: flex; gap: 4rem; }
.footer-section { display: flex; flex-direction: column; }
.footer-heading {
    font-size: 0.8rem;
    font-weight: normal;
    margin-bottom: 0.75rem;
    color: var(--gray-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.footer-links li { margin: 0; }
.footer-links a { color: var(--black); text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { text-decoration: underline; }

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.footer-copyright { color: var(--gray-dark); font-size: 0.85rem; margin: 0; }
.footer-tagline { color: var(--gray-dark); font-size: 1.1rem; font-style: italic; margin: 0; letter-spacing: 0.5px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background: var(--white);
    color: var(--black);
    border: 1px solid var(--black);
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-family: 'Times New Roman', Times, serif;
}
.btn:hover { background: var(--black); color: var(--white); }
.btn-primary { background: var(--black); color: var(--white); }
.btn-primary:hover { background: var(--white); color: var(--black); }
.btn-outline { background: var(--white); color: var(--black); border: 1px solid var(--black); }
.btn-outline:hover { background: var(--black); color: var(--white); }
.btn-sm { padding: 0.25rem 0.75rem; font-size: 0.875rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1.125rem; }
.btn.disabled, .btn.disabled:hover {
    background: var(--white);
    color: var(--gray-dark);
    border-color: var(--gray-dark);
    border-style: dashed;
    cursor: not-allowed;
    text-decoration: none;
}

/* ---------- wmbench-public additions ---------- */

.hero {
    border: 1px solid var(--black);
    border-radius: 8px;
    padding: 3rem 2rem;
    margin: 2rem 0;
    text-align: center;
}
.hero h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.hero p.lead { font-size: 1.15rem; color: var(--gray-dark); max-width: 720px; margin: 0 auto 1.5rem; }
.hero .hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.headline-numbers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}
.headline-number {
    border: 1px solid var(--black);
    border-radius: 6px;
    padding: 1.25rem;
    text-align: center;
}
.headline-number .num { font-size: 2.25rem; font-weight: bold; display: block; line-height: 1.1; }
.headline-number .label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--gray-dark); }

.entry-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0 3rem;
}
.entry-card {
    border: 1px solid var(--black);
    border-radius: 6px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--black);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: background 0.15s ease, color 0.15s ease;
}
.entry-card:hover { background: var(--black); color: var(--white); text-decoration: none; }
.entry-card h3 { font-size: 1.4rem; margin: 0; }
.entry-card p { color: var(--gray-dark); margin: 0; }
.entry-card:hover p { color: var(--gray-medium); }
.entry-card.disabled, .entry-card.disabled:hover {
    background: var(--white);
    color: var(--gray-dark);
    border-style: dashed;
    cursor: not-allowed;
}
.entry-card.disabled p { color: var(--gray-medium); }

table.lb {
    border-collapse: collapse;
    width: 100%;
    margin: 1rem 0 2rem;
    font-size: 0.95rem;
}
table.lb th, table.lb td {
    border: 1px solid var(--border);
    padding: 0.55rem 0.8rem;
    text-align: left;
}
table.lb th { background: var(--gray-light); font-weight: bold; }
table.lb tbody tr:hover { background: var(--gray-light); }
table.lb td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.lb th.num { text-align: right; }

table.lb-paper th.lb-paper-group { text-align: center; }
table.lb-paper th.lb-paper-model,
table.lb-paper td.lb-paper-model { text-align: left; white-space: nowrap; }
table.lb-paper td.is-best { background: rgba(0, 0, 0, 0.06); }
table.lb-paper td.is-second { background: rgba(0, 0, 0, 0.025); }

.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--gray-light);
}
.filters .filter { display: flex; flex-direction: column; gap: 0.25rem; min-width: 160px; }
.filters label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--gray-dark); }
.filters select, .filters input[type="text"] {
    border: 1px solid var(--black);
    border-radius: 4px;
    padding: 0.4rem 0.5rem;
    background: var(--white);
    font-family: 'Times New Roman', Times, serif;
}

.caveat {
    border-left: 3px solid var(--black);
    background: var(--gray-light);
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--gray-dark);
}

.placeholder {
    border: 1px dashed var(--gray-medium);
    border-radius: 6px;
    padding: 2.5rem;
    text-align: center;
    color: var(--gray-dark);
    margin: 1rem 0;
}

/* ---------- video grid + cards ---------- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin: 1rem 0 2rem;
}
.video-card {
    border: 1px solid var(--border);
    border-radius: 6px;
    margin: 0;
    padding: 0;
    background: var(--white);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.video-card video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--black);
    object-fit: cover;
    display: block;
}
.video-card figcaption {
    padding: 0.55rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.9rem;
}
.video-card .model { font-weight: bold; }
.video-card .meta { color: var(--gray-dark); font-size: 0.8rem; }
.video-card .prompt-text {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--gray-dark);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.video-card figcaption.figcaption-inline {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: nowrap;
    min-width: 0;
}
.video-card figcaption.figcaption-inline > .model,
.video-card figcaption.figcaption-inline > .meta {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.video-card figcaption.figcaption-inline > .model {
    flex: 1 1 auto;
}
.video-card figcaption.figcaption-inline > .meta {
    flex: 0 1 auto;
    font-size: 0.78rem;
    text-align: right;
}
.video-card figcaption.figcaption-inline > .model a,
.video-card figcaption.figcaption-inline > .meta a {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- gallery tabs + nav ---------- */
.gallery-tabs {
    display: flex;
    gap: 0;
    border: 1px solid var(--black);
    border-radius: 4px;
    overflow: hidden;
    width: fit-content;
    margin: 1rem 0;
}
.gallery-tab {
    padding: 0.5rem 1.25rem;
    background: var(--white);
    color: var(--black);
    border: none;
    border-right: 1px solid var(--black);
    cursor: pointer;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1rem;
}
.gallery-tab:last-child { border-right: none; }
.gallery-tab.active { background: var(--black); color: var(--white); }
.gallery-tab:hover:not(.active) { background: var(--gray-light); }

.gallery-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--gray-light);
}
.gallery-nav-item {
    padding: 0.4rem 0.85rem;
    background: var(--white);
    color: var(--black);
    border: 1px solid var(--black);
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Times New Roman', Times, serif;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.gallery-nav-item.active { background: var(--black); color: var(--white); }
.gallery-nav-item:hover:not(.active) { background: var(--gray-light); }
.badge {
    display: inline-block;
    padding: 0.05rem 0.4rem;
    background: var(--gray-light);
    color: var(--gray-dark);
    border: 1px solid var(--border);
    font-size: 0.75rem;
    border-radius: 999px;
}
.gallery-nav-item.active .badge { background: var(--white); color: var(--black); }
.law-thumb {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--white);
}
.gallery-nav-item.active .law-thumb { background: var(--white); }
.law-icon {
    display: inline-block;
    font-size: 1.05em;
    line-height: 1;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif;
}

.lb-permalink {
    margin-left: 0.4rem;
    color: var(--gray-dark);
    text-decoration: none;
    font-weight: bold;
}
.lb-permalink:hover { color: var(--black); text-decoration: underline; }

/* ---------- modal (by-law detail panel) ---------- */
.modal {
    border: 1px solid var(--black);
    border-radius: 8px;
    background: var(--white);
    color: var(--black);
    padding: 1.5rem;
    max-width: 720px;
    width: 90%;
    font-family: 'Times New Roman', Times, serif;
}
.modal::backdrop { background: rgba(0, 0, 0, 0.4); }
.modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 1.25rem;
    background: var(--white);
    border: 1px solid var(--black);
    border-radius: 4px;
    cursor: pointer;
}
.video-card-ref {
    border: 2px solid var(--black);
    border-radius: 6px;
    box-shadow: 2px 2px 0 var(--gray-medium);
}

/* ---------- leaderboard sortable + expandable ---------- */
table.lb th[data-sort] {
    cursor: pointer;
    user-select: none;
}
table.lb th[data-sort]:hover { background: var(--gray-medium); }
table.lb th[data-sort][aria-sort="ascending"]::after { content: " ▲"; font-size: 0.7em; }
table.lb th[data-sort][aria-sort="descending"]::after { content: " ▼"; font-size: 0.7em; }
table.lb tr.lb-row.hidden { display: none; }
.lb-expand {
    padding: 0.1rem 0.5rem;
    font-size: 0.8rem;
}

/* ---------- model meta dl ---------- */
.model-meta {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 1rem;
    row-gap: 0.4rem;
    margin: 1rem 0 2rem;
    font-size: 0.95rem;
}
.model-meta dt {
    color: var(--gray-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
}
.model-meta dd { margin: 0; }

@media (max-width: 768px) {
    .footer-main { flex-direction: column; gap: 2rem; }
    .footer-left { text-align: center; }
    .footer-right { flex-direction: column; align-items: center; gap: 1.5rem; text-align: center; width: 100%; }
    .footer-bottom { flex-direction: column; gap: 0.25rem; }
    .navbar-container { flex-wrap: wrap; }
    .navbar-left { width: 100%; justify-content: space-between; }
    .navbar-title { position: static; transform: none; left: auto; width: 100%; text-align: center; font-size: 1.5rem; margin: 0.5rem 0; order: 3; }
}
