/* ============================================================
   Art Classifier
   Dark professional design system, modeled on Bump scratch map.
   Inter typography only. Single coral accent.
   ============================================================ */

:root {
    --bg:            #0c0c10;
    --surface:       #15151b;
    --surface-2:     #1e1e26;
    --surface-3:     #262631;
    --border:        rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.13);
    --text-1:        #ececea;
    --text-2:        #9a958e;
    --text-3:        #6b6862;

    --accent:        #ff7a5e;
    --accent-hover:  #ff8c73;
    --accent-deep:   #e85e44;
    --accent-soft:   rgba(255, 122, 94, 0.12);
    --accent-ring:   rgba(255, 122, 94, 0.30);

    --warn:          #f4b250;
    --warn-soft:     rgba(244, 178, 80, 0.10);
    --success:       #92b94a;

    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
}

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

body {
    background: var(--bg);
    color: var(--text-1);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { margin: 0; color: var(--text-1); letter-spacing: -0.01em; }
h1 { font-size: 2rem; font-weight: 600; line-height: 1.15; }
h2 { font-size: 1.15rem; font-weight: 600; }
h3 { font-size: 0.95rem; font-weight: 600; }
p  { margin: 0 0 12px; color: var(--text-2); }
a  { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
.muted { color: var(--text-3); }
.small { font-size: 0.85rem; }

.kicker {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-3);
    margin-bottom: 12px;
}

/* ============================================================
   Layout: top bar + content
   ============================================================ */
.shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---------- Top bar ---------- */
.topbar {
    height: 64px;
    background: rgba(12, 12, 16, 0.85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-2);
    box-shadow: 0 0 0 1px var(--border-strong);
}
.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.brand-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-1);
    letter-spacing: -0.01em;
}
.brand-sub {
    font-size: 0.7rem;
    color: var(--text-3);
    margin-top: 2px;
}

.tabs {
    display: flex;
    gap: 4px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px;
}
.tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 999px;
    color: var(--text-2);
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.tab:hover { color: var(--text-1); background: var(--surface-2); }
.tab.active { color: var(--text-1); background: var(--surface-3); }
.tab .ico { font-size: 0.95rem; filter: grayscale(1) opacity(0.7); transition: filter 0.15s; }
.tab.active .ico { filter: none; }

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
}
.identity-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-2);
    font-size: 0.8rem;
}
.identity-chip .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
}

@media (max-width: 768px) {
    .topbar { height: auto; padding: 12px 18px; flex-wrap: wrap; gap: 12px; }
    .tabs { margin: 0; order: 3; width: 100%; justify-content: center; }
    .topbar-right { display: none; }
}

/* ---------- Content ---------- */
.content {
    flex: 1;
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
    padding: 48px 40px 80px;
}
@media (max-width: 768px) { .content { padding: 28px 18px 60px; } }

/* ---------- Page head ---------- */
.page-head {
    margin-bottom: 36px;
    max-width: 680px;
}
.page-head h1 {
    font-size: 2.2rem;
    line-height: 1.1;
    margin-bottom: 12px;
}
.page-head .lead {
    color: var(--text-2);
    font-size: 1.02rem;
    margin: 0;
    line-height: 1.55;
}

/* ============================================================
   Card
   ============================================================ */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px;
    margin-bottom: 20px;
}
.card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 18px;
    gap: 16px;
}
.card-head h2 { font-size: 1.1rem; font-weight: 600; }
.card-head .meta {
    color: var(--text-3);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 500;
}

/* ============================================================
   Steps
   ============================================================ */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }

.step {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 22px 22px 22px;
    transition: border-color 0.2s, transform 0.2s;
}
.step:hover {
    border-color: var(--border-strong);
    transform: translateY(-1px);
}
.step .num {
    font-size: 0.78rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
    letter-spacing: 1.2px;
    margin-bottom: 14px;
}
.step h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 4px;
}
.step p {
    margin: 0;
    color: var(--text-2);
    font-size: 0.88rem;
    line-height: 1.5;
}

/* ============================================================
   Notice and alerts
   ============================================================ */
.notice {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--warn);
    border-radius: var(--r-md);
    padding: 14px 18px;
    color: var(--text-2);
    font-size: 0.92rem;
    margin-bottom: 22px;
}
.notice strong { color: var(--text-1); font-weight: 600; }

