/* Agent Arena Index Showcase (2026-11-29)
 * Editorial dark + light styling modeled on clean minimalist benchmark aesthetics.
 * Class prefix: .la-* (intentionally avoids theme.css wildcard dark-mode overrides like
 * -card/-panel/-board/-section/-item/-note/-wrap/-box/-faq/-content/-tool/-sheet). */

.lx4 {
    --la-bg: #ffffff;
    --la-well: #faf9f6;
    --la-pill: #f1efe9;
    --la-hair: #e7e4dc;
    --la-hair-strong: #d6d2c7;
    --la-ink: #1c1b18;
    --la-sub: #6c685e;
    --la-dim: #8f8a7e;
    --la-blue: #1a7ce8;
    --la-blue-hi: #3b9eff;
    --la-blue-soft: rgba(26, 124, 232, .12);
    --la-track: rgba(28, 27, 24, .06);
    --la-gray-bar: #b6b1a6;
    --la-gold: #e6b830;
    --la-gold-ink: #1c1b18;
    --la-silver: #cfd5df;
    --la-silver-ink: #1c1b18;
    --la-bronze: #d68d5c;
    --la-bronze-ink: #1c1b18;
    --la-whisker: #1c1b18;
    --la-tip-bg: rgba(28, 27, 24, .96);
    --la-tip-ink: #f7f5f0;
    --la-serif: Georgia, "Times New Roman", "Noto Serif SC", "Songti SC", serif;
}

html[data-theme="dark"] .lx4 {
    --la-bg: #1e1d1a;
    --la-well: #252420;
    --la-pill: #2e2c28;
    --la-hair: rgba(255, 255, 255, .085);
    --la-hair-strong: rgba(255, 255, 255, .15);
    --la-ink: #f2efe8;
    --la-sub: #a39e93;
    --la-dim: #7c776d;
    --la-blue: #2794ff;
    --la-blue-hi: #58b0ff;
    --la-blue-soft: rgba(39, 148, 255, .16);
    --la-track: rgba(255, 255, 255, .055);
    --la-gray-bar: #6b675e;
    --la-gold: #f0c94d;
    --la-gold-ink: #1a1916;
    --la-silver: #d4d8df;
    --la-silver-ink: #1a1916;
    --la-bronze: #da9363;
    --la-bronze-ink: #1a1916;
    --la-whisker: #f4f2ec;
    --la-tip-bg: rgba(18, 17, 15, .96);
    --la-tip-ink: #f5f2eb;
}

/* Monochrome vendor icons invert cleanly in dark mode */
html[data-theme="dark"] .lx4 .la-mono {
    filter: invert(1) brightness(1.15);
}

/* Outer stage containers */
.la-stage {
    margin: 20px 0 28px;
    padding: 24px 26px 22px;
    border: 1px solid var(--la-hair);
    border-radius: 16px;
    background: var(--la-bg);
}
@media (max-width: 768px) {
    .la-stage { padding: 16px 14px 16px; border-radius: 12px; }
}

.la-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}
.la-title {
    margin: 0;
    font-family: var(--la-serif);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -.01em;
    line-height: 1.25;
}
.la-title span { color: var(--la-ink); }
.la-subtitle {
    margin: 3px 0 0;
    font-size: .8125rem;
    line-height: 1.45;
}
.la-subtitle span { color: var(--la-sub); }

