/* ai.2it.onl — local overrides on top of shared theme/components/utilities */

/* ---------- layout ---------- */
body { padding: 24px; }

.tool-header { max-width: 1640px; margin: 0 auto 10px; }

.blog-wrap {
    max-width: 1640px;
    margin: 20px auto 0;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.sidebar { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 20px; }
.main-col { min-width: 0; }

.sidebar-card { padding: 18px; margin-bottom: 0; }
.sidebar-site { margin-bottom: 16px; }
.sidebar-site-name {
    display: block;
    font-weight: 700;
    font-size: 1.15rem;
    background: linear-gradient(90deg, #00ff9d, #00cc7a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.sidebar-site-desc { display: block; color: var(--text-muted); font-size: 0.8rem; margin-top: 2px; }

.nav-group + .nav-group { margin-top: 18px; }
.nav-group-title {
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
}
.nav-link {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    font-size: 0.92rem;
    transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--bg-input); }
.nav-link.active { background: rgba(0, 255, 157, 0.1); color: var(--accent); }
.nav-num {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    min-width: 22px;
}
.nav-link.active .nav-num { color: var(--accent); }

.hw-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hw-list li { font-size: 0.8rem; color: var(--text); }
.hw-list span {
    display: block;
    color: var(--accent);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1px;
}

.sidebar-toggle {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--accent);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 14px;
}
.sidebar-toggle:hover { border-color: var(--accent); }

@media (max-width: 900px) {
    .blog-wrap { grid-template-columns: 1fr; }
    .sidebar { position: static; display: none; }
    .sidebar.open { display: flex; }
    .sidebar-toggle { display: inline-block; }
}

/* ---------- post typography ---------- */
.post { display: flex; flex-direction: column; gap: 24px; }

.post-hero .card { padding: 34px; }
.post-hero h2 { margin: 0 0 8px; font-size: 1.9rem; }
.post-meta {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    margin-top: 10px; color: var(--text-muted); font-size: 0.85rem;
}
.post-meta .badge { font-size: 0.72rem; min-width: 0; }

.post-lead { color: var(--text-muted); font-size: 1.05rem; line-height: 1.65; }

.post section.card > h2, .post .card h2.section-title {
    font-size: 1.45rem;
    margin: 0 0 14px;
    color: var(--text);
    position: relative;
    padding-bottom: 10px;
}
.post section.card > h2::after, .post .card h2.section-title::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 56px; height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, #00ff9d, #00cc7a);
}
.post section.card > h3 { color: var(--accent); font-size: 1.05rem; margin: 20px 0 8px; }
.post p { line-height: 1.7; margin: 0 0 14px; }
.post p:last-child { margin-bottom: 0; }
.post strong { color: var(--text); }
.post em { color: var(--text-muted); }
.post code {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 1px 6px;
    font-family: var(--font-mono);
    font-size: 0.85em;
    color: var(--accent);
}
.post ul, .post ol { margin: 0 0 14px; padding-left: 22px; line-height: 1.7; }
.post li { margin-bottom: 6px; }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); }
table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    white-space: nowrap;
}
.data-table th, .data-table td {
    padding: 8px 10px;
    text-align: right;
    border-bottom: 1px solid var(--border);
}
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table thead th {
    position: sticky; top: 0;
    background: var(--bg-card);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 1;
}
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.data-table tbody tr.peak-row { background: rgba(0, 255, 157, 0.07); }
.data-table td.num { font-family: var(--font-mono); }
.data-table .muted { color: var(--text-muted); }
.data-table .burst { color: #f87171; }
.table-note { margin-top: 10px; font-size: 0.8rem; color: var(--text-muted); }

/* ---------- leaderboard / kpi ---------- */
.kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.kpi {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
}
.kpi .kpi-val {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}
.kpi .kpi-label { color: var(--text-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }

.legend-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.legend-chips .chip {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.72rem; color: var(--text-muted);
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: 9999px; padding: 4px 10px;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.chip .dot.green { background: var(--accent); }
.chip .dot.red { background: #f87171; }
.chip .dot.gold { background: #fbbf24; }

.lb-rank { font-family: var(--font-mono); font-weight: 700; }
.lb-rank.r1 { color: #fbbf24; }
.lb-rank.r2 { color: #e5e7eb; }
.lb-rank.r3 { color: #cd7f32; }

.cell-best { color: var(--accent) !important; font-weight: 700; }
.cell-worst { color: #f87171 !important; }

.data-table tbody tr.top3 td { border-bottom-color: rgba(0, 255, 157, 0.25); }
.data-table tbody tr.top3 td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

.model-inline { color: var(--text); text-decoration: none; }
.model-inline:hover { color: var(--accent); }
.model-sub { display: block; font-size: 0.72rem; color: var(--text-muted); font-family: var(--font-mono); margin-top: 1px; }

/* ---------- spec cards (test rig) ---------- */
.spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 4px;
}
.spec-card {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    transition: border-color 0.15s;
}
.spec-card:hover { border-color: var(--accent); }
.spec-card .spec-tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
}
.spec-card h3 { margin: 7px 0 8px; font-size: 1.05rem; color: var(--text); }
.spec-card p { margin: 0; font-size: 0.84rem; color: var(--text-muted); line-height: 1.6; }
.spec-card .spec-value {
    display: block;
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

/* ---------- settings categories (LM Studio) ---------- */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 4px;
}
.settings-card {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 20px;
}
.settings-card h3 {
    margin: 0 0 10px;
    font-size: 0.95rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
}
.settings-list { list-style: none; margin: 0; padding: 0; }
.settings-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 0.84rem;
}
.settings-list li:last-child { border-bottom: none; }
.settings-list .k { color: var(--text-muted); }
.settings-list .v { font-family: var(--font-mono); color: var(--text); text-align: right; }
.settings-list .v em { color: var(--accent); font-style: normal; font-weight: 600; }

/* ---------- charts ---------- */
.chart-fig { margin: 0 0 18px; }
.chart-fig img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #0f0f12;
    cursor: zoom-in;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.chart-fig img:hover { border-color: var(--accent); box-shadow: var(--accent-glow); }
.chart-fig figcaption {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.chart-fig figcaption code { font-size: 0.8em; }
.chart-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .chart-grid-2 { grid-template-columns: 1fr; } }

/* ---------- lightbox ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: rgba(5, 5, 9, 0.94);
    padding: 20px;
    overflow: auto;
    cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox-fig {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: min(96vw, 2000px);
    height: 86vh;
    margin: 0;
}
.lb-img-wrap {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}
.lightbox figcaption {
    flex: 0 0 auto;
    width: 100%;
    max-height: 12vh;
    overflow-y: auto;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}
.lightbox figcaption code { font-size: 0.85em; }
.lightbox .lightbox-close {
    position: absolute;
    top: 14px;
    right: 26px;
    background: none;
    border: none;
    color: var(--accent);
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    z-index: 1;
}
.lightbox .lightbox-close:hover { text-shadow: 0 0 12px rgba(0, 255, 157, 0.6); }
.lightbox .lightbox-hint {
    position: absolute;
    bottom: 14px;
    color: #555;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ---------- model cards ---------- */
.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}
.model-card { margin: 0; padding: 22px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; transition: border-color 0.2s, transform 0.2s; }
.model-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.model-card .model-rank {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.75rem;
}
.model-card h3 { margin: 0; font-size: 1.05rem; color: var(--text); }
.model-card p { margin: 0; font-size: 0.85rem; color: var(--text-muted); line-height: 1.55; flex-grow: 1; }
.model-card .model-stat {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.9rem;
}

/* ---------- model page ---------- */
.model-hero .card { padding: 30px; }
.model-hero h2 { margin: 0 0 6px; font-size: 1.7rem; }
.model-hero .server-id {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    word-break: break-all;
}
.model-hero .badges { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.model-findings { list-style: none; padding: 0; margin: 0; }
.model-findings li {
    padding: 10px 0 10px 22px;
    border-bottom: 1px solid var(--border);
    position: relative;
    line-height: 1.6;
}
.model-findings li:last-child { border-bottom: none; }
.model-findings li::before {
    content: "\25b8";
    position: absolute;
    left: 0;
    color: var(--accent);
}

.download-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.download-list a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}
.download-list a:hover { text-decoration: underline; }
.download-list .dl-size { color: var(--text-muted); font-size: 0.75rem; }

.model-pager {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
}
.pager-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: border-color 0.15s;
}
.pager-btn:hover { border-color: var(--accent); }
.pager-btn.pager-center { text-align: center; }
.pager-btn.pager-right { text-align: right; align-items: flex-end; }
.pager-dir { color: var(--text-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.pager-name { color: var(--accent); font-size: 0.9rem; }

/* ---------- home ---------- */
.home-hero .card { padding: 38px; }
.home-hero h2 { font-size: 2rem; margin: 0 0 12px; }
.home-hero p { color: var(--text-muted); line-height: 1.7; max-width: 720px; }
.post-links { display: flex; flex-direction: column; gap: 14px; }
.post-link {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s;
}
.post-link:hover { border-color: var(--accent); transform: translateY(-2px); }
.post-link .post-num {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    color: var(--accent);
    background: rgba(0, 255, 157, 0.1);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
}
.post-link h3 { margin: 0 0 4px; color: var(--text); font-size: 1.15rem; }
.post-link p { margin: 0; color: var(--text-muted); font-size: 0.88rem; line-height: 1.55; }
.post-link .go {
    margin-left: auto;
    color: var(--accent);
    font-size: 1.4rem;
    flex-shrink: 0;
}