.alert-warn {
    background: var(--warn-soft);
    border: 1px solid rgba(244, 178, 80, 0.30);
    border-left: 3px solid var(--warn);
    border-radius: var(--r-md);
    padding: 14px 18px;
    color: #e8c478;
    font-size: 0.94rem;
    margin-bottom: 22px;
}
.alert-warn strong { color: var(--warn); font-weight: 600; }

.alert-error {
    background: rgba(255, 122, 94, 0.10);
    border: 1px solid rgba(255, 122, 94, 0.30);
    border-left: 3px solid var(--accent);
    border-radius: var(--r-md);
    padding: 12px 16px;
    color: var(--accent-hover);
    font-size: 0.92rem;
    margin-bottom: 14px;
}

/* ============================================================
   Upload zone
   ============================================================ */
.upload-zone {
    display: block;
    border: 1.5px dashed var(--border-strong);
    background: var(--surface-2);
    border-radius: var(--r-lg);
    padding: 44px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.upload-zone:hover {
    border-color: var(--accent);
    background: var(--surface-3);
}
.upload-zone input[type="file"] { display: none; }

.upload-icon {
    width: 44px; height: 44px;
    margin: 0 auto 14px;
    background: var(--accent-soft);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}
.upload-icon svg { width: 20px; height: 20px; stroke: var(--accent); }

.upload-hint {
    color: var(--text-1);
    font-weight: 500;
    font-size: 0.98rem;
}
.upload-sub {
    color: var(--text-3);
    font-size: 0.82rem;
    margin-top: 4px;
}
.file-chip {
    display: none;
    margin-top: 14px;
    background: var(--surface-3);
    padding: 6px 14px;
    border-radius: 999px;
    color: var(--text-1);
    font-weight: 500;
    font-size: 0.85rem;
    border: 1px solid var(--border-strong);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border: none;
    border-radius: 999px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: -0.005em;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
    text-decoration: none;
}
.btn-primary {
    background: var(--accent);
    color: #1a0a06;
    box-shadow: 0 0 0 1px var(--accent), 0 4px 14px rgba(255, 122, 94, 0.30);
}
.btn-primary:hover {
    background: var(--accent-hover);
    color: #1a0a06;
    transform: translateY(-1px);
    box-shadow: 0 0 0 1px var(--accent-hover), 0 6px 18px rgba(255, 122, 94, 0.42);
}
.btn-secondary {
    background: transparent;
    color: var(--text-1);
    border: 1px solid var(--border-strong);
}
.btn-secondary:hover {
    background: var(--surface-2);
    border-color: var(--text-3);
}
.btn-block { width: 100%; }

/* ============================================================
   Category chips
   ============================================================ */
.cat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.cat-chip {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 14px;
    color: var(--text-1);
    font-weight: 500;
    font-size: 0.88rem;
    transition: border-color 0.15s, color 0.15s;
}
.cat-chip:hover {
    border-color: var(--accent);
    color: var(--accent-hover);
}

/* ============================================================
   Result page
   ============================================================ */
.result-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
    align-items: start;
}
@media (max-width: 991px) { .result-grid { grid-template-columns: 1fr; } }

.result-main { padding: 32px; }
.result-image-wrap {
    text-align: center;
    margin-bottom: 22px;
}
.uploaded-img {
    max-width: 200px;
    max-height: 200px;
    border-radius: var(--r-md);
    border: 1px solid var(--border-strong);
    object-fit: contain;
    background: var(--surface-2);
}

.prediction-line {
    text-align: center;
    margin-bottom: 14px;
}
.prediction-label {
    display: inline-block;
    background: var(--accent);
    color: #1a0a06;
    border-radius: 999px;
    padding: 7px 18px;
    font-size: 0.92rem;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: -0.005em;
}
.prediction-conf {
    margin-top: 10px;
    color: var(--text-3);
    font-size: 0.82rem;
}

/* ---------- Arc gauge ---------- */
.gauge-wrap {
    text-align: center;
    margin: 4px 0 18px;
}
.gauge-svg { max-width: 200px; width: 100%; height: auto; }
.gauge-fill { transition: stroke-dashoffset 1s ease; }
.gauge-center { margin-top: -52px; }
.gauge-pct {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-1);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.gauge-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-3);
    font-weight: 600;
    margin-top: 6px;
}