/* Segmented pills (Category / Metric / Signal mode) */
.la-seg {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--la-hair);
    border-radius: 9px;
    background: var(--la-well);
}
.la-segbtn {
    appearance: none;
    border: 0;
    border-radius: 6px;
    padding: 5px 12px;
    background: transparent;
    color: var(--la-sub);
    font-size: .8125rem;
    font-weight: 500;
    line-height: 1.3;
    cursor: pointer;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.la-segbtn:hover { color: var(--la-ink); }
.la-segbtn.is-on {
    background: var(--la-pill);
    color: var(--la-ink);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

/* Top 3 decision picks strip (FRONTIER / DAILY DRIVER / EFFICIENT) */
.la-picks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 0 0 24px;
    padding: 16px 0 18px;
    border-top: 1px solid var(--la-hair);
    border-bottom: 1px solid var(--la-hair);
}
@media (max-width: 860px) {
    .la-picks { grid-template-columns: 1fr; gap: 14px; }
}
.la-pick {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 6px 10px 6px 0;
    text-decoration: none;
    transition: opacity .15s;
}
a.la-pick:hover .la-pick-name b { color: var(--la-blue); }
.la-pick-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.la-pick-kicker span { color: var(--la-sub); }
.la-pick-dot {
    width: 6px;
    height: 6px;
    border-radius: 99px;
    background: var(--la-blue);
    flex: none;
}
.la-pick.is-frontier .la-pick-dot { background: var(--la-gold); }
.la-pick.is-daily .la-pick-dot { background: var(--la-blue); }
.la-pick.is-eff .la-pick-dot { background: #34c77b; }
.la-pick-name {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.la-pick-name img {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    object-fit: contain;
    flex: none;
}
.la-pick-name b {
    font-family: var(--la-serif);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--la-ink);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.la-pick-why {
    font-size: .8125rem;
    line-height: 1.45;
}
.la-pick-why span { color: var(--la-sub); }

/* Chart 1: Top 15 Vertical Error-Bar Column Chart */
.la-bars-scroll {
    overflow-x: auto;
    margin: 0 -6px 20px;
    padding: 4px 6px 8px;
    scrollbar-width: thin;
}
.la-bars-svg {
    display: block;
    width: 100%;
    min-width: 820px;
    height: auto;
    user-select: none;
}
.la-bar-g { cursor: pointer; }
.la-bar-rect { transition: opacity .15s, filter .15s; }
.la-bar-g:hover .la-bar-rect { filter: brightness(1.12); }
.la-bar-g.is-dim { opacity: .35; }

/* Filter & Search Bar above Main Table */
.la-ctrl {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 6px 0 14px;
}
.la-search {
    position: relative;
    flex: 1 1 200px;
    max-width: 280px;
}
.la-search svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--la-dim);
    pointer-events: none;
}
.lx4 .la-search input {
    width: 100%;
    height: 34px;
    padding: 0 10px 0 30px;
    border: 1px solid var(--la-hair-strong);
    border-radius: 8px;
    background: var(--la-well);
    color: var(--la-ink);
    font-size: .8125rem;
    box-sizing: border-box;
    margin: 0;
}
.lx4 .la-search input:focus {
    outline: none;
    border-color: var(--la-blue);
}
.lx4 .la-select {
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--la-hair-strong);
    border-radius: 8px;
    background: var(--la-well);
    color: var(--la-ink);
    font-size: .8125rem;
    cursor: pointer;
}
.la-toggle-open {
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--la-hair-strong);
    border-radius: 8px;
    background: var(--la-well);
    color: var(--la-sub);
    font-size: .8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
}
.la-toggle-open.is-on {
    border-color: var(--la-blue);
    background: var(--la-blue-soft);
    color: var(--la-blue);
    font-weight: 600;
}
.la-count {
    margin-left: auto;
    font-size: .75rem;
    font-variant-numeric: tabular-nums;
}
.la-count span { color: var(--la-dim); }

