@layer variables {
  :root{
	--base:#ffffff;
	--back:#000000;
	--hide:#888888;
	--gap:12px;
	--L:73;
	--R:27;
	--text:rgba(255,255,255,0.85);
	--dim:rgba(255,255,255,0.5);
	--bg:#181818;
	--glass:rgba(0,0,0,.05);
	--glass-strong:rgba(0,0,0,.08);
	--stroke:rgba(255,255,255,.12);
	--stroke-strong:rgba(255,255,255,.18);
	--radius-lg:14px;
	--pad:14px;
	--fx:.45s cubic-bezier(.2,.7,.2,1);
	--top:57px;
	--left:20px;
	--edge:20px;
	--hero-h:60vh;
	--search-h:64px;
  }
}



@layer layout {
  .home-left-col{position:fixed;top:var(--top);left:var(--left);width:25vw;height:calc(100vh - var(--top) - var(--edge));display:grid;grid-template-rows:auto var(--hero-h);gap:var(--gap);z-index:3;pointer-events:none}
  header{gap:13%;}
  header>div{flex:79 1 0% !important;}
  header>nav{/*flex:var(--R);*/width:360px!important;}
  #map{z-index:0;position:relative;background:#000}
  #home-feature{grid-row:2;display:flex;flex-direction:column;gap:10px;padding:0;height:var(--hero-h);min-height:0}
  #home-feature .feature-slider{display:grid;flex:1 1 auto;min-height:0;position:relative;isolation:isolate;border-radius:12px;overflow:hidden;height:100%}
  #home-feature .feature-slide{height:100%;grid-template-rows:minmax(180px,30%) minmax(0,1fr)}
  #home-feature .feature-media{height:100%}
  #home-feature .header-divider .progress-fill{transition:width 5s linear;height:3px}
  #home-feature .feature-title.typer-caret::after,#home-feature .feature-sub.typer-caret::after{display:none}
  #home-about{position:relative;grid-row:1}
  #home-about .author{transition:opacity .2s ease,max-height .2s ease}
  #map>div{margin-top:30px !important}
  #header-crumbs i{position:relative;top:-3px}
  #home-search{position:fixed;top:var(--top);right:var(--edge);width:25vw;max-width:380px;height:auto;min-height:56px;z-index:5;grid-row:auto;pointer-events:auto}
  .map-section{flex:55;position:relative}
  .map-section #map{width:100%;height:100vh}
  .main{display:flex;padding:30px 0 0!important;height:100vh}
  .main>.left{width:35%!important;flex:20!important}
  .main>.right{margin:0!important;padding:0!important;width:65%;height:93.5%!important;display:flex;flex-direction:column}
  .right-top{flex:65;padding:0}
  .right-bottom{flex:35;display:flex}
  .bottom-half{width:50%;padding:20px}
}



@layer overrides {
  .left.left-hero-card.is-hidden{display:none !important}
  .flexfix{display:none;flex:0}
}



@layer panes {
  .home-pane{pointer-events:auto;border-radius:var(--radius-lg);padding:var(--pad);display:flex;flex-direction:column;gap:var(--gap);overflow:hidden;min-height:0}
  .home-pane--top{height:auto;min-height:0}
  .home-pane--bottom{height:auto;min-height:0;flex:0 0 auto;display:flex;flex-direction:column;gap:var(--gap);position:relative;overflow:hidden}
  .home-pane--search{pointer-events:auto;padding:10px 12px;height:auto;min-height:56px;display:flex;align-items:center;overflow:visible}
}



