/* Пауза ВСЕХ анимаций, когда вкладка скрыта или окно потеряло фокус — иначе
   фоновая вкладка непрерывно композитит hero-анимации (spin/marquee/pulse/rail),
   GPU/DWM заняты и Windows рисует «busy» курсор поверх других приложений («везде»).
   Тумблер .osc-anim-halt на <html> вешает omnisolvercode-lab.js. */
html.osc-anim-halt *,
html.osc-anim-halt *::before,
html.osc-anim-halt *::after {
    animation-play-state: paused !important;
}

:root {
    --lab-paper: #f2efe8;
    --lab-paper-deep: #e9e5dc;
    --lab-ink: #151515;
    --lab-ink-soft: #3e3d39;
    --lab-muted: #77736b;
    --lab-line: #cbc6bb;
    --lab-line-dark: #343330;
    --lab-signal: #f05a32;
    --lab-acid: #d9ff43;
    --lab-white: #fffdf7;
    --lab-display: "Inter", "Arial Narrow", Arial, sans-serif;
    --lab-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.osc-lab {
    margin: 0;
    color: var(--lab-ink);
    background: var(--lab-paper);
    font-family: var(--lab-display);
    font-size: 16px;
    line-height: 1.45;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.osc-lab a { color: inherit; text-decoration: none; }
.osc-lab button, .osc-lab input { font: inherit; }
.osc-lab svg { display: block; }
.lab-skip {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 200;
    padding: 10px 14px;
    background: var(--lab-ink);
    color: var(--lab-white) !important;
    transform: translateY(-150%);
}
.lab-skip:focus { transform: none; }

.lab-header {
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    width: 100%;
    height: 76px;
    display: grid;
    grid-template-columns: minmax(210px, 1fr) auto minmax(520px, 1fr);
    align-items: center;
    gap: 28px;
    padding: 0 34px;
    border-bottom: 1px solid transparent;
    transition: background .25s ease, border-color .25s ease, height .25s ease;
}
.lab-header.is-scrolled {
    height: 64px;
    background: rgba(242, 239, 232, .94);
    border-color: var(--lab-line);
    backdrop-filter: blur(14px);
}
.lab-brand { display: inline-flex; align-items: center; gap: 8px; width: max-content; font-size: 16px; letter-spacing: -.03em; }
.lab-brand strong { font-weight: 700; }
.lab-mark { width: 30px; height: 30px; }
.lab-brand img.lab-mark { display: block; border-radius: 7px; }
.lab-nav { display: flex; align-items: center; gap: 30px; font-size: 13px; color: var(--lab-ink-soft); }
.lab-nav a { position: relative; padding: 7px 0; }
.lab-nav a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 1px;
    left: 0;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .25s ease;
}
.lab-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.lab-header-actions { justify-self: end; display: flex; align-items: center; gap: 16px; font-size: 13px; }
.lab-header-actions .osc-lang-switch { background: transparent; }
.lab-live { color: var(--lab-muted); display: flex; align-items: center; gap: 7px; }
.lab-live i { width: 7px; height: 7px; border-radius: 50%; background: #38a852; box-shadow: 0 0 0 4px rgba(56,168,82,.11); }
.lab-link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; }
.lab-link-arrow { white-space: nowrap; }
.lab-link-arrow span { transition: transform .2s ease; }
.lab-link-arrow:hover span { transform: translate(3px, -3px); }
.lab-utility { display: inline-flex; align-items: center; gap: 7px; color: var(--lab-ink-soft); font-size: 12px; }
.lab-utility svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lab-utility:hover { color: var(--lab-ink); }
.lab-menu-button { display: none; width: 36px; height: 36px; border: 0; background: transparent; cursor: pointer; padding: 7px; }
.lab-menu-button span { display: block; height: 1px; width: 22px; background: var(--lab-ink); margin: 6px 0; transition: transform .2s ease; }
.lab-mobile-menu { display: none; }

.lab-hero {
    position: relative;
    min-height: 900px;
    padding: 144px 34px 54px;
    display: grid;
    grid-template-columns: minmax(390px, .83fr) minmax(610px, 1.17fr);
    gap: clamp(42px, 6vw, 104px);
    border-bottom: 1px solid var(--lab-line);
    isolation: isolate;
}
.lab-hero-grid, .lab-final-grid {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(to right, rgba(21,21,21,.055) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(21,21,21,.055) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.85) 68%, transparent 100%);
}
.lab-hero-copy { align-self: center; max-width: 680px; padding-bottom: 42px; }
.lab-kicker, .lab-section-label {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-family: var(--lab-mono);
    font-size: 11px;
    line-height: 1;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--lab-muted);
}
.lab-kicker { padding-bottom: 22px; border-bottom: 1px solid var(--lab-line); }
.lab-hero h1 {
    margin: 32px 0 26px;
    font-size: clamp(66px, 6.35vw, 116px);
    font-weight: 570;
    line-height: .91;
    letter-spacing: -.077em;
}
.lab-hero h1 em, .lab-manifesto h2 em, .lab-models h2 em, .lab-final h2 em {
    color: var(--lab-signal);
    font-style: normal;
}
.lab-hero-lead { max-width: 570px; margin: 0; font-size: clamp(18px, 1.35vw, 23px); line-height: 1.48; letter-spacing: -.022em; color: var(--lab-ink-soft); }
.lab-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 36px; }
.lab-button {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 0 22px;
    border: 1px solid var(--lab-ink);
    font-size: 14px;
    font-weight: 650;
    transition: color .2s ease, background .2s ease, transform .2s ease;
}
.lab-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.lab-button:hover { transform: translateY(-2px); }
.lab-button-dark { color: var(--lab-white) !important; background: var(--lab-ink); }
.lab-button-dark:hover { background: var(--lab-signal); }
.lab-button-quiet { border-color: var(--lab-line); background: rgba(255,255,255,.22); }
.lab-button-quiet:hover { border-color: var(--lab-ink); }
.lab-button-signal { background: var(--lab-signal); color: var(--lab-white) !important; border-color: var(--lab-signal); }
.lab-button-signal:hover { background: var(--lab-white); color: var(--lab-ink) !important; }
.lab-hero-note { display: flex; flex-wrap: wrap; gap: 9px 18px; margin-top: 24px; font-family: var(--lab-mono); font-size: 10px; color: var(--lab-muted); text-transform: uppercase; }
.lab-hero-note span::before { content: "✓"; margin-right: 6px; color: var(--lab-ink); }

