/* ---------- ИИ-гид (правая колонка) и сворачиваемые таблицы ---------- */
.work{display:flex;align-items:flex-start;min-width:0}
.work > .content{flex:1 1 auto;min-width:0}
.card,.brief,.kpis{scroll-margin-top:calc(var(--top-h,67px) + 14px)}

.guide{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);overflow:hidden;min-width:0}
body.g-docked .guide{position:sticky;top:calc(var(--top-h,67px) + 26px);flex:none;width:clamp(316px,19vw,380px);margin:26px max(28px,env(safe-area-inset-right,0px)) 26px 0;max-height:calc(100vh - var(--top-h,67px) - 52px)}
body:not(.g-docked) .guide{position:fixed;z-index:64;top:0;right:0;bottom:0;width:min(388px,100%);border-radius:0;border-width:0 0 0 1px;box-shadow:-12px 0 32px rgba(22,28,36,.12);transform:translateX(102%);visibility:hidden;transition:transform .28s ease,visibility 0s linear .28s;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px);padding-right:env(safe-area-inset-right,0px)}
body.g-open:not(.g-docked) .guide{transform:none;visibility:visible;transition:transform .28s ease}
.g-scrim{position:fixed;inset:0;z-index:63;background:rgba(14,18,24,.32);opacity:0;pointer-events:none;transition:opacity .2s}
body.g-open:not(.g-docked) .g-scrim{opacity:1;pointer-events:auto}
@media (min-width:900px){ .g-scrim{background:transparent} }