/* ---------- Probability rows ---------- */
.prob-list {
    margin-top: 6px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.section-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-3);
    font-weight: 600;
    margin-bottom: 12px;
}
.prob-row {
    display: grid;
    grid-template-columns: 1fr 64px;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.prob-row:last-child { border-bottom: none; }
.prob-row .name {
    font-weight: 500;
    color: var(--text-1);
    font-size: 0.92rem;
    text-transform: capitalize;
}
.prob-row .name.is-winner { color: var(--accent); font-weight: 600; }
.prob-track {
    height: 4px;
    background: var(--surface-3);
    border-radius: 999px;
    margin-top: 6px;
    overflow: hidden;
}
.prob-fill {
    height: 100%;
    background: var(--text-3);
    border-radius: 999px;
    transition: width 0.8s ease;
}
.prob-fill.is-winner { background: var(--accent); }
.prob-row .pct {
    text-align: right;
    font-weight: 600;
    color: var(--text-1);
    font-variant-numeric: tabular-nums;
    font-size: 0.92rem;
}

/* ---------- Info panel (right side on predict) ---------- */
.info-panel { padding: 28px; }
.info-panel .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 10px;
}
.info-panel h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--text-1);
    line-height: 1.3;
}
.info-panel p {
    color: var(--text-2);
    font-size: 0.92rem;
    line-height: 1.55;
    margin: 0;
}

.info-stats {
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
}
.info-stat {
    background: var(--surface-2);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.15s;
}
.info-stat:hover { background: var(--surface-3); }
.info-stat .k {
    font-size: 0.78rem;
    color: var(--text-3);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}
.info-stat .v {
    color: var(--text-1);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    font-size: 0.92rem;
}
.info-stat .v.is-accent { color: var(--accent); }

/* ============================================================
   Cinematic hero (predict page)
   ============================================================ */
.hero-x {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 24px 96px;
    border-bottom: 1px solid var(--border);
}

.hero-images {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 1280px;
    margin-bottom: 64px;
    will-change: transform;
}
@media (max-width: 991px) {
    .hero-images { grid-template-columns: repeat(4, 1fr); gap: 10px; }
}
@media (max-width: 540px) {
    .hero-images { grid-template-columns: repeat(4, 1fr); gap: 6px; }
}

.hero-img-wrap {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 6px;
    background: var(--surface-2);
}
.hero-img-wrap:nth-child(2n)   { margin-top: 28px; }
.hero-img-wrap:nth-child(4n+3) { margin-top: 14px; }
.hero-img-wrap:nth-child(8n+5) { margin-top: 40px; }
.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.88);
    transition: filter 0.4s, transform 0.6s;
}
.hero-img-wrap:hover .hero-img { filter: brightness(1); transform: scale(1.04); }

.hero-text {
    text-align: center;
    will-change: transform, opacity;
    max-width: 920px;
}

.hero-kicker {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-3);
    margin-bottom: 18px;
}
.hero-kicker .dot {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    margin: 0 8px 1px 0;
    vertical-align: middle;
}

.hero-title {
    font-size: clamp(3rem, 11vw, 8.5rem);
    line-height: 0.95;
    font-weight: 700;
    letter-spacing: -0.035em;
    margin: 0 0 24px;
    color: var(--text-1);
}
.hero-title .accent { color: var(--accent); }

.hero-tag {
    font-size: 1.05rem;
    color: var(--text-2);
    max-width: 560px;
    margin: 0 auto 28px;
    line-height: 1.5;
}

.hero-scroll-cue {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--text-3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.hero-scroll-cue .arrow {
    width: 14px;
    height: 14px;
    border-right: 1.5px solid var(--text-3);
    border-bottom: 1.5px solid var(--text-3);
    transform: rotate(45deg);
    animation: scrollBounce 1.8s infinite;
}
@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.6; }
    50%      { transform: rotate(45deg) translateY(6px); opacity: 1; }
}

/* ============================================================
   Human vs Model quiz
   ============================================================ */
.quiz {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 44px 32px;
    margin-bottom: 40px;
}
.quiz-head {
    text-align: center;
    margin-bottom: 36px;
}
.quiz-head .kicker { margin-bottom: 14px; }
.quiz-head h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin: 0 0 10px;
}
.quiz-head p {
    color: var(--text-2);
    max-width: 520px;
    margin: 0 auto;
    font-size: 1rem;
}

.quiz-stage {
    max-width: 580px;
    margin: 0 auto;
}