.lab-hero-product {
    position: relative;
    align-self: center;
    min-width: 0;
    color: #f7f4eb;
    background: #171716;
    border: 1px solid #090909;
    box-shadow: 18px 18px 0 var(--lab-signal);
}
.lab-hero-product::before {
    content: "LIVE PRODUCT";
    position: absolute;
    top: -27px;
    right: -1px;
    padding: 5px 8px;
    background: var(--lab-ink);
    color: var(--lab-white);
    font: 9px/1 var(--lab-mono);
    letter-spacing: .12em;
}
.lab-deck-topbar, .lab-deck-footer {
    height: 45px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 15px;
    padding: 0 14px;
    border-bottom: 1px solid var(--lab-line-dark);
    color: #9b9992;
    font: 10px/1 var(--lab-mono);
    letter-spacing: .02em;
}
.lab-window-dots { display: flex; gap: 5px; }
.lab-window-dots i { width: 7px; height: 7px; border: 1px solid #66645f; border-radius: 50%; }
.lab-deck-status { justify-self: end; display: flex; align-items: center; gap: 6px; color: #c8c5bc; }
.lab-deck-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--lab-acid); box-shadow: 0 0 12px rgba(217,255,67,.65); }
.lab-deck-body { min-height: 590px; display: grid; grid-template-columns: 170px 1fr; }
.lab-deck-sidebar { position: relative; min-width: 0; padding: 22px 13px 56px; border-right: 1px solid var(--lab-line-dark); color: #a7a49c; font: 10px/1.5 var(--lab-mono); }
.lab-deck-label { margin: 0 7px 14px; color: #66645f; font-size: 9px; letter-spacing: .14em; }
.lab-deck-sidebar ul { list-style: none; padding: 0; margin: 0; }
.lab-deck-sidebar li { display: flex; gap: 7px; align-items: center; min-height: 30px; padding: 4px 7px; white-space: nowrap; }
.lab-deck-sidebar li.is-indent { padding-left: 18px; }
.lab-deck-sidebar li.is-indent-2 { padding-left: 32px; }
.lab-deck-sidebar li.is-active { background: #2b2a27; color: #f3efe5; }
.lab-deck-branch { position: absolute; bottom: 16px; right: 13px; left: 13px; display: flex; justify-content: space-between; border-top: 1px solid var(--lab-line-dark); padding: 12px 4px 0; }
.lab-deck-branch b { color: var(--lab-acid); font-weight: 500; }
.lab-deck-main { min-width: 0; padding: clamp(18px, 2.2vw, 30px); }
.lab-task-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid #383733; background: #1e1e1c; }
.lab-task-card p { margin: 0; color: #e8e4da; font-size: 12px; line-height: 1.45; }
.lab-run-head { display: flex; justify-content: space-between; align-items: center; margin: 24px 0 13px; font: 10px/1 var(--lab-mono); color: #a9a69f; }
.lab-run-head > div { display: flex; align-items: center; gap: 8px; color: #f0ede5; }
.lab-pulse { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--lab-acid); }
.lab-pulse::after { content: ""; position: absolute; inset: -5px; border: 1px solid var(--lab-acid); border-radius: 50%; animation: lab-pulse 1.8s ease-out infinite; }
@keyframes lab-pulse { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }
.lab-trace { position: relative; padding-left: 5px; }
.lab-trace::before { content: ""; position: absolute; top: 16px; bottom: 16px; left: 15px; width: 1px; background: #3d3c38; }
.lab-trace-item { position: relative; z-index: 1; display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: center; min-height: 58px; }
.lab-trace-item i { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #4a4944; border-radius: 50%; background: #171716; color: #77756f; font: normal 9px/1 var(--lab-mono); }
.lab-trace-item span { display: grid; gap: 4px; }
.lab-trace-item b { color: #b9b6ae; font-size: 11px; font-weight: 500; }
.lab-trace-item small { color: #6f6d67; font: 9px/1.2 var(--lab-mono); }
.lab-trace-item.is-done i { color: #161616; border-color: var(--lab-acid); background: var(--lab-acid); }
.lab-trace-item.is-done b { color: #f2eee5; }
.lab-trace-item.is-running i { border-color: var(--lab-signal); }
.lab-trace-item.is-running i::after { content: ""; width: 8px; height: 8px; background: var(--lab-signal); border-radius: 50%; animation: lab-running 1s steps(2,end) infinite; }
@keyframes lab-running { 50% { opacity: .25; } }
.lab-diff { margin-top: 18px; border: 1px solid #34332f; background: #121211; }
.lab-diff-head { min-height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 11px; border-bottom: 1px solid #34332f; color: #8b8982; font: 9px/1 var(--lab-mono); }
.lab-diff-head span:last-child { color: var(--lab-acid); }
.lab-diff pre { margin: 0; padding: 12px 10px 14px; overflow: hidden; color: #c5c2ba; font: 9px/1.65 var(--lab-mono); }
.lab-diff code span.line { display: inline-block; width: 25px; color: #55534e; user-select: none; }
.lab-diff code span.add { color: #dffb74; background: rgba(217,255,67,.06); }
.lab-deck-footer { grid-template-columns: 1fr auto 1fr; border-top: 1px solid var(--lab-line-dark); border-bottom: 0; }
.lab-deck-footer span { display: flex; align-items: center; gap: 7px; }
.lab-deck-footer span:nth-child(2) { color: #d0cdc4; }
.lab-deck-footer span:last-child { justify-self: end; }
.lab-deck-footer i { width: 6px; height: 6px; border: 1px solid var(--lab-acid); border-radius: 50%; }
.lab-hero-index { position: absolute; right: 24px; bottom: 16px; font: 9px/1 var(--lab-mono); color: var(--lab-muted); writing-mode: vertical-rl; }

.lab-proof { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--lab-line); }
.lab-proof > div { min-height: 142px; display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; padding: 28px 34px; border-right: 1px solid var(--lab-line); }
.lab-proof > div:last-child { border-right: 0; }
.lab-proof strong { font-size: clamp(40px, 4vw, 67px); line-height: .8; letter-spacing: -.065em; font-weight: 560; }
.lab-proof span { max-width: 120px; font-size: 11px; line-height: 1.35; color: var(--lab-muted); }

.lab-section { padding: 120px 34px; }
.lab-section-label { align-items: center; margin-bottom: 72px; }
.lab-section-line { height: 1px; flex: 1; background: var(--lab-line); }
.lab-manifesto-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 8vw; align-items: end; }
.lab-manifesto h2, .lab-cap-intro h2, .lab-models h2, .lab-plans h2 {
    margin: 0;
    font-size: clamp(58px, 7.5vw, 132px);
    line-height: .91;
    letter-spacing: -.07em;
    font-weight: 560;
}
.lab-manifesto-copy { max-width: 490px; padding-bottom: 6px; }
.lab-manifesto-copy p { margin: 0 0 24px; font-size: 19px; line-height: 1.5; letter-spacing: -.02em; color: var(--lab-ink-soft); }
.lab-manifesto-copy p:last-child { margin-bottom: 0; }

.lab-system-map { color: #f5f1e7; background: #171716; padding-top: 80px; padding-bottom: 80px; }
.lab-map-head { display: grid; grid-template-columns: 1fr 1fr 1fr; color: #77746e; font: 9px/1 var(--lab-mono); letter-spacing: .12em; text-transform: uppercase; }
.lab-map-head span:nth-child(2) { text-align: center; }
.lab-map-head span:last-child { text-align: right; }
.lab-map { position: relative; display: grid; grid-template-columns: 1fr 1fr .85fr 1fr 1fr; align-items: center; gap: 18px; min-height: 460px; margin-top: 10px; }
.lab-map-rail { position: absolute; top: 50%; right: 4%; left: 4%; height: 1px; background: #4b4944; }
.lab-map-rail::before, .lab-map-rail::after { content: ""; position: absolute; top: -4px; width: 9px; height: 9px; background: var(--lab-signal); }
.lab-map-rail::before { left: 0; }
.lab-map-rail::after { right: 0; background: var(--lab-acid); }
.lab-map-rail i { position: absolute; top: -3px; left: 12%; width: 7px; height: 7px; border-radius: 50%; background: var(--lab-acid); box-shadow: 0 0 14px var(--lab-acid); animation: lab-rail 5s linear infinite; }
@keyframes lab-rail { from { left: 5%; } to { left: 94%; } }
.lab-map-node { position: relative; z-index: 2; min-height: 194px; padding: 20px; border: 1px solid #3c3b37; background: #1d1d1b; }
.lab-node-number { display: block; margin-bottom: 44px; color: #77746e; font: 9px/1 var(--lab-mono); }
.lab-map-node h3 { margin: 0 0 8px; font-size: 23px; font-weight: 520; letter-spacing: -.04em; }
.lab-map-node p { min-height: 54px; margin: 0 0 18px; color: #94918a; font-size: 12px; line-height: 1.5; }
.lab-map-node small { color: var(--lab-acid); font: 9px/1 var(--lab-mono); }
.lab-map-core { position: relative; z-index: 3; display: grid; place-items: center; aspect-ratio: 1; max-width: 210px; justify-self: center; }
.lab-map-core svg { width: 100%; height: 100%; animation: lab-spin 22s linear infinite; }
.lab-map-core path { fill: none; stroke: var(--lab-signal); stroke-width: .8; }
.lab-map-core b, .lab-map-core span { position: absolute; }
.lab-map-core b { margin-top: -7px; font-size: 15px; letter-spacing: .1em; }
.lab-map-core span { margin-top: 20px; color: #77746e; font: 8px/1 var(--lab-mono); }
@keyframes lab-spin { to { transform: rotate(360deg); } }

.lab-cap-intro { display: grid; grid-template-columns: 1.25fr .75fr; gap: 8vw; align-items: end; margin-bottom: 90px; }
.lab-cap-intro h2 { font-size: clamp(54px, 6vw, 104px); }
.lab-cap-intro p { max-width: 440px; margin: 0; font-size: 19px; color: var(--lab-muted); }
.lab-cap-list { border-top: 1px solid var(--lab-ink); }
.lab-cap-row { display: grid; grid-template-columns: 52px minmax(310px, .82fr) minmax(360px, 1.18fr); gap: 38px; align-items: center; min-height: 260px; padding: 38px 0; border-bottom: 1px solid var(--lab-line); }
.lab-cap-no { align-self: start; padding-top: 5px; font: 12px/1 var(--lab-mono); color: var(--lab-signal); }
.lab-cap-row h3 { margin: 0 0 12px; font-size: clamp(27px, 2.7vw, 45px); line-height: 1.05; letter-spacing: -.052em; font-weight: 560; }
.lab-cap-row p { max-width: 520px; margin: 0; color: var(--lab-muted); font-size: 15px; }
.lab-cap-visual { justify-self: end; width: min(100%, 620px); }
.lab-files-visual { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--lab-line); background: rgba(255,255,255,.18); }
.lab-files-visual span, .lab-files-visual b { min-height: 54px; display: flex; align-items: center; padding: 0 18px; border-right: 1px solid var(--lab-line); border-bottom: 1px solid var(--lab-line); font: 10px/1 var(--lab-mono); }
.lab-files-visual span:nth-child(2) { border-right: 0; }
.lab-files-visual span:nth-child(3) { border-bottom: 0; }
/* Кислотный (--lab-acid) фон всегда светлый в обеих темах → текст ВСЕГДА тёмный,
   не токеном (--lab-ink в тёмной теме светлеет и сливается). */
.lab-files-visual b { border: 0; background: var(--lab-acid); color: #17160f; font-weight: 600; }
.lab-mode-switch { justify-self: end; width: min(100%, 620px); display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--lab-ink); }
.lab-mode-switch button { min-height: 58px; border: 0; border-right: 1px solid var(--lab-ink); color: var(--lab-ink); background: transparent; cursor: pointer; font: 11px/1 var(--lab-mono); text-transform: uppercase; }
.lab-mode-switch button:nth-child(3) { border-right: 0; }
.lab-mode-switch button.is-active { color: var(--lab-white); background: var(--lab-ink); }
.lab-mode-switch small { grid-column: 1 / -1; padding: 14px 16px; border-top: 1px solid var(--lab-ink); color: var(--lab-muted); font: 10px/1.4 var(--lab-mono); }
.lab-token-receipt { justify-self: end; width: min(100%, 620px); display: grid; border: 1px solid var(--lab-ink); background: var(--lab-white); }
.lab-token-receipt > span { display: flex; justify-content: space-between; gap: 30px; padding: 15px 17px; border-bottom: 1px solid var(--lab-line); font: 10px/1 var(--lab-mono); }
.lab-token-receipt > span:last-child { border-bottom: 0; }
.lab-token-receipt b { color: var(--lab-ink); font-weight: 600; }
/* 2026-07-13: метки («Фактический расход», «Модель», «Списано») лежат ВЛОЖЕННЫМ span
   внутри строки. Раньше правило `.lab-token-receipt span` красило их в --lab-muted, и
   они тонули: на светлом фоне были еле видны, а на оранжевом .is-total исчезали почти
   полностью — белый ставился только ВНЕШНЕМУ span, до вложенного не доходил.
   Теперь: строка = `> span` (без цвета), метка = свой читаемый --lab-ink. */
.lab-token-receipt > span > span { color: var(--lab-ink); }
/* Оранжевый (--lab-signal) фон → ВСЁ внутри белое (--lab-white в тёмной теме
   темнеет и пропадает на оранже). */
.lab-token-receipt .is-total { background: var(--lab-signal); }
.lab-token-receipt .is-total,
.lab-token-receipt .is-total > span,
.lab-token-receipt .is-total b { color: #fff; }

.lab-models { color: var(--lab-white); background: #0f0f0e; overflow: hidden; }
.lab-models-top { display: grid; grid-template-columns: .45fr 1.15fr .4fr; gap: 42px; align-items: end; }
.lab-models .lab-section-label { align-self: start; color: #77746e; }
.lab-models h2 { font-size: clamp(52px, 6vw, 106px); }
.lab-models-top > p { margin: 0; color: #8d8a83; font-size: 14px; }
.lab-router { display: grid; grid-template-columns: 1fr .48fr 1fr; margin-top: 92px; border: 1px solid #373632; }
.lab-router > div { min-height: 220px; padding: 25px; }
.lab-router-query, .lab-router-result { display: flex; flex-direction: column; justify-content: space-between; }
.lab-router-query { border-right: 1px solid #373632; }
.lab-router-result { border-left: 1px solid #373632; }
.lab-router span, .lab-router small { color: #696761; font: 9px/1.4 var(--lab-mono); letter-spacing: .08em; }
.lab-router-query p { max-width: 520px; margin: 42px 0; font-size: 23px; line-height: 1.25; letter-spacing: -.03em; }
.lab-router-engine { display: grid; place-items: center; text-align: center; background: #171716; }
.lab-router-engine > span { color: var(--lab-acid); }
.lab-router-engine svg { width: 140px; }
.lab-router-engine path { fill: none; stroke: var(--lab-signal); stroke-width: 1; }
.lab-router-result b { margin: 42px 0; font-size: 30px; line-height: 1; letter-spacing: -.04em; font-weight: 520; }
.lab-model-strip { display: flex; gap: 0; width: max-content; margin: 68px 0 -70px; color: #77746e; animation: lab-marquee 28s linear infinite; }
.lab-model-strip span { min-width: max-content; padding: 0 34px; border-right: 1px solid #34332f; font: 12px/1 var(--lab-mono); }
@keyframes lab-marquee { to { transform: translateX(-33.333%); } }

.lab-plans-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 70px; }
.lab-plans h2 { font-size: clamp(50px, 5.5vw, 96px); }
.lab-plan-table { border-top: 1px solid var(--lab-ink); }
.lab-plan-row { position: relative; display: grid; grid-template-columns: 1.05fr .75fr 1.45fr .6fr .45fr; gap: 22px; align-items: center; min-height: 90px; border-bottom: 1px solid var(--lab-line); font-size: 14px; }
.lab-plan-row strong { font-size: 17px; font-weight: 560; letter-spacing: -.03em; }
.lab-plan-row strong i { margin-left: 8px; padding: 4px 6px; color: #17160f; background: var(--lab-acid); font: normal 8px/1 var(--lab-mono); letter-spacing: .06em; }
.lab-plan-row > span { color: var(--lab-muted); }
.lab-plan-row > b { font-size: 17px; font-weight: 560; }
.lab-plan-row > a { justify-self: end; font-weight: 650; }
.lab-plan-row.is-featured::before { content: ""; position: absolute; top: -1px; bottom: -1px; left: -34px; width: 5px; background: var(--lab-signal); }
.lab-plan-header { min-height: 42px; color: var(--lab-muted); font: 9px/1 var(--lab-mono); text-transform: uppercase; letter-spacing: .08em; }

.lab-final { position: relative; min-height: 720px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 100px 34px; overflow: hidden; text-align: center; border-top: 1px solid var(--lab-line); }
.lab-final-index { margin-bottom: 34px; font: 10px/1 var(--lab-mono); color: var(--lab-muted); letter-spacing: .12em; }
.lab-final h2 { position: relative; z-index: 2; margin: 0; font-size: clamp(65px, 8vw, 140px); line-height: .88; letter-spacing: -.075em; font-weight: 560; }
.lab-final p { position: relative; z-index: 2; max-width: 570px; margin: 34px auto 0; color: var(--lab-muted); font-size: 18px; }
.lab-final-actions { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 26px; margin-top: 34px; font-size: 13px; }
.lab-final-mark { position: absolute; right: -25px; bottom: -38px; width: min(30vw, 420px); color: var(--lab-ink); opacity: .09; animation: lab-spin 32s linear infinite reverse; }
.lab-final-mark path { fill: none; stroke: currentColor; stroke-width: 1; }

.lab-footer { color: #b8b5ad; background: var(--lab-ink); padding: 70px 34px 22px; }
.lab-footer-top { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 48px 80px; align-items: start; margin-bottom: 56px; }
.lab-footer-brand { display: flex; gap: 13px; align-items: center; color: var(--lab-white); }
.lab-footer-brand img.lab-mark { width: 40px; height: 40px; border-radius: 9px; display: block; }
.lab-footer-brand > div { display: grid; gap: 3px; }
.lab-footer-brand b { font-size: 16px; }
.lab-footer-brand span { color: #77746e; font-size: 11px; }
.lab-footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px; }
.lab-footer-links > div { display: grid; gap: 11px; align-content: start; font-size: 12px; }
.lab-footer-links b { margin-bottom: 7px; color: #77746e; font: 9px/1 var(--lab-mono); text-transform: uppercase; letter-spacing: .1em; }
.lab-footer-links a:hover { color: var(--lab-white); }
.lab-footer-bottom { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; padding-top: 20px; border-top: 1px solid #343330; color: #696761; font: 9px/1 var(--lab-mono); text-transform: uppercase; letter-spacing: .06em; }
.lab-footer-bottom a { justify-self: end; }

.lab-reveal { opacity: 0; transform: translateY(22px); transition: opacity .72s ease, transform .72s cubic-bezier(.22,1,.36,1); }
.lab-reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 1500px) {
    .lab-live { display: none; }
}

@media (max-width: 1180px) {
    .lab-header { grid-template-columns: 1fr auto; }
    .lab-nav, .lab-live { display: none; }
    .lab-header-actions { gap: 14px; }
    .lab-hero { grid-template-columns: 1fr; padding-top: 126px; }
    .lab-hero-copy { max-width: 840px; padding-bottom: 0; }
    .lab-hero-product { width: min(100%, 900px); justify-self: end; }
    .lab-proof > div { align-items: flex-start; flex-direction: column; }
    .lab-map { grid-template-columns: repeat(2, 1fr); padding: 40px 0; }
    .lab-map-core { grid-column: 1 / -1; grid-row: 2; width: 170px; }
    .lab-map-rail { display: none; }
    .lab-map-node { min-height: 170px; }
    .lab-models-top { grid-template-columns: 1fr 1fr; }
    .lab-models-top .lab-section-label { grid-column: 1 / -1; }
    .lab-cap-row { grid-template-columns: 40px 1fr; }
    .lab-cap-row > div:last-child { grid-column: 2; justify-self: stretch; width: 100%; margin-top: 16px; }
}

@media (max-width: 820px) {
    .lab-header { height: 64px; padding: 0 18px; }
    .lab-header-actions > .lab-link-arrow { display: none; }
    .lab-utility span { display: none; }
    .lab-menu-button { display: flex; flex-direction: column; justify-content: center; align-items: center; width: 44px; height: 44px; padding: 0; }
    /* 2026-07-13: тач-таргеты шапки ≥40-44px (порог как в чате). Иконки визуально те же —
       растёт только кликабельная зона, чтобы палец не промахивался по меню/теме/языку.
       Специфичность .lab-header-actions ... обязательна: базовое `.lab-theme-toggle{34px}`
       (строка ~569) идёт ПОЗЖЕ в файле и иначе перебивает media-query по порядку. */
    .lab-header-actions .lab-theme-toggle { width: 40px; height: 40px; }
    .lab-header-actions .osc-lang-switch button { min-height: 36px; min-width: 40px; }
    .lab-menu-button[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
    .lab-menu-button[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
    .lab-mobile-menu { position: fixed; top: 64px; right: 0; left: 0; display: grid; padding: 22px 18px 26px; border-bottom: 1px solid var(--lab-line); background: var(--lab-paper); transform: translateY(-130%); opacity: 0; pointer-events: none; transition: transform .25s ease, opacity .2s ease; }
    .lab-mobile-menu.is-open { transform: none; opacity: 1; pointer-events: auto; }
    .lab-mobile-menu a { padding: 13px 0; border-bottom: 1px solid var(--lab-line); font-size: 18px; }
    .lab-mobile-menu a:last-child { margin-top: 12px; padding: 14px; border: 0; color: var(--lab-white); background: var(--lab-ink); text-align: center; font-size: 14px; }
    .lab-hero { min-height: auto; padding: 108px 18px 46px; gap: 70px; }
    .lab-kicker span:last-child { display: none; }
    .lab-hero h1 { font-size: clamp(56px, 17vw, 86px); }
    .lab-hero-lead { font-size: 17px; }
    .lab-hero-actions { align-items: stretch; flex-direction: column; }
    .lab-button { width: 100%; }
    .lab-hero-product { box-shadow: 8px 8px 0 var(--lab-signal); }
    .lab-deck-body { min-height: 520px; grid-template-columns: 1fr; }
    .lab-deck-sidebar { display: none; }
    .lab-deck-main { padding: 17px; }
    .lab-deck-topbar { grid-template-columns: 1fr auto; }
    .lab-deck-topbar > span:nth-child(2) { display: none; }
    .lab-deck-footer { grid-template-columns: 1fr 1fr; }
    .lab-deck-footer span:nth-child(2) { display: none; }
    .lab-proof { grid-template-columns: 1fr 1fr; }
    .lab-proof > div { min-height: 126px; padding: 22px 18px; }
    .lab-proof > div:nth-child(2) { border-right: 0; }
    .lab-proof > div:nth-child(-n+2) { border-bottom: 1px solid var(--lab-line); }
    .lab-section { padding: 86px 18px; }
    .lab-section-label { margin-bottom: 48px; }
    .lab-manifesto-grid, .lab-cap-intro, .lab-models-top { grid-template-columns: 1fr; gap: 42px; }
    .lab-manifesto h2, .lab-cap-intro h2, .lab-models h2, .lab-plans h2 { font-size: clamp(49px, 14vw, 78px); }
    .lab-manifesto-copy p { font-size: 16px; }
    .lab-map-head { display: none; }
    .lab-map { grid-template-columns: 1fr; gap: 12px; padding: 0; }
    .lab-map-core { grid-column: auto; grid-row: auto; width: 150px; margin: 20px 0; }
    .lab-map-node { min-height: 150px; }
    .lab-node-number { margin-bottom: 25px; }
    .lab-cap-intro { margin-bottom: 56px; }
    .lab-cap-row { grid-template-columns: 28px 1fr; gap: 18px; min-height: 0; padding: 42px 0; }
    .lab-cap-row h3 { font-size: 29px; }
    .lab-cap-row > div:last-child { grid-column: 1 / -1; margin-top: 20px; }
    .lab-router { grid-template-columns: 1fr; margin-top: 55px; }
    .lab-router > div { min-height: 170px; }
    .lab-router-query { border-right: 0; border-bottom: 1px solid #373632; }
    .lab-router-result { border-left: 0; border-top: 1px solid #373632; }
    .lab-router-engine { min-height: 150px !important; }
    .lab-model-strip { margin-bottom: -45px; }
    .lab-plans-head { align-items: flex-start; flex-direction: column; }
    .lab-plan-header { display: none; }
    .lab-plan-row { grid-template-columns: 1fr auto; gap: 8px 20px; min-height: 142px; padding: 22px 0; }
    .lab-plan-row > span { grid-column: 1 / -1; }
    .lab-plan-row > b { grid-column: 1; }
    .lab-plan-row > a { grid-column: 2; grid-row: 3; }
    .lab-plan-row.is-featured::before { left: -18px; }
    .lab-final { min-height: 620px; padding: 90px 18px; }
    .lab-final h2 { font-size: clamp(58px, 16vw, 92px); }
    .lab-final-actions { flex-direction: column; width: 100%; }
    .lab-footer { padding: 54px 18px 20px; }
    .lab-footer-top { grid-template-columns: 1fr; gap: 40px; }
    .lab-footer-links { grid-template-columns: 1fr 1fr; }
    .lab-footer-bottom { grid-template-columns: 1fr auto; }
    .lab-footer-bottom span:nth-child(2) { display: none; }
}

@media (max-width: 480px) {
    .lab-brand > span { display: none; }
    .lab-header-actions { gap: 8px; }
    .lab-header-actions .osc-lang-switch button { min-width: 40px; min-height: 36px; padding: 0 8px; }
    .lab-proof { grid-template-columns: 1fr; }
    .lab-proof > div { min-height: 104px; border-right: 0; border-bottom: 1px solid var(--lab-line); flex-direction: row; align-items: flex-end; }
    .lab-deck-footer span:last-child { font-size: 8px; }
    .lab-footer-links { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .lab-reveal { opacity: 1; transform: none; }
}

/* Админка в шапке. ВАЖНО: `.lab-utility{display:inline-flex}` перебивает браузерный
   `[hidden]{display:none}` по специфичности — без явного правила ниже ссылка светилась
   бы всем гостям. Показывается из omnisolvercode-lab.js после /api/admin/check. */
.lab-utility[hidden],
.lab-mobile-menu a[hidden] { display: none !important; }

.lab-admin-link { color: var(--lab-acid); }
.lab-admin-link:hover { color: var(--lab-ink); }

/* ══════════════════════════════════════════════════════════════════════
   ТЁМНАЯ ТЕМА (2026-07-12)
   Вся главная построена на 10 токенах --lab-*, поэтому тема делается их
   переопределением, а не переписыванием правил.

   Важная тонкость: --lab-ink используется НЕ только как цвет текста, но и как
   ФОН у инвертированных элементов (главная кнопка, футер, активный таб), где
   текст берётся из --lab-white. Поэтому переворачиваем ОБА токена сразу:
       ink   -> светлый (текст на странице + фон «инверсных» плашек)
       white -> тёмный  (текст НА этих плашках)
   Так все пары ink-фон/white-текст сохраняют контраст и просто меняются
   местами: тёмная кнопка на светлой странице становится светлой на тёмной.
   Акценты (--lab-signal, --lab-acid) не трогаем — они читаются на обоих фонах.
   ══════════════════════════════════════════════════════════════════════ */
html.lab-dark body.osc-lab {
    --lab-paper: #151412;
    --lab-paper-deep: #1d1c19;
    --lab-ink: #f2efe8;
    --lab-ink-soft: #cbc6bb;
    --lab-muted: #8c877c;
    --lab-line: #33322e;
    --lab-line-dark: #4f4d47;
    --lab-white: #151412;
    color-scheme: dark;
}

/* Футер — исключение из инверсии.
   Он красится в --lab-ink (в тёмной теме это светлый) и при слепой инверсии
   превращался в БОЛЬШОЕ СВЕТЛОЕ ПЯТНО внизу тёмной страницы — читаемо, но
   чужеродно. В светлой теме футер тёмный (контрастный «якорь» внизу), значит
   в тёмной он должен остаться тёмным, лишь чуть отделяясь от фона. */
html.lab-dark body.osc-lab .lab-footer {
    background: #1d1c19;
    color: #8c877c;
    border-top: 1px solid #33322e;
}
html.lab-dark body.osc-lab .lab-footer a { color: #cbc6bb; }
html.lab-dark body.osc-lab .lab-footer a:hover { color: var(--lab-signal); }
/* Внутри футера есть элементы на var(--lab-white) — а он в тёмной теме ТЁМНЫЙ
   (он же текст на инверсных плашках). Раз футер остался тёмным, здесь нужен
   обратно светлый: иначе название бренда сливалось с фоном в невидимку. */
html.lab-dark body.osc-lab .lab-footer-brand { color: #f2efe8; }
html.lab-dark body.osc-lab .lab-footer-links a:hover { color: #f2efe8; }

/* Прилипшая шапка хардкодила светлый фон (rgba(242,239,232,.94)) без оверрайда —
   в тёмной теме при скролле она становилась белой. Даём тёмный аналог. */
html.lab-dark body.osc-lab .lab-header.is-scrolled { background: rgba(21, 20, 18, .92); }

/* Секция моделей — постоянно тёмный шоукейс (background: #0f0f0e, не участвует в
   инверсии), но её текст берёт color: var(--lab-white). Инверсия делает --lab-white
   тёмным (#151412) → заголовок «Одна задача», текст запроса и результата становились
   тёмными на тёмном = невидимы. Это не инверсная плашка, поэтому возвращаем --lab-white
   к светлому ТОЛЬКО внутри секции — так весь её текст (h2, router-query p, router-result b)
   снова читается. */
html.lab-dark body.osc-lab .lab-models { --lab-white: #f2efe8; }

/* Переключатель темы в шапке */
.lab-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--lab-line);
    border-radius: 999px;
    background: transparent;
    color: var(--lab-ink-soft);
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.lab-theme-toggle:hover {
    color: var(--lab-signal);
    border-color: var(--lab-signal);
}
.lab-theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
/* Показываем солнце ИЛИ луну — по текущей теме */
.lab-theme-toggle .lab-icon-moon { display: block; }
.lab-theme-toggle .lab-icon-sun  { display: none; }
html.lab-dark body.osc-lab .lab-theme-toggle .lab-icon-moon { display: none; }
html.lab-dark body.osc-lab .lab-theme-toggle .lab-icon-sun  { display: block; }

/* Тех-поддержка в шапке — попап (как в Speech/Skills). На токенах лендинга,
   поэтому сам подстраивается под светлую/тёмную тему. */
.lab-support-wrap { position: relative; display: inline-flex; }
.lab-support-btn { border: 0; background: transparent; cursor: pointer; font: inherit; }
.lab-support-popup {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 200;
    width: 290px;
    padding-bottom: 20px;
    background: var(--lab-paper);
    border: 1px solid var(--lab-line);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .22);
    animation: lab-support-in .16s ease;
}
@keyframes lab-support-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}
.lab-support-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--lab-line);
}
.lab-support-title { font-weight: 700; font-size: 15px; color: var(--lab-ink); }
.lab-support-x {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    color: var(--lab-muted);
    padding: 0 2px;
}
.lab-support-x:hover { color: var(--lab-ink); }
.lab-support-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 20px 0;
}
.lab-support-avatar { position: relative; width: 72px; height: 72px; margin-bottom: 12px; }
.lab-support-avatar img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--lab-signal);
}
.lab-support-avatar-fb {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--lab-ink);
    color: var(--lab-paper);
    font-weight: 700;
    font-size: 26px;
}
/* Атрибут hidden должен побеждать display:grid — иначе заглушка «M» видна
   поверх аватара, даже когда картинка загрузилась. */
.lab-support-avatar-fb[hidden] { display: none; }
.lab-support-handle { font-weight: 700; font-size: 18px; color: var(--lab-ink); margin-bottom: 8px; }
.lab-support-desc { margin: 0 0 18px; font-size: 13.5px; line-height: 1.5; color: var(--lab-muted); }
.lab-support-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 46px;
    border-radius: 10px;
    background: #29a9eb;
    color: #fff !important;
    font-weight: 600;
    font-size: 14px;
    transition: background .15s ease;
}
.lab-support-cta:hover { background: #1e93d1; }
.lab-support-cta svg { width: 18px; height: 18px; }
@media (max-width: 640px) {
    .lab-support-popup { position: fixed; top: 62px; right: 12px; left: 12px; width: auto; }
}

/* Hero workspace: static, readable and based on the real Code screen. */
.lab-hero-product-legacy { display: none; }

@media (min-width: 1181px) {
    .lab-hero {
        grid-template-columns: minmax(360px, .7fr) minmax(720px, 1.3fr);
        gap: clamp(28px, 3.2vw, 58px);
    }
}

.lab-chat-preview {
    height: 680px;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    overflow: hidden;
    color: #d9d6ce;
    background: #151513;
    border-color: #0a0a09;
    font-family: var(--lab-sans);
}
.lab-chat-preview::before { content: "LIVE WORKSPACE"; }

.lab-chat-side {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 18px 14px 14px;
    border-right: 1px solid #35342f;
    background: #1d1c19;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #4a4741 transparent;
}
.lab-chat-brand { height: 42px; display: flex; align-items: center; gap: 8px; color: #f4f1e9; font-size: 17px; }
.lab-chat-brand img { flex: 0 0 auto; border-radius: 5px; }
.lab-chat-brand small { color: #747067; font: 8px/1 var(--lab-mono); letter-spacing: .12em; }
.lab-chat-action, .lab-chat-search { height: 38px; display: flex; align-items: center; gap: 9px; padding: 0 9px; font-size: 12px; }
.lab-chat-action { color: #e0ddd5; font-weight: 650; }
.lab-chat-action svg, .lab-chat-search svg { flex: 0 0 auto; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lab-chat-action svg { color: var(--lab-acid); }
.lab-chat-search { color: #7c7971; }
.lab-chat-caption { margin: 17px 9px 7px; color: #68655e; font: 8px/1 var(--lab-mono); letter-spacing: .12em; }
.lab-chat-row { position: relative; min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 9px; color: #9f9b92; font-size: 11px; }
.lab-chat-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lab-chat-row time { flex: 0 0 auto; color: #68655f; font: 8px/1 var(--lab-mono); }
.lab-chat-row.is-active { color: #f3efe7; background: #292821; }
.lab-chat-row.is-active::before { content: ""; position: absolute; inset: 5px auto 5px 0; width: 3px; background: var(--lab-acid); box-shadow: 0 0 11px rgba(217,255,67,.62); }

.lab-chat-settings { margin-top: auto; padding: 13px 5px 8px; border: 0; border-top: 1px solid #37352f; background: transparent; }
.lab-chat-settings > small { display: block; color: #6d6961; font: 8px/1 var(--lab-mono); letter-spacing: .1em; }
.lab-chat-settings > b { display: block; margin: 6px 0 10px; color: #ddd9d0; font-size: 11px; }
.lab-chat-settings > div { min-height: 30px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 8px; color: #c4c0b7; font-size: 9px; }
.lab-chat-settings .lab-chat-model { min-height: 36px; margin-bottom: 4px; border: 1px solid #37352f; }
.lab-chat-model > span, .lab-chat-option > span { display: flex; align-items: center; gap: 7px; }
.lab-chat-model > span { min-width: 0; white-space: nowrap; }
.lab-chat-model > span img { flex: 0 0 auto; border-radius: 3px; }
.lab-chat-model > svg, .lab-chat-option span svg { flex: 0 0 auto; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lab-chat-model > svg { width: 12px; color: #77736b; }
.lab-chat-option span svg { color: var(--lab-signal); }
.lab-chat-settings em { color: var(--lab-acid); font: normal 8px/1 var(--lab-mono); }
.lab-chat-option i { position: relative; width: 25px; height: 14px; border: 1px solid #4b4943; border-radius: 12px; background: #252421; }
.lab-chat-option i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 8px; height: 8px; border-radius: 50%; background: #c8c4ba; }
.lab-chat-option.is-on i { border-color: var(--lab-acid); background: var(--lab-acid); }
.lab-chat-option.is-on i::after { right: 2px; left: auto; background: #171713; }

.lab-chat-stage { position: relative; min-width: 0; display: flex; flex-direction: column; background: #151513; }
.lab-chat-stage > header { height: 52px; display: flex; align-items: center; gap: 13px; padding: 0 18px; border-bottom: 1px solid #302f2b; }
.lab-chat-stage > header b { flex: 0 0 auto; color: #f0ede5; font-size: 11px; white-space: nowrap; }
.lab-chat-stage > header span { flex: 0 1 auto; min-width: 0; padding: 6px 7px; border: 1px solid #37352f; color: #8a867d; font: 7px/1 var(--lab-mono); white-space: nowrap; }
.lab-chat-stage > header i { margin-left: auto; color: #77746d; font: normal 8px/1 var(--lab-mono); }
.lab-chat-file-actions button, .lab-chat-control { display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: #8d8980; }
.lab-chat-file-actions svg, .lab-chat-control svg, .lab-chat-send svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lab-chat-message { align-self: flex-end; max-width: 73%; margin: 27px 22px 0; padding: 12px 14px; border: 1px solid #393730; background: #2a2924; color: #e2ded5; font-size: 11px; line-height: 1.4; }

.lab-chat-run { position: relative; width: min(82%, 620px); margin: 42px auto 0; padding-left: 34px; }
.lab-chat-rail { position: absolute; top: 6px; bottom: 46px; left: 7px; width: 1px; background: #3a3934; }
.lab-chat-rail i { position: absolute; left: -4px; width: 9px; height: 9px; border: 2px solid #151513; border-radius: 50%; background: #716e67; }
.lab-chat-rail i:first-child { top: 0; background: var(--lab-acid); box-shadow: 0 0 10px rgba(217,255,67,.55); }
.lab-chat-rail i:nth-child(2) { top: 48px; background: #36bd70; }
.lab-chat-rail i:last-child { top: 110px; }
.lab-chat-run > small { display: block; color: #7f7b73; font: 9px/1 var(--lab-mono); }
.lab-chat-run > b { display: block; margin-top: 21px; color: #d8d4cb; font-size: 12px; font-weight: 650; }
.lab-chat-run > b strong { color: #f0ece3; }
.lab-chat-run .lab-chat-thought { margin-top: 17px; }
.lab-chat-run > p { max-width: 620px; margin: 22px 0 14px; color: #bdb9b0; font-size: 12px; line-height: 1.55; }
.lab-chat-files { display: grid; gap: 9px; }
.lab-chat-file { height: 62px; display: grid; grid-template-columns: 42px 1fr auto; grid-template-rows: 1fr 1fr; align-items: center; column-gap: 12px; padding: 9px 13px; border: 1px solid #3b3933; background: #20201d; }
.lab-chat-file > span { grid-row: 1 / 3; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #434831; color: var(--lab-acid); font: 8px/1 var(--lab-mono); }
.lab-chat-file b { align-self: end; color: #e8e4db; font-size: 11px; }
.lab-chat-file small { align-self: start; color: #7c7870; font: 8px/1 var(--lab-mono); }
.lab-chat-file-actions { grid-column: 3; grid-row: 1 / 3; display: flex; align-items: center; gap: 3px; }
.lab-chat-file-actions button { width: 28px; height: 28px; border: 1px solid #37352f; }
.lab-chat-run footer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 13px; margin-top: 13px; padding-top: 11px; border-top: 1px solid #302f2b; color: #77736c; font: 8px/1 var(--lab-mono); }
.lab-chat-run footer em { color: var(--lab-acid); font-style: normal; font-weight: 700; }
.lab-chat-input { position: absolute; right: 22px; bottom: 20px; left: 22px; height: 58px; display: flex; align-items: center; gap: 6px; padding: 0 8px 0 10px; border: 1px solid #403e37; background: #1a1917; color: #99958c; font-size: 12px; }
.lab-chat-input p { flex: 1; margin: 0; color: #77736c; }
.lab-chat-control { flex: 0 0 auto; width: 34px; height: 34px; }
.lab-chat-control .is-fill { fill: currentColor; stroke: none; }
.lab-chat-send { flex: 0 0 42px; width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border: 1px solid #151515; border-radius: 50%; color: #151515; background: var(--lab-acid); }
.lab-chat-send svg { width: 18px; height: 18px; stroke-width: 2; }

@media (max-width: 820px) {
    .lab-chat-preview { height: 560px; grid-template-columns: 128px minmax(0, 1fr); box-shadow: 8px 8px 0 var(--lab-signal); }
    .lab-chat-side { padding: 11px 7px 9px; }
    .lab-chat-brand { height: 34px; font-size: 12px; }
    .lab-chat-brand small, .lab-chat-settings, .lab-chat-row time, .lab-chat-row:nth-of-type(n+8) { display: none; }
    .lab-chat-action, .lab-chat-search { height: 32px; padding: 0 4px; font-size: 8px; }
    .lab-chat-caption { margin: 10px 4px 5px; }
    .lab-chat-row { min-height: 31px; padding: 0 5px; font-size: 8px; }
    .lab-chat-stage > header { height: 43px; padding: 0 10px; }
    .lab-chat-stage > header b { font-size: 9px; }
    .lab-chat-stage > header span { display: none; }
    .lab-chat-stage > header i { font-size: 6px; }
    .lab-chat-message { max-width: 77%; margin: 17px 10px 0; padding: 8px; font-size: 8px; }
    .lab-chat-run { width: 92%; margin-top: 26px; padding-left: 23px; }
    .lab-chat-run > b { margin-top: 17px; font-size: 9px; }
    .lab-chat-run .lab-chat-thought { margin-top: 12px; }
    .lab-chat-run > p { margin: 15px 0 10px; font-size: 9px; }
    .lab-chat-file { height: 48px; grid-template-columns: 31px 1fr auto; padding: 6px 8px; }
    .lab-chat-file > span { width: 27px; height: 27px; font-size: 6px; }
    .lab-chat-file b { font-size: 8px; }
    .lab-chat-file-actions { gap: 1px; }
    .lab-chat-file-actions button { width: 22px; height: 22px; border: 0; }
    .lab-chat-file-actions svg { width: 13px; height: 13px; }
    .lab-chat-run footer { font-size: 6px; }
    .lab-chat-input { right: 10px; bottom: 11px; left: 10px; height: 44px; gap: 1px; padding: 0 4px; font-size: 8px; }
    .lab-chat-control { width: 25px; height: 30px; }
    .lab-chat-control svg { width: 13px; height: 13px; }
    .lab-chat-control:nth-of-type(3) { display: none; }
    .lab-chat-send { flex-basis: 34px; width: 34px; height: 34px; }
}