.g-head{display:flex;align-items:center;gap:10px;padding:14px 14px 12px 16px;border-bottom:1px solid var(--line);flex:none}
.g-orb{width:34px;height:34px;border-radius:10px;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;flex:none;position:relative}
.g-orb svg{width:19px;height:19px}
.g-orb::after{content:"";position:absolute;right:-2px;top:-2px;width:9px;height:9px;border-radius:50%;background:var(--good);box-shadow:0 0 0 2px var(--surface)}
.g-head b{display:block;font-family:var(--f-display);font-weight:600;font-size:14.5px;line-height:1.2}
.g-head small{display:block;font-size:11.5px;color:var(--muted);line-height:1.3}
.g-head > div:not(.g-orb){flex:1;min-width:0}
.g-x{width:32px;height:32px;border-radius:8px;border:1px solid transparent;background:transparent;display:grid;place-items:center;color:var(--muted);flex:none}
.g-x:hover{border-color:var(--line);color:var(--ink)}
.g-x svg{width:16px;height:16px}
.g-body{flex:1;min-height:0;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:18px;overscroll-behavior:contain;scrollbar-width:thin}
.g-sec h3{font-family:var(--f-display);font-size:17px;font-weight:600;margin:3px 0 6px;line-height:1.25}
.g-sec p{font-size:13px;color:var(--ink-2);line-height:1.55}
.g-start ol{margin:6px 0 0;padding:0;list-style:none;display:flex;flex-direction:column;gap:7px;counter-reset:gs}
.g-start li{display:grid;grid-template-columns:20px minmax(0,1fr);gap:8px;font-size:12.5px;line-height:1.45;color:var(--ink-2);counter-increment:gs}
.g-start li::before{content:counter(gs);width:20px;height:20px;border-radius:6px;background:var(--accent-soft);color:var(--accent);font-family:var(--f-display);font-weight:600;font-size:11px;display:grid;place-items:center;margin-top:-1px}
.g-map-h{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
.g-tour{display:inline-flex;align-items:center;gap:5px;border:0;background:var(--accent-soft);color:var(--accent);font-size:12px;font-weight:600;border-radius:20px;padding:4px 10px 4px 8px}
.g-tour:hover{background:color-mix(in srgb,var(--accent) 18%,var(--surface))}
.g-tour svg{width:13px;height:13px}
.g-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
.g-item{width:100%;display:grid;grid-template-columns:22px minmax(0,1fr) auto;gap:9px;align-items:start;text-align:left;border:1px solid transparent;background:transparent;border-radius:9px;padding:8px 8px;color:var(--ink)}
.g-item:hover{background:var(--surface-2)}
.g-item.on{background:var(--accent-soft);border-color:color-mix(in srgb,var(--accent) 35%,transparent)}
.g-item .g-n{width:22px;height:22px;border-radius:7px;border:1px solid var(--line-2);display:grid;place-items:center;font-family:var(--f-display);font-weight:600;font-size:11px;color:var(--ink-2);position:relative;background:var(--surface)}
.g-item.vis .g-n::after{content:"";position:absolute;right:-3px;bottom:-3px;width:8px;height:8px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 2px var(--surface)}
.g-item.on .g-n{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.g-item b{display:block;font-weight:600;font-size:12.5px;line-height:1.35}
.g-item small{display:block;font-size:11.5px;color:var(--muted);line-height:1.4;margin-top:1px}
.g-kind{font-size:10px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);font-weight:600;padding-top:3px;white-space:nowrap}
.g-terms summary{display:flex;align-items:center;justify-content:space-between;gap:8px;cursor:pointer;list-style:none;padding:6px 0;border-top:1px solid var(--line)}
.g-terms summary::-webkit-details-marker{display:none}
.g-terms summary svg{width:16px;height:16px;color:var(--muted);transition:transform .25s}
.g-terms[open] summary svg{transform:rotate(180deg)}
.g-terms summary:hover .eyebrow{color:var(--accent)}
.g-terms dl{margin:6px 0 0;display:flex;flex-direction:column;gap:8px}
.g-terms dt{font-weight:600;font-size:12.5px}
.g-terms dd{margin:1px 0 0;font-size:12px;color:var(--ink-2);line-height:1.45}
.g-ask{flex:none;border-top:1px solid var(--line);padding:10px 12px;display:flex;gap:6px;align-items:center}
.g-ask input{flex:1;min-width:0;height:36px;border:1px solid var(--line);border-radius:9px;padding:0 10px;background:var(--surface-2);font-size:13px;outline:none}
.g-ask input:focus{border-color:var(--accent)}
.g-ask button{width:36px;height:36px;border-radius:9px;border:0;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;flex:none}
.g-ask button svg{width:16px;height:16px}

.g-fab{position:fixed;z-index:55;right:calc(18px + env(safe-area-inset-right,0px));bottom:calc(18px + env(safe-area-inset-bottom,0px));display:flex;align-items:center;gap:9px;height:48px;padding:0 18px 0 7px;border-radius:24px;border:0;background:var(--accent);color:var(--accent-ink);font-family:var(--f-display);font-weight:600;font-size:13.5px;box-shadow:0 6px 22px rgba(54,89,127,.32),0 1px 3px rgba(22,28,36,.18);transition:transform .2s,opacity .2s}
.g-fab:hover{transform:translateY(-1px)}
.g-fab span{width:34px;height:34px;border-radius:50%;background:color-mix(in srgb,var(--accent-ink) 16%,transparent);display:grid;place-items:center}
.g-fab svg{width:19px;height:19px}
body.g-docked .g-fab,body.g-open .g-fab{opacity:0;pointer-events:none;transform:translateY(8px)}
@media (max-width:620px){ .g-fab{padding:0 7px;width:48px;justify-content:center} .g-fab em{display:none} }
.g-fab em{font-style:normal}
body:not(.g-docked) .content{padding-bottom:calc(84px + env(safe-area-inset-bottom,0px))}

/* подсветка блока и расшифровка на самой карточке */
.g-hl{outline:2px solid var(--accent);outline-offset:3px;animation:ghl 1.2s ease-out 1}
@keyframes ghl{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--accent) 45%,transparent)}100%{box-shadow:0 0 0 14px transparent}}
.kpis.g-hl{border-radius:var(--r);outline-offset:6px}
.g-call{display:grid;grid-template-rows:0fr;transition:grid-template-rows .32s cubic-bezier(.3,.7,.2,1),margin .32s cubic-bezier(.3,.7,.2,1);margin:0}
.g-call.show{grid-template-rows:1fr;margin-bottom:14px}
.card > .card-h + .g-call.show{margin-top:-2px}
.kpis > .g-call{grid-column:1/-1;margin-bottom:-12px}
.kpis > .g-call.show{margin-bottom:0}
.brief .g-call.show{margin:12px 0 0}
.g-call-in{min-height:0;overflow:hidden}
.g-call-b{background:color-mix(in srgb,var(--accent-soft) 70%,var(--surface));border:1px solid color-mix(in srgb,var(--accent) 28%,transparent);border-radius:10px;padding:12px 14px;display:flex;flex-direction:column;gap:6px;font-size:13px;line-height:1.5;color:var(--ink)}
.g-call-h{display:flex;align-items:center;gap:8px}
.g-call-h b{font-family:var(--f-display);font-weight:600;font-size:13px;color:var(--accent)}
.g-call-h .g-x{margin-left:auto;width:26px;height:26px}
.g-mini{width:22px;height:22px;border-radius:7px;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;flex:none}
.g-mini svg{width:13px;height:13px}
.g-call p{max-width:92ch;color:var(--ink-2)}
.g-call p b{color:var(--ink);font-weight:600}
.g-call-nav{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:4px;padding-top:8px;border-top:1px solid color-mix(in srgb,var(--accent) 18%,transparent)}
.g-call-nav span{font-size:12px;color:var(--muted);margin-right:auto}
.g-q{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;border:1px solid var(--line-2);background:var(--surface);color:var(--muted);vertical-align:2px;margin-left:6px;padding:0}
.g-q:hover,.g-q.on{border-color:var(--accent);color:var(--accent);background:var(--accent-soft)}
.g-q svg{width:13px;height:13px}

