/* Витрина лаборатории: дополнения к дизайн-системе сайта (site.css).
   Базовые переменные, шапка, кнопки и секции берутся оттуда. */

:root {
    /* Сплошная линия рамок. В site.css её нет — там для границ используются
       --grid (миллиметровка) и --dash (пунктир), а витрине нужна ещё и
       спокойная сплошная под карточки и поля ввода. */
    --line: #d5d2c6;
}

/* Схема осей в чертёжной рамке на главной */
.axis-diagram { position: absolute; inset: 12% 8%; display: flex; flex-direction: column;
                justify-content: space-between; gap: 12px; }
.axis-node { border: 1.5px dashed #9aa0b8; background: rgba(251, 250, 247, 0.9);
             padding: 10px 14px; border-radius: 4px; }
.axis-node b { display: block; font-size: 15px; color: var(--ink); }
.axis-node span { font-size: 13px; color: var(--muted); }

/* Карточка модуля */
.module-card { display: flex; flex-direction: column; }
.module-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.status { font: 600 11.5px var(--font); letter-spacing: 0.08em; text-transform: uppercase;
          padding: 3px 9px; border-radius: 2px; margin-left: auto; }
.status.live { background: #1a7a34; color: #fff; }
.status.rec  { background: var(--ink); color: #fff; }
.status.soon { background: var(--paper-2); color: var(--muted); border: 1px solid var(--line); }
.module-card .sells { font-style: italic; color: var(--ink); }
.module-card .compute { margin-top: auto; padding-top: 14px; font-size: 13px; color: var(--muted); }
.module-card .compute span { display: inline-block; border: 1px solid var(--line);
                             padding: 2px 8px; margin-right: 6px; border-radius: 2px; }

/* Страница модуля */
.status-note { font-size: 15px; color: rgba(255, 255, 255, 0.75); }
.lead-text { font-size: 19px; max-width: 720px; }
.note-line { margin-top: 24px; font-size: 14.5px; color: var(--muted); }
.shows-list { max-width: 720px; margin-top: 24px; padding-left: 20px; font-size: 16px; }
.shows-list li { margin-bottom: 10px; }

/* --- Живой статус стенда --- */
.stand-state { display: inline-flex; align-items: center; gap: 7px; font-size: 13px;
               color: var(--muted); letter-spacing: 0.02em; }
.stand-state::before { content: ''; width: 8px; height: 8px; border-radius: 50%;
                       background: var(--muted); flex: none; }
.stand-state.state-live::before { background: #1a7a34; box-shadow: 0 0 0 3px rgba(26,122,52,0.15); }
.stand-state.state-stale::before { background: #b8860b; }
.stand-state.state-offline::before { background: #9aa0b8; }

/* --- Демо-чат --- */
.chat-demo { border: var(--dash); border-radius: 4px; padding: 26px;
             background: var(--paper-2); margin-top: 28px; }
.chat-contours { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.contour { text-align: left; font: 600 14px var(--font); color: var(--ink); cursor: pointer;
           background: var(--paper); border: 1.5px solid var(--line); border-radius: 3px;
           padding: 11px 15px; min-width: 190px; transition: border-color .15s, box-shadow .15s; }
.contour:hover:not(:disabled) { border-color: var(--blue); }
.contour.active { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.contour:disabled { opacity: .55; cursor: not-allowed; }
.contour small { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted);
                 margin-top: 3px; }
.contour .ext { color: #b8860b; }

.chat-row { display: flex; gap: 12px; align-items: flex-start; }
.chat-input { flex: 1; font: 400 16px var(--font); color: var(--ink); padding: 13px 15px;
              border: 1.5px solid var(--line); border-radius: 3px; background: var(--paper);
              resize: vertical; min-height: 52px; }
.chat-input:focus { outline: none; border-color: var(--blue); }
.chat-send { flex: none; }
.chat-send:disabled { opacity: .6; cursor: wait; }

.chat-examples { margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chat-example { font: 400 13px var(--font); color: var(--blue); cursor: pointer;
                background: none; border: 1px dashed #9aa0b8; border-radius: 2px;
                padding: 5px 10px; }
.chat-example:hover { border-style: solid; }

.chat-answer { margin-top: 20px; font-size: 16.5px; line-height: 1.7; white-space: pre-wrap;
               min-height: 24px; }
.chat-answer.running::after { content: '▍'; animation: blink 1s steps(2) infinite;
                              color: var(--blue); }
@keyframes blink { 50% { opacity: 0; } }
.chat-error { color: #a4262c; font-size: 15px; }

.chat-thinking { margin-top: 16px; }
.chat-thinking summary { cursor: pointer; font-size: 13.5px; color: var(--muted); }
.think-text { margin-top: 10px; padding: 12px 14px; background: var(--paper);
              border-left: 2px solid var(--line); font-size: 14px; color: var(--muted);
              white-space: pre-wrap; max-height: 240px; overflow-y: auto; }

/* Панель метрик — главный экспонат витрины */
.chat-metrics { display: none; }
.chat-metrics.shown { display: grid; margin-top: 22px; padding-top: 20px;
                      border-top: var(--dash);
                      grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 18px; }
.metric-k { display: block; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
            color: var(--muted); }
.metric-v { display: block; font-size: 22px; line-height: 1.3; margin-top: 4px; color: var(--ink); }
.metric-note { grid-column: 1 / -1; margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }

/* --- Ассистент-проводник --- */
.assistant { position: fixed; right: 24px; bottom: 24px; z-index: 60; }
.asst-toggle { font: 600 15px var(--font); color: #fff; cursor: pointer; background: var(--blue);
               border: none; border-radius: 3px; padding: 14px 20px;
               box-shadow: 0 6px 22px rgba(16,27,63,0.28); }
.asst-toggle:hover { background: var(--blue-2); }
.asst-panel { display: none; flex-direction: column; width: min(400px, calc(100vw - 32px));
              height: min(560px, calc(100vh - 120px)); background: var(--paper);
              border: 1.5px solid var(--ink); border-radius: 4px;
              box-shadow: 0 18px 50px rgba(16,27,63,0.3); overflow: hidden; }
.assistant.open .asst-panel { display: flex; }
.assistant.open .asst-toggle { display: none; }
.asst-head { display: flex; align-items: center; gap: 12px; padding: 13px 16px;
             background: var(--ink); color: #fff; }
/* Название и подпись в столбик: в строку они на узкой панели рвутся пополам */
.asst-title { display: flex; flex-direction: column; line-height: 1.25; }
.asst-head b { font-size: 15px; white-space: nowrap; }
.asst-head small { font-size: 11.5px; color: var(--cyan); white-space: nowrap; }
.asst-close { margin-left: auto; font-size: 22px; line-height: 1; color: #fff; cursor: pointer;
              background: none; border: none; padding: 0 4px; }
.asst-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column;
            gap: 12px; }
.asst-msg { max-width: 88%; padding: 10px 13px; border-radius: 4px; font-size: 15px;
            line-height: 1.55; white-space: pre-wrap; }
.asst-msg.me { align-self: flex-end; background: var(--blue); color: #fff; }
.asst-msg.bot { align-self: flex-start; background: var(--paper-2); border: 1px solid var(--line); }
.asst-msg.bot.err { border-color: #a4262c; color: #a4262c; }
.asst-msg.typing::after { content: '…'; animation: blink 1s steps(2) infinite; }
.asst-hint { font-size: 13px; color: var(--muted); }
.asst-qs { display: flex; flex-wrap: wrap; gap: 7px; }
.asst-q { font: 400 13px var(--font); color: var(--blue); text-align: left; cursor: pointer;
          background: none; border: 1px dashed #9aa0b8; border-radius: 2px; padding: 6px 10px; }
.asst-q:hover { border-style: solid; }
.asst-foot { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.asst-input { flex: 1; font: 400 15px var(--font); padding: 10px 12px; border-radius: 3px;
              border: 1.5px solid var(--line); background: var(--paper); resize: none; }
.asst-input:focus { outline: none; border-color: var(--blue); }
.asst-send { flex: none; font: 600 14px var(--font); color: #fff; cursor: pointer;
             background: var(--blue); border: none; border-radius: 3px; padding: 0 16px; }
.asst-send:disabled { opacity: .6; cursor: wait; }

@media (max-width: 991px) {
    .axis-diagram { position: static; inset: auto; padding: 20px; }
    .chat-row { flex-direction: column; }
    .chat-send { width: 100%; }
    .assistant { right: 12px; bottom: 12px; }
}
