/* Top Video Models: page-specific pieces on top of ai-analysis.css + top-models.css */

/* Leaderboard: four bars instead of three */
.vboard-head, #board .b-row { grid-template-columns: 36px minmax(220px, 1.3fr) 1fr 1fr 1fr 1fr; }
.vboard-head { text-align: center; }
.b-fill.t2v { background: var(--frontier); }
.b-fill.i2v { background: var(--lane-0); }
.b-fill.obey { background: var(--lane-6); }
.b-fill.iter { background: var(--lane-2); }
.b-val.miss { margin-left: 0; color: var(--text-muted); font-weight: 400; font-size: 0.78rem; }

/* Subscriptions table */
#budgetChips { align-items: center; margin-bottom: 12px; justify-content: center; }
#budgetChips .chip-sep:first-child { margin-left: 0; }
.plans-table th, .plans-table td { text-align: center; vertical-align: middle; }
.plans-table th:first-child, .plans-table td:first-child { text-align: left; white-space: nowrap; }
.plans-table td small.sub { display: block; color: var(--text-muted); font-size: 0.72rem; }
.plans-table td.vids { min-width: 150px; }
.plans-table .v-num { font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.plans-table .v-bar { height: 4px; border-radius: 2px; background: var(--frontier); margin: 4px auto 0; max-width: 100%; }
.plans-table .unl { font-size: 0.68rem; font-weight: 600; color: var(--lane-2); border: 1px solid rgba(38, 230, 164, 0.4); border-radius: 6px; padding: 0 5px; }
.est-tag { font-size: 0.68rem; font-weight: 600; color: var(--lane-3); border: 1px dashed rgba(255, 170, 0, 0.5); border-radius: 6px; padding: 0 5px; }
.plans-table td.note-cell { text-align: left; font-size: 0.78rem; color: var(--text-dim); min-width: 220px; }
.plans-table td.note-cell a { color: var(--accent); }

/* Control & editing */
.feat-table th, .feat-table td { text-align: center; vertical-align: middle; }
.feat-table th:first-child, .feat-table td:first-child { text-align: left; white-space: nowrap; }
.feat-table .sub-inline { color: var(--text-muted); }
.feat-table .yes { color: var(--lane-2); font-size: 1.05rem; }
.feat-table .part { color: var(--lane-3); font-size: 1.05rem; }
.feat-table .nf { color: var(--text-muted); }
.feat-table .pill { display: inline-block; min-width: 46px; padding: 3px 8px; border-radius: 10px; font-weight: 700; color: var(--ink);
    background: linear-gradient(90deg, rgba(247, 147, 26, 0.45) var(--v), rgba(var(--fg), 0.06) var(--v)); }
.why-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; margin-top: 14px; }
.why {
    background: var(--surface);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 14px 18px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}
.why-grid.in .why { opacity: 1; transform: none; }
.why-head { text-align: center; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.why-head small { font-weight: 400; color: var(--text-dim); margin-left: 4px; }
.why p { font-size: 0.85rem; color: var(--text-dim); margin: 0 0 6px; }
.why p b { color: var(--ink); margin-right: 4px; white-space: nowrap; }
.why p b.t-obey { color: var(--lane-6); }
.why p b.t-iter { color: var(--lane-2); }

/* Official demo videos */
.demos { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; }
.demo {
    background: var(--surface);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 14px;
    text-align: center;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}
.demos.in .demo { opacity: 1; transform: none; }
.demo-head { color: var(--ink); margin-bottom: 10px; }
.demo-head small { color: var(--text-dim); margin-left: 4px; }
.demo-play, .demo-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; overflow: hidden; background: #000; }
.demo-play { position: relative; padding: 0; cursor: pointer; }
.demo-play img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease, opacity 0.3s ease; opacity: 0.88; }
.demo-play:hover img { transform: scale(1.03); opacity: 1; }
.demo-btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 68px; height: 48px; border-radius: 12px; background: rgba(247, 147, 26, 0.92); color: #0f111a; font-size: 2rem; display: flex; align-items: center; justify-content: center; }
.demo-cap { font-size: 0.85rem; color: var(--text-main); margin-top: 10px; line-height: 1.35; }
.demo-cap small { display: block; color: var(--text-muted); margin-top: 3px; }
.demo-cap a { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .demo { transition: none !important; } }
@media (max-width: 768px) { .demos { grid-template-columns: 1fr; } }

.takeaways { grid-template-columns: repeat(3, 1fr); }
.take, .take-kicker { text-align: center; justify-content: center; }

@media (prefers-reduced-motion: reduce) { .why { transition: none !important; } }

@media (max-width: 768px) {
    .vboard-head, #board .b-row { grid-template-columns: 26px 1fr 1fr 1fr 1fr; }
    .vboard-head > span:nth-child(2) { display: none; }
    #board .b-row { grid-template-areas: none; }
    #board .b-rank { grid-area: auto; grid-row: 1 / span 2; }
    #board .b-name { grid-area: auto; grid-column: 2 / -1; }
    .why-grid { grid-template-columns: 1fr; }
}

:root[data-theme="light"] .why { box-shadow: 0 1px 3px rgba(20, 24, 40, 0.06); }