/* сворачиваемые таблицы: без пустот — свёрнутые и раскрытые таблицы стоят во всю ширину друг под другом */
.cl-stack{display:flex;flex-direction:column;gap:12px;min-width:0}
.cl-stack-h{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 4px;margin-bottom:-2px}
.cl .card-h{margin-bottom:0;align-items:center;cursor:pointer;flex-wrap:nowrap}
.cl .card-h > div:first-child{min-width:0;position:relative;padding-left:44px}
.cl-ico{position:absolute;left:0;top:50%;transform:translateY(-50%);width:32px;height:32px;border-radius:9px;background:var(--surface-2);border:1px solid var(--line);color:var(--accent);display:grid;place-items:center}
.cl-ico svg{width:17px;height:17px}
.cl-meta{margin-left:auto;display:flex;align-items:center;gap:10px;flex:none}
.cl-n{font-size:12px;color:var(--muted);white-space:nowrap}
.cl-tog{display:inline-flex;align-items:center;gap:5px;height:30px;padding:0 8px 0 12px;border-radius:8px;border:1px solid var(--line-2);background:var(--surface);font-size:12.5px;font-weight:500;color:var(--ink-2);white-space:nowrap}
.cl-tog:hover{border-color:var(--accent);color:var(--accent)}
.cl-tog svg{width:16px;height:16px;transition:transform .3s}
.cl.open .cl-tog svg{transform:rotate(180deg)}
.cl:not(.open){transition:border-color .15s}
.cl:not(.open):hover{border-color:var(--line-2)}
.cl-body{display:grid;grid-template-rows:0fr;transition:grid-template-rows .38s cubic-bezier(.3,.7,.2,1)}
.cl.open > .cl-body{grid-template-rows:1fr}
.cl-in{min-height:0;overflow:hidden;margin:0 -18px;padding:0 18px;opacity:0;transition:opacity .22s}
.cl.open .cl-in{opacity:1;transition:opacity .3s .06s}
.cl-in > :first-child{margin-top:14px}
@media (max-width:620px){
  .cl .card-h{flex-wrap:wrap}
  .cl .card-h > div:first-child{padding-left:0}
  .cl-ico{display:none}
  .cl-meta{margin-left:0;width:100%;justify-content:space-between}
}

/* «Что ИИ нашёл»: сначала главные находки, остальные — по кнопке */
.ins-cut{position:relative;overflow:hidden;transition:max-height .42s cubic-bezier(.3,.7,.2,1)}
.ins-cut.cut::after{content:"";position:absolute;left:0;right:0;bottom:0;height:44px;background:linear-gradient(to bottom,color-mix(in srgb,var(--surface) 0%,transparent),var(--surface));pointer-events:none}
.ins-more{display:flex;justify-content:center;padding-top:12px;border-top:1px solid var(--line);margin-top:2px}
.ins-more .btn svg{transition:transform .3s}
.ins-more.open .btn svg{transform:rotate(180deg)}
.ls-stick{position:sticky;top:calc(var(--top-h,67px) + 16px)}
.acc-noask .g-ask{display:none!important}