@layer author {
  .author{display:grid;grid-template-columns:6rem 1fr;gap:var(--gap);align-items:center}
  .author__avatar{width:6rem;height:6rem;border-radius:50%;object-fit:cover;display:block;border:1px solid var(--stroke)}
  .author__meta{display:flex;flex-direction:column;gap:4px;padding-top:5px}
  .author__name{font:700 14px/1.2 'Unbounded',sans-serif;color:#fff}
  .author__name em{font-style:normal;opacity:.75;margin-left:6px;font-weight:700}
  .author__stats,.author__years{font:600 12px/1.35 Inter,system-ui,sans-serif;color:rgba(255,255,255,.85)}
}



@layer about {
  .about__text{
    position:relative;
    color:rgba(255,255,255,1);
    font-size:13.5px;
    line-height:1.55;
    overflow:hidden;
    max-height:9.5em;
    display:-webkit-box;
    -webkit-line-clamp:7;
    -webkit-box-orient:vertical
  }
  .about__text p{margin:0 0 1em}
  .about__text .about-mini{display:block;white-space:normal;word-break:break-word}

  .about__toggle,.about-link{
    align-self:flex-start;
    font-size:11px;
    font-weight:700;
    color:#90ee90;
    background:transparent;
    cursor:pointer;
    transition:transform .15s ease;
    border:1px solid #90ee90;
    border-radius:30px;
    padding:3px 9px;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    gap:6px;
    line-height:1.2;
    -webkit-appearance:none;
    appearance:none;
  }
  .about__toggle{margin:0}
  .about__toggle:active{transform:scale(.98)}
  .about-link{display:inline-flex}

  .shift-long{margin:0 3px;font-weight:normal}

  .about-hero{
    grid-area:hero;
    display:none;
    opacity:0;
    transform:translateY(8px) scale(.98);
    border-radius:16px;
    overflow:hidden;
    width:100%;
    aspect-ratio:1/1;
    background:#000
  }
  .about-hero img{transition:opacity .25s ease;width:100%;height:100%;object-fit:cover;display:block}

  .about__close{display:none}

  .about-col{overflow:auto;font-size:14.5px}
  .about-col-left{grid-area:left}
  .about-col-right{grid-area:right}
  .about-col-extra{grid-area:extra;overflow:auto}
  .about-col p{margin:0 0 1em}

  .about-mini .about-readmore{
    margin-left:0;
    font-size:12px;
    font-weight:700;
    color:#90ee90;
    text-decoration:underline;
    cursor:pointer
  }
  .about-mini .about-readmore:hover{color:#bff5bf}

  /* визуал для цитаты */
  .about__text .about-quote{font-style:italic;opacity:.95}
  .about__text .about-quote__by{opacity:.8;font-weight:600}

  /* храним полный текст (для модалки), но не показываем */
  .about-full{
    position:absolute;
    left:-9999px;
    top:auto;
    width:1px;
    height:1px;
    overflow:hidden;
  }
}



@layer feature {
  .feature-nav{padding:0 14px 14px}
  .feature-slide{position:absolute;inset:0;display:grid;grid-template-columns:1fr;gap:14px;padding:14px;opacity:0;pointer-events:none;transform:translate3d(0,20px,0) scale(.98);transition:transform .7s cubic-bezier(.2,.7,.2,1),opacity .7s ease}
  .feature-slide:first-child{opacity:1;pointer-events:auto;transform:none}
  .feature-media{position:relative;border-radius:12px;overflow:hidden;width:100%;grid-column:1;grid-row:1}
  .feature-media::after{content:"";position:absolute;inset:0;background:linear-gradient(to top,rgba(0,0,0,.32),rgba(0,0,0,0) 55%);pointer-events:none}
  .feature-media img{width:100%;height:100%;object-fit:cover;object-position:center;display:block;transform-origin:60% 40%;animation:kb 5.2s ease-in-out both;will-change:transform}
  .feature-info{grid-column:1;grid-row:2;display:flex;flex-direction:column;gap:8px;color:var(--text);position:relative;overflow:visible !important;max-height:none !important;min-height:auto !important}
  .feature-title{margin:0;font:700 16px/1.25 'Unbounded',sans-serif;color:#fff;letter-spacing:.02px !important;opacity:0;transform:translateY(8px);display:block;width:100%;white-space:normal;overflow:hidden;text-overflow:ellipsis}
  .feature-sub{margin:0;font:600 13px/1.35 Inter,system-ui,sans-serif;color:rgba(255,255,255,.9);opacity:0;transform:translateY(8px);display:block;width:100%;white-space:normal;overflow:hidden;text-overflow:ellipsis}
  .feature-sub em{font-style:normal;opacity:.75;margin-left:6px;white-space:nowrap}
  h3.feature-title,h4.feature-sub{margin:0;padding:0;font-family:'Avenir Book','Avenir Next',sans-serif;color:#90ee90;font-size:16.5px;line-height:1;letter-spacing:-1px !important;font-weight:400 !important;overflow:visible}
  h4.feature-sub{display:block;font-size:14px;font-style:normal}
  .feature-desc{margin:2px 0 6px;font-size:13.5px;line-height:1.55;color:rgba(255,255,255,1);opacity:0;transform:translateY(8px);max-height:none !important;display:block !important;-webkit-line-clamp:unset !important;-webkit-box-orient:unset !important;overflow:visible !important;white-space:normal !important}
  .feature-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:auto}
  .feature-cta{position:absolute;right:0;bottom:-5px;padding:3px 10px;font:700 12px/1.1 Inter,system-ui,sans-serif;border:1px solid rgba(255,255,255,.75);color:#fff;text-decoration:none;border-radius:999px;opacity:0;transform:translateY(6px);transition:opacity .25s ease,transform .25s ease,border-color .2s ease;pointer-events:auto}
  .typer-caret::after{content:'▌';margin-left:2px;opacity:.85;animation:blink .8s step-end infinite}
  .feature-slide .slide-crumbs{display:none}
  .feature-meta{position:absolute;left:0;bottom:0}
  .feature-meta__copyright{display:block;font-size:11px;line-height:1.3;color:rgba(255,255,255,.6);font-weight:400;letter-spacing:0;white-space:nowrap}
}




@layer chat {
  .msg{max-width:78%;padding:10px 12px;border-radius:18px;font:600 13px/1.35 Inter,system-ui,sans-serif;color:#fff;position:relative}
  .msg--bot{align-self:flex-start;background:rgba(255,255,255,.08);border:1px solid var(--stroke);border-top-left-radius:6px}
  .msg--you{align-self:flex-end;background:linear-gradient(135deg,#4fa2ff,#6cd3ff);border:1px solid rgba(255,255,255,.2);border-top-right-radius:6px}
  .msg small{display:block;opacity:.7;margin-top:6px;font-weight:600;font-size:11px}
  .typing{width:56px;height:26px;border-radius:16px;background:rgba(255,255,255,.08);border:1px solid var(--stroke);display:flex;align-items:center;justify-content:center;gap:4px}
  .typing i{width:6px;height:6px;border-radius:50%;background:rgba(255,255,255,.7);animation:t 1s infinite ease-in-out}
  .qr-wrap{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 2px}
  .qr{padding:8px 12px;border-radius:999px;border:1px solid var(--stroke);background:rgba(255,255,255,.06);color:#fff;font:700 12px/1 Inter,system-ui,sans-serif;cursor:pointer}
  .qr--cta{border-color:rgba(144,238,144,.9);color:#90ee90;background:transparent}
}



@layer legacy {
  .right.homepage-layout{flex:45;display:flex;flex-direction:column;justify-content:space-between;padding:20px;overflow:hidden;color:#fff}
  .author-block{text-align:center}
  .author-pic{width:200px;height:200px;border-radius:50%;object-fit:cover;margin-bottom:10px;border:2px solid #90ee90}
  .intro-block{text-align:center;margin-bottom:20px}
  .intro-block h2{margin:0 0 10px;color:#90ee90}
  .intro-block p{font-size:14px;line-height:1.6;color:#ccc}
  .slider-block{margin-top:0}
  .slider{position:relative;overflow:hidden;border-radius:12px;box-shadow:0 8px 24px rgba(0,0,0,.25);background:#0f0f0f}
  .slide{display:none}
  .slide img{width:100%;height:100%;display:block;object-fit:cover;transition:transform .6s ease}
  .left-hero{display:flex;flex-direction:column;gap:20px;padding:20px;background:#111;border-radius:12px;box-shadow:0 6px 20px rgba(0,0,0,.3);color:#eee;font-family:Inter,sans-serif;line-height:1.6}
  .left-hero__img-wrap{overflow:hidden;border-radius:12px}
  .left-hero__img{width:100%;height:auto;display:block;object-fit:cover;transition:transform .6s ease}
  .left-hero__intro{font-size:15px;color:#ccc;padding:10px 5px}
  .left-hero__intro::first-letter{font-size:22px;font-weight:700;color:#90ee90}
  .right-half{display:flex;align-items:stretch;padding:18px;background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.02));border-left:1px solid rgba(255,255,255,.08)}
  .pair-list{display:grid;grid-template-columns:1fr;gap:14px;width:100%}
  .pair-item{background:rgba(0,0,0,.35);border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:14px 16px;box-shadow:0 6px 18px rgba(0,0,0,.18);transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}
  .pair-title{margin:0 0 6px;font-size:15px;line-height:1.3;font-weight:600}
  .pair-title a{color:#cfeecf;text-decoration:none;border-bottom:1px dashed rgba(207,238,207,.35)}
  .pair-caption{margin:0;color:#c9c9c9;font-size:14px;line-height:1.55;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
}



@layer state {
  .about__toggle:hover,.about-link:hover{border-color:#90ee90;color:#90ee90}
  .about__toggle:active{transform:scale(.98)}
  .feature-slide[data-active="1"]{opacity:1;pointer-events:auto;transform:translate3d(0,0,0) scale(1)}
  .feature-slide[data-active="1"] .feature-title,.feature-slide[data-active="1"] .feature-sub,.feature-slide[data-active="1"] .feature-desc{animation:rise .5s ease forwards}
  .feature-slide[data-active="1"] .feature-title{animation-delay:.12s}
  .feature-slide[data-active="1"] .feature-sub{animation-delay:.2s}
  .feature-slide[data-active="1"] .feature-desc{animation-delay:.28s}
  .feature-slide.leaving{opacity:0;transform:translate3d(0,-8px,0) scale(.985) rotateX(4deg);transition:transform .5s cubic-bezier(.2,.7,.2,1),opacity .5s ease}
  .feature-slide.entering{opacity:0;transform:translate3d(0,18px,0) scale(.985) rotateX(-3deg)}
  .feature-slide.entering[data-active="1"]{opacity:1;transform:translate3d(0,0,0) scale(1) rotateX(0);transition:transform .6s cubic-bezier(.2,.7,.2,1),opacity .6s ease}
  .feature-cta:hover{border-color:#90ee90;color:#fff}
  .feature-cta.show{opacity:1;transform:none}
  #home-about.is-overlay{position:fixed;left:var(--left);top:50px;bottom:25px;width:50vw;right:auto;height:auto;max-height:none;z-index:40;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto 1fr;grid-template-areas:'hero right' 'left right';gap:18px;padding:20px 18px 18px;border-radius:16px;backdrop-filter:saturate(130%) blur(4px);-webkit-backdrop-filter:saturate(130%) blur(4px);box-shadow:0 24px 64px rgba(0,0,0,.45);transform:translateY(10px) scale(.985);opacity:.001;animation:ov-in var(--fx) forwards;background:rgba(0,0,0,.7)}
  #home-about.is-overlay .author{display:none !important}
  #home-about.is-overlay .about-hero{position:relative;display:block;animation:hero-in var(--fx) .06s both}
  #home-about.is-overlay .about__text{display:none}
  #home-about.is-overlay .about__toggle{display:none}
  #home-about.is-overlay.has-extra{width:75vw;grid-template-columns:1fr 1fr 1fr;grid-template-areas:'hero right extra' 'left right extra'}
  #home-about.is-overlay .about-hero{aspect-ratio:4/2.5}
  #home-about.is-overlay .about-col,#home-about.is-overlay .about-hero{min-height:0;overflow:auto}
  #home-about.is-overlay .about__close{display:inline-flex;position:absolute;top:5px;right:5px;justify-content:center;width:32px;height:32px;border-radius:50%;border:1px solid var(--stroke-strong);background:rgba(0,0,0,.35);color:#fff;cursor:pointer;z-index:5}
  #home-about.is-overlay .about__close::before{content:"✕";font-size:16px;line-height:32px}
  #home-about.is-overlay .hero-thumbs{position:absolute;right:6px;bottom:3px;display:flex;gap:6px;z-index:4;pointer-events:auto}
  #home-about.is-overlay .hero-thumb{width:44px;height:30px;border-radius:8px;border:1px solid var(--stroke-strong);background:rgba(0,0,0,.35);overflow:hidden;cursor:pointer;opacity:.9;transition:transform .15s ease,opacity .15s ease,outline-color .15s ease}
  #home-about.is-overlay .hero-thumb:hover{transform:translateY(-1px);opacity:1}
  #home-about.is-overlay .hero-thumb.is-active{outline:2px solid #90ee90}
  #home-about.is-overlay .hero-thumb img{width:100%;height:100%;object-fit:cover;display:block}
  #home-about.is-overlay .about-hero img.is-fading{opacity:.1}
  #home-about:not(.is-overlay){position:static;right:auto;bottom:auto;width:auto;height:auto;min-height:0;overflow:auto}
  #home-about:not(.is-overlay) .author{margin-bottom:0}
  .typing i:nth-child(2){animation-delay:.15s}
  .typing i:nth-child(3){animation-delay:.3s}
  .qr:hover{border-color:#90ee90}
  .qr.is-on{background:rgba(144,238,144,.18);border-color:rgba(144,238,144,.8)}
  .about__text .about-mini p:last-child{margin-bottom:0}
  .slide.active{display:block}
  .slide.active img:hover{transform:scale(1.03)}
  .left-hero__img:hover{transform:scale(1.05)}
  .pair-item:hover{transform:translateY(-2px);box-shadow:0 10px 26px rgba(0,0,0,.22);border-color:rgba(255,255,255,.14)}
  .pair-title a:hover{border-bottom-color:transparent}
}



@layer animations {
  @keyframes kb{0%{transform:scale(1.06) translate3d(0,8px,0) rotate(.001deg);filter:saturate(1.02) brightness(1.02)}50%{transform:scale(1.10) translate3d(-6px,0,0) rotate(.001deg)}100%{transform:scale(1.04) translate3d(0,-6px,0) rotate(.001deg);filter:saturate(1) brightness(1)}}
  @keyframes rise{to{opacity:1;transform:translateY(0)}}
  @keyframes blink{50%{opacity:.2}}
  @keyframes ov-in{to{transform:none;opacity:1}}
  @keyframes hero-in{to{opacity:1;transform:none}}
  @keyframes t{0%,100%{transform:translateY(0);opacity:.5}50%{transform:translateY(-3px);opacity:1}}
}










@media (min-width: 801px){
  /* Шапка: левая часть растягивается, правая — фиксированная */
  header.topbar{
    justify-content: space-between;
    gap: 12px;
  }

  header.topbar > div{
    flex: 1 1 auto !important;
    min-width: 0; /* КЛЮЧЕВОЕ: без этого breadcrumbs не умеют нормально сжиматься */
  }

  header.topbar > nav.topbar-right{
    flex: 0 0 auto !important;
    min-width: max-content;
    white-space: nowrap;
  }

  /* На страницах, где есть legacy span.flexfix */
  header.topbar > .flexfix{
    display: none !important;
  }

  /* Обертка breadcrumbs должна уметь сжиматься */
  header.topbar > div > .breadcrumbs{
    flex: 1 1 auto;
    min-width: 0;
    display: block;
  }

  /* Контейнер, который меняется JS-ом */
  #header-crumbs{
    display: block;
    min-width: 0;
    max-width: 100%;
  }

  /* Если внутри остался вложенный .breadcrumbs (на некоторых страницах) */
  #header-crumbs > .breadcrumbs{
    min-width: 0;
    max-width: 100%;
  }
}