.quiz-q { text-align: center; }
.quiz-progress {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--text-3);
    font-weight: 600;
    margin-bottom: 16px;
}
.quiz-img {
    max-width: 100%;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--r-md);
    border: 1px solid var(--border-strong);
    background: var(--surface-2);
    margin-bottom: 22px;
}
.quiz-prompt {
    color: var(--text-2);
    font-size: 0.95rem;
    margin: 0 0 18px;
}

.quiz-choices {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}
@media (max-width: 600px) {
    .quiz-choices { grid-template-columns: repeat(2, 1fr); }
}
.quiz-choices button {
    padding: 13px 6px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text-1);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.quiz-choices button:hover:not(:disabled) {
    border-color: var(--accent);
    background: var(--surface-3);
    color: var(--accent-hover);
}
.quiz-choices button:disabled { cursor: default; opacity: 0.45; }
.quiz-choices button.is-correct {
    background: rgba(146, 185, 74, 0.16);
    border-color: var(--success);
    color: var(--success);
    opacity: 1;
}
.quiz-choices button.is-wrong {
    background: rgba(255, 122, 94, 0.16);
    border-color: var(--accent);
    color: var(--accent);
    opacity: 1;
}

.quiz-reveal {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 20px 22px;
    margin-top: 22px;
    text-align: left;
}
.reveal-row {
    display: grid;
    grid-template-columns: 96px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.reveal-row:last-of-type { border-bottom: none; }
.reveal-row.reveal-truth {
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--border-strong);
    border-bottom: none;
}
.reveal-truth .reveal-pick { color: var(--accent); }
.reveal-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-3);
    font-weight: 600;
}
.reveal-pick {
    color: var(--text-1);
    font-weight: 600;
    font-size: 1rem;
    text-transform: capitalize;
}
.reveal-conf {
    color: var(--text-3);
    font-weight: 500;
    font-size: 0.82rem;
    margin-left: 6px;
}
.reveal-mark {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}
.reveal-mark.ok { background: rgba(146, 185, 74, 0.16); color: var(--success); }
.reveal-mark.no { background: rgba(255, 122, 94, 0.18); color: var(--accent); }

.quiz-result {
    text-align: center;
    padding: 24px 16px 8px;
}
.quiz-result .kicker { margin-bottom: 8px; }
.quiz-result h3 {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 700;
    margin: 0 0 22px;
    letter-spacing: -0.02em;
    color: var(--text-1);
}
.score-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 0 0 26px;
}
.score {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 24px 16px;
}
.score-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-3);
    font-weight: 600;
    margin-bottom: 8px;
}
.score-value {
    font-size: 2.3rem;
    font-weight: 700;
    color: var(--text-1);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    letter-spacing: -0.03em;
}
.score-total {
    font-size: 1.1rem;
    color: var(--text-3);
    font-weight: 600;
    margin-left: 2px;
}
.score.is-winner {
    background: var(--accent-soft);
    border-color: var(--accent);
}
.score.is-winner .score-value,
.score.is-winner .score-label {
    color: var(--accent);
}

/* Scroll-revealed sections */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(.2,.6,.2,1), transform 0.7s cubic-bezier(.2,.6,.2,1);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal.delay-1 { transition-delay: 0.08s; }
.reveal.delay-2 { transition-delay: 0.16s; }
.reveal.delay-3 { transition-delay: 0.24s; }

/* ============================================================
   Tables (performance page)
   ============================================================ */
.table-x {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.92rem;
}
.table-x th, .table-x td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.table-x thead th {
    font-weight: 600;
    color: var(--text-3);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: var(--surface-2);
}
.table-x thead th:first-child { border-top-left-radius: var(--r-md); }
.table-x thead th:last-child  { border-top-right-radius: var(--r-md); }
.table-x tbody td {
    color: var(--text-1);
    font-variant-numeric: tabular-nums;
}
.table-x tbody td:first-child {
    color: var(--text-2);
    font-weight: 500;
}
.table-x tbody tr:last-child td { border-bottom: none; }
.table-x tbody tr:hover { background: var(--surface-2); }

/* ============================================================
   Plot images, confusion matrix grid
   ============================================================ */
.plot-img {
    max-width: 100%;
    border-radius: var(--r-md);
    background: white;       /* matplotlib plots have white bg */
    padding: 4px;
}
.cm-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (max-width: 760px) { .cm-grid { grid-template-columns: 1fr; } }