/* Clean 4-Column Ranking Table (Screenshot 1) */
.la-tbl-scroll {
    overflow-x: auto;
    margin: 0 -4px;
    padding: 0 4px;
}
.la-tbl {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    table-layout: fixed;
}
.la-tbl thead th {
    padding: 10px 10px 10px 8px;
    border-top: 1px solid var(--la-hair);
    border-bottom: 1px solid var(--la-hair);
    text-align: left;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
    background: transparent !important;
}
.la-tbl thead th span,
.la-tbl thead th button {
    color: var(--la-dim);
}
.la-sortbtn {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.la-sortbtn:hover { color: var(--la-ink); }
.la-sortbtn.is-on { color: var(--la-blue); }

.la-col-m { width: 34%; }
.la-col-i { width: 28%; }
.la-col-c { width: 19%; }
.la-col-t { width: 19%; }

.la-tbl tbody tr {
    border-bottom: 1px solid var(--la-hair);
    transition: background .12s;
}
.la-tbl tbody tr:hover { background: rgba(26, 124, 232, .045); }
html[data-theme="dark"] .lx4 .la-tbl tbody tr:hover { background: rgba(255, 255, 255, .04); }
.la-tbl tbody td {
    padding: 11px 10px 11px 8px;
    vertical-align: middle;
    background: transparent !important;
}

/* Rank Badge + Model Name Cell */
.la-mcell {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}
.la-rk {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    font-size: .75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    flex: none;
    color: var(--la-sub);
}
.la-rk.g1 { background: var(--la-gold); color: var(--la-gold-ink); }
.la-rk.g2 { background: var(--la-silver); color: var(--la-silver-ink); }
.la-rk.g3 { background: var(--la-bronze); color: var(--la-bronze-ink); }
.la-mic {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    object-fit: contain;
    flex: none;
}
.la-mlt {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: inline-grid;
    place-items: center;
    background: var(--la-pill);
    color: var(--la-sub);
    font-size: .6875rem;
    font-style: normal;
    font-weight: 700;
    flex: none;
}
.la-mtxt {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}
.la-mname {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}
.la-mname a,
.la-mname span.la-plain {
    color: var(--la-ink);
    font-size: .875rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.la-mname a:hover { color: var(--la-blue); text-decoration: underline; }
.la-mtags {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.la-tag-pre {
    font-size: .6875rem;
    color: var(--la-dim);
    font-style: normal;
}
.la-tag-open {
    font-size: .6875rem;
    padding: 0 5px;
    border-radius: 4px;
    background: rgba(52, 199, 123, .14);
    color: #219653;
    font-style: normal;
    font-weight: 600;
}
html[data-theme="dark"] .lx4 .la-tag-open { color: #6ee7b7; }

/* Inline Metric Bar Cells (Index blue bar with whisker + Cost/Tokens gray bars) */
.la-metric {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}
.la-val {
    font-size: .84375rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--la-ink);
    white-space: nowrap;
}
.la-val.is-muted { color: var(--la-sub); font-weight: 500; }
.la-val.is-na { color: var(--la-dim); font-weight: 400; }
.la-track {
    position: relative;
    height: 8px;
    border-radius: 3px;
    background: var(--la-track);
    overflow: visible;
}
.la-fill-blue {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--la-blue) 0%, var(--la-blue-hi) 100%);
}
.la-ci-line {
    position: absolute;
    top: 50%;
    height: 1.5px;
    transform: translateY(-50%);
    background: var(--la-whisker);
    opacity: .75;
}
.la-ci-cap {
    position: absolute;
    top: 1px;
    bottom: 1px;
    width: 1.5px;
    background: var(--la-whisker);
    opacity: .8;
}
.la-fill-gray {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: 3px;
    background: var(--la-gray-bar);
    opacity: .75;
}

/* Full-width View All Button (Screenshots 1 & 3) */
.la-morebtn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 14px;
    padding: 10px 16px;
    border: 1px solid var(--la-hair-strong);
    border-radius: 9px;
    background: var(--la-well);
    color: var(--la-ink);
    font-size: .84375rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.la-morebtn:hover {
    background: var(--la-pill);
    border-color: var(--la-blue);
    color: var(--la-blue);
}

/* Section 2: Pareto Frontier (Screenshot 2) */
.la-pareto-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 22px;
    align-items: start;
}
@media (max-width: 980px) {
    .la-pareto-grid { grid-template-columns: 1fr; }
}
.la-pareto-chart {
    min-width: 0;
    overflow-x: auto;
}
.la-pareto-svg {
    display: block;
    width: 100%;
    min-width: 560px;
    height: auto;
    user-select: none;
}
.la-pareto-foot {
    margin: 8px 0 0;
    font-size: .75rem;
}
.la-pareto-foot span { color: var(--la-dim); }
.la-legend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .75rem;
    margin-right: 10px;
}
.la-legend i {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--la-blue);
}
.la-legend span { color: var(--la-sub); }
.la-head-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* Right-hand "On the frontier" vertical list */
.la-fr-side {
    min-width: 0;
}
.la-fr-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 52px 64px;
    align-items: baseline;
    gap: 8px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--la-hair);
}
.la-fr-head b {
    font-family: var(--la-serif);
    font-size: 1rem;
    font-weight: 500;
    color: var(--la-ink);
}
.la-fr-head span {
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--la-dim);
    text-align: right;
}
.la-fr-list {
    position: relative;
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
}
.la-fr-list::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 14px;
    bottom: 14px;
    width: 1.5px;
    background: var(--la-blue);
    opacity: .55;
}
.la-fr-row {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) 48px 64px;
    align-items: center;
    gap: 8px;
    padding: 7px 4px 7px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: background .12s;
}
.la-fr-row:hover,
.la-fr-row.is-hi {
    background: var(--la-blue-soft);
}
.la-fr-dot {
    width: 9px;
    height: 9px;
    border-radius: 99px;
    border: 2px solid var(--la-blue);
    background: var(--la-bg);
    position: relative;
    z-index: 1;
    margin-left: 1px;
}
.la-fr-row.is-hi .la-fr-dot,
.la-fr-row:hover .la-fr-dot { background: var(--la-blue); }
.la-fr-name {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.la-fr-name img { width: 15px; height: 15px; flex: none; object-fit: contain; }
.la-fr-name span {
    font-size: .8125rem;
    color: var(--la-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.la-fr-num {
    font-size: .8125rem;
    font-variant-numeric: tabular-nums;
    text-align: right;
    color: var(--la-sub);
    white-space: nowrap;
}
.la-fr-num.is-cost { color: var(--la-ink); font-weight: 600; }

/* Section 3: Signal Performance (Screenshot 3) */
.la-sig-scroll {
    overflow-x: auto;
    margin: 0 -6px;
    padding: 0 6px;
}
.la-sig-svg {
    display: block;
    width: 100%;
    min-width: 820px;
    height: auto;
    user-select: none;
}
.la-sig-path { transition: opacity .15s, stroke-width .15s; cursor: pointer; }
.la-sig-tbl {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
}
.la-sig-tbl th {
    padding: 9px 10px;
    border-top: 1px solid var(--la-hair);
    border-bottom: 1px solid var(--la-hair);
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    text-align: right;
    background: transparent !important;
}
.la-sig-tbl th:first-child { text-align: left; }
.la-sig-tbl th span { color: var(--la-dim); }
.la-sig-tbl td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--la-hair);
    text-align: right;
    font-size: .8125rem;
    font-variant-numeric: tabular-nums;
    background: transparent !important;
}
.la-sig-tbl td:first-child { text-align: left; }
.la-sig-tbl tr:hover { background: var(--la-well); }
.la-sig-cell b { color: var(--la-ink); font-weight: 600; }
.la-sig-cell small { color: var(--la-dim); margin-left: 4px; font-size: .75rem; }
.la-sig-foot {
    margin: 10px 0 0;
    font-size: .75rem;
}
.la-sig-foot span { color: var(--la-dim); }

/* Floating Tooltip (mounted on document.body, so uses explicit theme colors rather than .lx4-scoped vars) */
.la-tip {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    box-sizing: border-box;
    min-width: 210px;
    max-width: 290px;
    padding: 11px 13px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .14) !important;
    background: rgba(24, 24, 27, .96) !important;
    color: #f4f4f5 !important;
    font-size: .78125rem;
    line-height: 1.5;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity .1s;
}
html[data-theme="dark"] .la-tip {
    background: rgba(34, 33, 30, .98) !important;
    border-color: rgba(255, 255, 255, .18) !important;
    color: #f5f2eb !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .55);
}
.la-tip.is-vis { opacity: 1; }
.la-tip-h {
    font-weight: 600;
    font-size: .84375rem;
    margin-bottom: 6px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    color: #ffffff !important;
}
.la-tip-r {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    margin-top: 2px;
}
.la-tip-r span { color: rgba(244, 244, 245, .76) !important; }
.la-tip-r b { color: #ffffff !important; font-variant-numeric: tabular-nums; font-weight: 600; }

/* Section 4: Minimalist Accordion FAQ (Screenshot 4) */
.la-faq-stage {
    margin: 28px 0 24px;
    padding: 26px 26px 14px;
    border: 1px solid var(--la-hair);
    border-radius: 16px;
    background: var(--la-bg);
}
@media (max-width: 768px) {
    .la-faq-stage { padding: 18px 14px 12px; border-radius: 12px; }
}
.la-faq-stage .la-title { margin-bottom: 14px; }
.la-qa {
    border-top: 1px solid var(--la-hair);
}
.la-qa:last-of-type {
    border-bottom: 1px solid var(--la-hair);
}
.la-qa summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 2px;
    list-style: none;
    cursor: pointer;
    font-size: .9375rem;
    font-weight: 500;
    color: var(--la-ink);
}
.la-qa summary::-webkit-details-marker { display: none; }
.la-qa summary span { color: var(--la-ink); }
.la-qa summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 1.5px solid var(--la-sub);
    border-bottom: 1.5px solid var(--la-sub);
    transform: rotate(45deg);
    transition: transform .18s ease;
    flex: none;
    margin-right: 4px;
}
.la-qa[open] summary::after {
    transform: rotate(-135deg);
    margin-top: 4px;
}
.la-qa-body {
    padding: 0 2px 18px;
    font-size: .875rem;
    line-height: 1.65;
}
.la-qa-body span, .la-qa-body p { color: var(--la-sub); margin: 0; }
.la-qa-body a { color: var(--la-blue); text-decoration: underline; }

/* View navigation bar upgrade on Agent showcase */
.la-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 18px 0 6px;
}
.la-nav .lx-seg {
    margin: 0;
    background: var(--la-well);
    border: 1px solid var(--la-hair);
}
.la-fresh-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}
.la-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 26px;
    padding: 0 10px;
    border: 1px solid var(--la-hair);
    border-radius: 999px;
    background: var(--la-well);
    font-size: .75rem;
    line-height: 1;
    white-space: nowrap;
}
.la-chip span { color: var(--la-sub); }
.la-chip b, .la-chip time { color: var(--la-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
a.la-chip:hover { border-color: var(--la-blue); }
a.la-chip:hover span { color: var(--la-blue); }
