
:root {
  --ink:#111111;
  --paper:#f5f2ec;
  --panel:#ffffff;
  --soft:#ebe7df;
  --line:#d8d2c8;
  --muted:#756f66;
  --accent:#ff5a36;
  --accent-dark:#dc3f20;
  --green:#23875e;
  --green-bg:#e6f4ed;
  --yellow:#9a6a05;
  --yellow-bg:#fff0c9;
  --red:#a63d31;
  --red-bg:#f8e5e1;
  --gray-bg:#ece9e3;
  --shadow:0 16px 45px rgba(17,17,17,.08);
  --radius:18px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;background:var(--paper);color:var(--ink);
  font-family:"Arial", "Helvetica Neue", sans-serif;
}
button,input,select{font:inherit}
.app{display:grid;grid-template-columns:245px minmax(0,1fr);min-height:100vh}
.sidebar{
  position:sticky;top:0;height:100vh;background:var(--ink);color:white;
  padding:24px 17px;display:flex;flex-direction:column;gap:24px;
}
.brand{display:flex;align-items:center;gap:11px;padding:0 8px}
.logo{
  width:43px;height:43px;background:var(--accent);color:white;
  border-radius:50%;display:grid;place-items:center;font-size:15px;font-weight:900;
}
.brand-name{font-size:18px;font-weight:900;letter-spacing:-.03em}
.brand-note{font-size:11px;color:#aaa39a;margin-top:3px}
.project-tag{margin:0 8px;padding:9px 10px;border:1px solid #343434;border-radius:12px;color:#c7c2ba;font-size:11px}
.nav{display:flex;flex-direction:column;gap:5px}
.nav button{
  border:0;background:transparent;color:#bdb8b0;text-align:left;cursor:pointer;
  padding:12px 13px;border-radius:12px;font-weight:700;
}
.nav button:hover,.nav button.active{background:#272727;color:white}
.nav button.active::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--accent);margin-right:9px}
.sidebar-foot{margin-top:auto;color:#827d76;font-size:11px;line-height:1.55;padding:0 8px}
.main{padding:25px 30px 55px;min-width:0}
.topbar{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:21px}
.eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:.12em;color:var(--accent);font-weight:900}
h1{margin:5px 0 0;font-size:34px;letter-spacing:.018em;line-height:1.08}
.subtitle{color:var(--muted);margin:8px 0 0;font-size:13px}
.controls{display:flex;gap:9px;align-items:center;flex-wrap:wrap}
.control{border:1px solid var(--line);background:white;padding:10px 12px;border-radius:12px;color:var(--ink)}
.toggle{display:flex;gap:7px;align-items:center;color:var(--muted);font-size:12px}
.toggle input{accent-color:var(--accent);width:18px;height:18px}
.section{display:none}
.section.active{display:block}
.grid{display:grid;gap:15px}
.kpis{grid-template-columns:repeat(5,minmax(0,1fr));margin-bottom:16px}
.card{
  background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);
  padding:18px;box-shadow:var(--shadow);
}
.kpi{min-height:145px;display:flex;flex-direction:column}
.kpi .label{font-size:10px;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);font-weight:900}
.kpi .value{font-size:31px;line-height:1;font-weight:900;letter-spacing:-.045em;margin:18px 0 8px}
.kpi .note{margin-top:auto;font-size:11px;color:var(--muted);line-height:1.45}
.kpi.accent{border-top:5px solid var(--accent)}
.kpi.good{border-top:5px solid var(--green)}
.kpi.warn{border-top:5px solid #dba326}
.kpi.bad{border-top:5px solid var(--red)}
.two{grid-template-columns:minmax(0,1.2fr) minmax(310px,.8fr)}
.section-head{display:flex;justify-content:space-between;align-items:end;gap:15px;margin-bottom:14px}
.section-head h2{margin:0;font-size:19px;letter-spacing:-.035em}
.section-head span{font-size:11px;color:var(--muted)}
canvas{display:block;width:100%;height:260px}
.insights{display:grid;gap:10px}
.insight{border:1px solid var(--line);border-radius:14px;padding:13px;background:white}
.insight b{font-size:13px}
.insight p{margin:5px 0 0;color:var(--muted);font-size:12px;line-height:1.5}
.pill{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:10px;font-weight:900;white-space:nowrap}
.pill.green{color:var(--green);background:var(--green-bg)}
.pill.yellow{color:var(--yellow);background:var(--yellow-bg)}
.pill.red{color:var(--red);background:var(--red-bg)}
.pill.gray{color:#65605a;background:var(--gray-bg)}
.pill.black{color:white;background:var(--ink)}
.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:15px;background:white}
table{border-collapse:collapse;width:100%;font-size:12px;background:white}
th{position:sticky;top:0;z-index:2;background:#171717;color:white;text-align:left;padding:12px;white-space:nowrap}
td{padding:11px 12px;border-bottom:1px solid #eee9e1;vertical-align:top}
tr:last-child td{border-bottom:0}
tr:hover td{background:#fffaf7}
.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:12px}
.search{min-width:260px;flex:1}
.btn{border:0;border-radius:12px;padding:10px 13px;font-weight:900;cursor:pointer}
.btn.primary{background:var(--accent);color:white}
.btn.primary:hover{background:var(--accent-dark)}
.btn.dark{background:var(--ink);color:white}
.btn.light{background:white;border:1px solid var(--line);color:var(--ink)}
.stat-row{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:14px}
.mini-stat{background:white;border:1px solid var(--line);border-radius:14px;padding:13px}
.mini-stat small{display:block;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.07em}
.mini-stat b{display:block;font-size:23px;margin-top:6px}
.pagination{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:11px;font-size:12px;color:var(--muted)}
.page-buttons{display:flex;gap:6px}
.page-buttons button{width:34px;height:34px;border:1px solid var(--line);background:white;border-radius:9px;cursor:pointer}
.page-buttons button:disabled{opacity:.35;cursor:default}
.geo-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.answer-card{background:white;border:1px solid var(--line);border-radius:18px;padding:18px;box-shadow:var(--shadow)}
.answer-meta{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;margin-bottom:12px}
.answer-meta h3{font-size:15px;margin:0 0 5px;line-height:1.25}
.meta-line{font-size:11px;color:var(--muted)}
.answer-text{background:#f7f4ef;border-radius:14px;padding:14px;font-size:12px;line-height:1.62;max-height:225px;overflow:auto}
.answer-text mark{background:#ffd1c6;color:#7c200e;padding:1px 3px;border-radius:3px}
.answer-note{margin-top:10px;color:var(--muted);font-size:11px;line-height:1.45}
.answer-actions{display:flex;justify-content:space-between;align-items:center;margin-top:12px}
.platform-mark{font-weight:900;font-size:11px;text-transform:uppercase;letter-spacing:.05em}
.details{display:none;margin-top:10px;background:#fff;border-top:1px solid var(--line);padding-top:10px;font-size:11px;color:var(--muted)}
.answer-card.expanded .details{display:block}
.issues{grid-template-columns:repeat(3,1fr)}
.issue strong{font-size:29px}
.issue p{margin:6px 0 0;color:var(--muted);font-size:12px}
.action-list{display:grid;gap:11px}
.action{display:grid;grid-template-columns:40px 1fr auto;gap:13px;align-items:start;background:white;border:1px solid var(--line);border-radius:16px;padding:15px}
.action-num{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:var(--accent);color:white;font-weight:900}
.action h3{margin:0 0 5px;font-size:14px}
.action p{margin:0;color:var(--muted);font-size:12px;line-height:1.45}
.expert-box{display:none;margin-top:16px;border:1px dashed #aaa39a;background:white;border-radius:16px;padding:15px}
.expert .expert-box{display:block}
.empty{padding:30px;text-align:center;color:var(--muted)}
.url{max-width:320px;word-break:break-all;color:#4e4943}
.pos{font-weight:900}
.pos.good{color:var(--green)}.pos.mid{color:var(--yellow)}.pos.low{color:var(--red)}.pos.none{color:#999}
@media(max-width:1150px){
  .kpis{grid-template-columns:repeat(3,1fr)}
  .stat-row{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:1024px){
  .app{grid-template-columns:1fr}
  .mobile-menu-button{
    display:block;
    position:fixed;
    z-index:65;
    top:calc(12px + env(safe-area-inset-top, 0px));
    right:calc(12px + env(safe-area-inset-right, 0px));
  }
  .mobile-nav-overlay{
    display:block;
    position:fixed;
    inset:0;
    z-index:39;
    background:rgba(17,17,17,.42);
    opacity:0;
    visibility:hidden;
    transition:opacity .2s ease,visibility .2s ease;
  }
  .sidebar{
    position:fixed;
    z-index:40;
    left:0;
    top:0;
    bottom:0;
    right:auto;
    width:min(82vw,300px);
    height:100vh;
    height:100dvh;
    padding:calc(22px + env(safe-area-inset-top, 0px)) 17px calc(22px + env(safe-area-inset-bottom, 0px));
    transform:translate3d(-105%,0,0);
    transition:transform .24s ease;
    -webkit-overflow-scrolling:touch;
    box-shadow:18px 0 45px rgba(17,17,17,.22);
  }
  body.mobile-menu-open .sidebar{transform:translate3d(0,0,0)}
  body.mobile-menu-open .mobile-nav-overlay{
    opacity:1;
    visibility:visible;
  }
  .sidebar .brand{display:flex}
  .sidebar .project-tag{display:block}
  .sidebar .sidebar-foot{display:block}
  .nav{
    flex-direction:column;
    overflow:visible;
  }
  .nav button{
    min-width:0;
    width:100%;
    text-align:left;
    font-size:13px;
  }
  .main{padding:16px 13px 45px}
  .topbar{
    display:block;
    padding-right:62px;
    min-height:50px;
  }
  .topbar-title{min-width:0}
  .controls{
    width:100%;
    margin-top:14px;
  }
  .two,.geo-grid{grid-template-columns:1fr}
  .kpis{grid-template-columns:repeat(2,1fr)}
  .seo-stat-row{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:520px){
  h1{font-size:28px}
  .kpis,.issues,.stat-row{grid-template-columns:1fr}
  .action{grid-template-columns:38px 1fr}
  .action>.pill{grid-column:2}
  .search{min-width:100%}
}

/* Более спокойная типографика */
.brand-name{font-weight:700}
.eyebrow{font-weight:600}
h1{font-weight:700}
.nav button{font-weight:600}
.kpi .label{font-weight:600}
.kpi .value{font-weight:700}
.section-head h2{font-weight:700}
.insight b{font-weight:600}
.pill{font-weight:600}
.btn{font-weight:600}
.mini-stat b{font-weight:700}
.answer-meta h3{font-weight:600}
.platform-mark{font-weight:600}
.action-num{font-weight:700}
.action h3{font-weight:600}
.pos{font-weight:700}
th{font-weight:600}
td b{font-weight:600}


/* Сводка: компактные KPI в два ряда */
.overview-kpis{
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.overview-kpis .kpi{
  min-height:126px;
  padding:16px;
}
.overview-kpis .kpi .value{
  font-size:29px;
  margin:14px 0 7px;
}
.overview-kpis .kpi .note{
  font-size:10.5px;
}
@media(max-width:1150px){
  .overview-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:840px){
  .overview-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:520px){
  .overview-kpis{grid-template-columns:1fr}
}


/* Облегчённая типографика блока GEO / AI */
#geo .section-head h2{
  font-weight:500;
}
#geo .geo-filter{
  font-weight:400;
}
#geo .geo-filter.primary{
  font-weight:500;
}


/* Контекстные подсказки для KPI */
.kpi .label{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  position:relative;
}
.metric-help{
  position:relative;
  flex:0 0 auto;
  width:18px;
  height:18px;
  margin-top:-2px;
  border:1px solid #bdb5aa;
  border-radius:50%;
  background:#fff;
  color:#6f685f;
  display:inline-grid;
  place-items:center;
  font-size:11px;
  line-height:1;
  font-weight:600;
  cursor:help;
  padding:0;
}
.metric-help:hover,
.metric-help:focus-visible,
.metric-help.is-open{
  border-color:var(--accent);
  color:var(--accent);
  outline:none;
}
.metric-tooltip{
  position:absolute;
  z-index:100;
  top:26px;
  right:0;
  width:min(285px,calc(100vw - 40px));
  padding:12px 13px;
  border:1px solid #2b2926;
  border-radius:12px;
  background:#171717;
  color:#fff;
  box-shadow:0 14px 35px rgba(17,17,17,.22);
  font-size:11px;
  line-height:1.5;
  letter-spacing:0;
  text-transform:none;
  font-weight:400;
  opacity:0;
  visibility:hidden;
  transform:translateY(-4px);
  transition:opacity .16s ease,transform .16s ease,visibility .16s;
  pointer-events:none;
}
.metric-tooltip::before{
  content:"";
  position:absolute;
  top:-6px;
  right:8px;
  width:10px;
  height:10px;
  background:#171717;
  border-left:1px solid #2b2926;
  border-top:1px solid #2b2926;
  transform:rotate(45deg);
}
.metric-help:hover .metric-tooltip,
.metric-help:focus-visible .metric-tooltip,
.metric-help.is-open .metric-tooltip{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}
@media(max-width:520px){
  .metric-tooltip{
    position:fixed;
    left:16px;
    right:16px;
    top:auto;
    bottom:82px;
    width:auto;
    font-size:12px;
  }
  .metric-tooltip::before{display:none}
}


/* Мобильное меню-гамбургер */
.mobile-menu-button,
.mobile-nav-overlay{
  display:none;
}
.mobile-menu-button{
  width:46px;
  height:46px;
  flex:0 0 auto;
  border:0;
  border-radius:50%;
  background:var(--accent);
  padding:11px;
  cursor:pointer;
  box-shadow:0 10px 24px rgba(17,17,17,.18);
  -webkit-appearance:none;
  appearance:none;
  -webkit-tap-highlight-color:transparent;
}
.mobile-menu-button span{
  display:block;
  width:100%;
  height:2px;
  background:#fff;
  border-radius:2px;
  margin:4px 0;
  transition:transform .2s ease,opacity .2s ease;
}
body.mobile-menu-open{
  overflow:hidden;
}
body.mobile-menu-open .mobile-menu-button span:nth-child(1){
  transform:translateY(6px) rotate(45deg);
}
body.mobile-menu-open .mobile-menu-button span:nth-child(2){
  opacity:0;
}
body.mobile-menu-open .mobile-menu-button span:nth-child(3){
  transform:translateY(-6px) rotate(-45deg);
}

/* SEO: трафик и сводные показатели */
.seo-stat-row{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.mini-stat{
  min-height:112px;
}
.mini-stat small{
  line-height:1.35;
}
.mini-note{
  display:block;
  margin-top:8px;
  color:var(--muted);
  font-size:10px;
  line-height:1.4;
}
.seo-traffic-grid{
  margin-bottom:15px;
}
.traffic-row{
  margin:0 0 17px;
}
.traffic-row:last-child{
  margin-bottom:0;
}
.traffic-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  font-size:12px;
  margin-bottom:7px;
}
.traffic-head b{
  font-weight:600;
}
.traffic-bar{
  height:9px;
  overflow:hidden;
  border-radius:999px;
  background:#ece7df;
}
.traffic-bar i{
  display:block;
  height:100%;
  border-radius:999px;
  background:var(--accent);
}
.traffic-bar.brand i{
  background:#d69c21;
}
.traffic-bar.nonbrand i{
  background:var(--green);
}
.traffic-row small{
  display:block;
  color:var(--muted);
  font-size:10px;
  margin-top:6px;
}
.traffic-conclusion{
  margin-top:12px;
  padding:12px 13px;
  border-radius:12px;
  background:var(--gray-bg);
  color:#4f4a43;
  font-size:11px;
  line-height:1.5;
}

/* Подсказка на мобильном открывается в центре экрана */
body.tooltip-open{
  overflow:hidden;
}
body.tooltip-open::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:180;
  background:rgba(17,17,17,.42);
}
.metric-help.is-open{
  z-index:220;
}


@media(max-width:520px){
  .metric-tooltip{
    position:fixed;
    z-index:230;
    left:16px;
    right:16px;
    top:50%;
    bottom:auto;
    width:auto;
    max-height:70dvh;
    overflow:auto;
    padding:18px 17px;
    border-radius:16px;
    font-size:13px;
    line-height:1.55;
    transform:translateY(calc(-50% - 6px));
  }
  .metric-help:hover .metric-tooltip,
  .metric-help:focus-visible .metric-tooltip,
  .metric-help.is-open .metric-tooltip{
    transform:translateY(-50%);
  }
  .metric-tooltip::before{display:none}
  .seo-stat-row{grid-template-columns:1fr}
}


.mini-stat small{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
}
.mini-stat .metric-help{
  margin-top:-3px;
}


/* Логичная двухступенчатая структура поискового трафика */
.search-structure-card{
  display:flex;
  flex-direction:column;
  gap:16px;
}
.traffic-total{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:15px 16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#f8f5f0;
}
.traffic-total small{
  display:block;
  color:var(--muted);
  font-size:10px;
  margin-bottom:5px;
}
.traffic-total strong{
  display:block;
  font-size:28px;
  line-height:1;
  font-weight:700;
}
.traffic-stage{
  padding-top:2px;
}
.traffic-stage-head{
  display:flex;
  justify-content:space-between;
  gap:14px;
  margin-bottom:9px;
}
.traffic-stage-head b{
  font-size:12px;
  font-weight:600;
}
.traffic-stage-head p{
  margin:4px 0 0;
  color:var(--muted);
  font-size:10px;
  line-height:1.4;
}
.stacked-bar{
  display:flex;
  width:100%;
  height:14px;
  overflow:hidden;
  border-radius:999px;
  background:#ece7df;
}
.stacked-bar i{
  display:block;
  height:100%;
}
.stacked-bar .known{background:var(--accent)}
.stacked-bar .unknown{background:#cfc8bd}
.stacked-bar .brand{background:#d69c21}
.stacked-bar .nonbrand{background:var(--green)}
.traffic-legend{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:10px;
}
.traffic-legend>div{
  display:grid;
  grid-template-columns:auto auto 1fr;
  align-items:center;
  gap:7px;
  min-width:0;
}
.legend-dot{
  width:9px;
  height:9px;
  border-radius:50%;
}
.legend-dot.known{background:var(--accent)}
.legend-dot.unknown{background:#cfc8bd}
.legend-dot.brand{background:#d69c21}
.legend-dot.nonbrand{background:var(--green)}
.traffic-legend b{
  font-size:12px;
  font-weight:600;
}
.traffic-legend small{
  color:var(--muted);
  font-size:10px;
  line-height:1.35;
}
@media(max-width:520px){
  .traffic-legend{
    grid-template-columns:1fr;
  }
  .traffic-total strong{
    font-size:25px;
  }
}


html,body{
  max-width:100%;
}
body{
  overflow-x:hidden;
}


/* Резервный мобильный режим для Safari внутри iframe */
html.mobile-layout .mobile-menu-button{
  display:block;
  position:fixed;
  z-index:65;
  top:calc(12px + env(safe-area-inset-top, 0px));
  right:calc(12px + env(safe-area-inset-right, 0px));
}
html.mobile-layout .app{
  grid-template-columns:1fr;
}
html.mobile-layout .main{
  padding-top:16px;
}
html.mobile-layout .topbar{
  padding-right:62px;
  min-height:50px;
}


.seo-stat-row{
  grid-template-columns:repeat(4,minmax(0,1fr));
}
@media(max-width:1200px){
  .seo-stat-row{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:840px){
  .seo-stat-row{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:520px){
  .seo-stat-row{grid-template-columns:1fr}
}


.period-status{
  display:inline-flex;
  align-items:center;
  min-height:38px;
  padding:8px 11px;
  border-radius:999px;
  background:var(--green-bg);
  color:var(--green);
  font-size:10px;
  line-height:1.25;
}
.period-status.partial{
  background:var(--yellow-bg);
  color:var(--yellow);
}
.metric-unavailable{
  color:#999 !important;
}
@media(max-width:840px){
  .period-status{
    width:100%;
    justify-content:center;
  }
}


.geo-kpis{
  grid-template-columns:repeat(5,minmax(0,1fr));
}
.geo-summary-grid{
  align-items:start;
}
.geo-prompts-card .table-wrap{
  max-height:640px;
}
.geo-prompt-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
  margin:0 0 12px;
}
.geo-prompt-summary>div{
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#f8f5f0;
}
.geo-prompt-summary small{
  display:block;
  color:var(--muted);
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.geo-prompt-summary b{
  display:block;
  margin-top:4px;
  font-size:18px;
  font-weight:600;
}
.prompt-platform-list{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  min-width:180px;
}
.prompt-platform{
  display:inline-flex;
  padding:3px 6px;
  border-radius:999px;
  background:var(--green-bg);
  color:var(--green);
  font-size:9px;
  white-space:nowrap;
}
.prompt-platform.false{
  background:var(--red-bg);
  color:var(--red);
}
.prompt-text{
  min-width:300px;
  max-width:520px;
  line-height:1.45;
}
@media(max-width:1200px){
  .geo-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:840px){
  .geo-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .geo-prompt-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:520px){
  .geo-kpis,.geo-prompt-summary{grid-template-columns:1fr}
}


.geo-quality-stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.geo-quality-stats .mini-stat{
  min-height:118px;
}
.quality-method-note{
  margin-top:12px;
  padding:11px 13px;
  border-radius:12px;
  background:var(--gray-bg);
  color:#565049;
  font-size:10px;
  line-height:1.55;
}
.geo-fact-risk-card .table-wrap{
  max-height:520px;
}
#geoCompetitorBody tr.is-client td{
  background:var(--green-bg);
}
@media(max-width:980px){
  .geo-quality-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:520px){
  .geo-quality-stats{grid-template-columns:1fr}
}


.client-workspace{
  margin:18px 0 12px;
  padding:11px 12px;
  border:1px solid rgba(255,255,255,.16);
  border-radius:12px;
  background:rgba(255,255,255,.06);
}
.client-workspace small{
  display:block;
  color:rgba(255,255,255,.55);
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.client-workspace b{
  display:block;
  margin-top:4px;
  color:#fff;
  font-size:15px;
  font-weight:600;
}
.project-switcher-label{
  display:block;
  margin:0 0 6px;
  color:rgba(255,255,255,.55);
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.project-switcher{
  width:100%;
  min-height:42px;
  margin-bottom:9px;
  padding:9px 30px 9px 10px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:10px;
  background:#292724;
  color:#fff;
  font:inherit;
  font-size:11px;
  cursor:pointer;
}
.project-switcher option,
.project-switcher optgroup{
  color:#111;
  background:#fff;
}
.active-project-context{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  margin-top:10px;
}
.active-project-context span,
.active-project-context b,
.active-project-context em{
  display:inline-flex;
  align-items:center;
  min-height:27px;
  padding:5px 9px;
  border-radius:999px;
  font-size:9px;
  font-style:normal;
}
.active-project-context span{
  background:#ece7df;
  color:#5c554c;
}
.active-project-context b{
  background:var(--ink);
  color:#fff;
  font-weight:500;
}
.active-project-context em{
  background:var(--green-bg);
  color:var(--green);
}
.project-intro-card,
.empty-module-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
}
.project-intro-card h2,
.empty-module-hero h2{
  margin:5px 0 8px;
  font-size:25px;
  font-weight:600;
}
.project-intro-card p,
.empty-module-hero p{
  max-width:760px;
  margin:0;
  color:var(--muted);
  font-size:12px;
  line-height:1.6;
}
.secondary-project-kpis{
  grid-template-columns:repeat(4,minmax(0,1fr));
  margin-top:15px;
}
.project-value-text{
  min-height:56px;
  display:flex;
  align-items:center;
  margin:8px 0 4px;
  font-size:20px;
  line-height:1.2;
  font-weight:600;
}
.project-checklist{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.project-checklist>div{
  display:flex;
  align-items:flex-start;
  gap:10px;
}
.check-mark{
  display:flex;
  align-items:center;
  justify-content:center;
  width:25px;
  height:25px;
  flex:0 0 auto;
  border-radius:50%;
  background:var(--accent);
  color:#fff;
  font-size:10px;
  font-weight:600;
}
.project-checklist p{
  margin:0;
}
.project-checklist b,
.project-checklist small{
  display:block;
}
.project-checklist b{
  font-size:11px;
  font-weight:600;
}
.project-checklist small{
  margin-top:3px;
  color:var(--muted);
  font-size:10px;
}
.module-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:68px;
  height:68px;
  flex:0 0 auto;
  border-radius:18px;
  background:var(--accent);
  color:#fff;
  font-size:20px;
  font-weight:700;
}
.empty-module-hero{
  justify-content:flex-start;
}
.module-feature-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
}
.module-feature-grid>div{
  padding:12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#f8f5f0;
}
.module-feature-grid b,
.module-feature-grid small{
  display:block;
}
.module-feature-grid b{
  font-size:11px;
  font-weight:600;
}
.module-feature-grid small{
  margin-top:4px;
  color:var(--muted);
  font-size:9px;
  line-height:1.4;
}
.connection-status{
  display:flex;
  align-items:flex-start;
  gap:11px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:13px;
  background:#f8f5f0;
}
.status-dot{
  width:11px;
  height:11px;
  margin-top:3px;
  flex:0 0 auto;
  border-radius:50%;
}
.status-dot.pending{
  background:var(--yellow);
  box-shadow:0 0 0 5px var(--yellow-bg);
}
.connection-status b{
  font-size:11px;
  font-weight:600;
}
.connection-status p{
  margin:5px 0 0;
  color:var(--muted);
  font-size:10px;
  line-height:1.5;
}
body.project-sks-lombard #periodSelect{
  opacity:.5;
  pointer-events:none;
}
body.project-sks-lombard #expertToggle{
  pointer-events:none;
}
body.project-sks-lombard .period-status{
  background:var(--yellow-bg);
  color:var(--yellow);
}
@media(max-width:980px){
  .secondary-project-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:620px){
  .project-intro-card,
  .empty-module-hero{
    align-items:flex-start;
    flex-direction:column;
  }
  .secondary-project-kpis,
  .module-feature-grid{
    grid-template-columns:1fr;
  }
  .active-project-context{
    align-items:flex-start;
    flex-direction:column;
  }
}


.project-meta-card{
  display:grid;
  gap:8px;
  margin:0 0 10px;
  padding:11px 12px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:11px;
  background:rgba(255,255,255,.045);
}
.project-meta-card>div{
  display:grid;
  gap:2px;
}
.project-meta-card small{
  color:rgba(255,255,255,.48);
  font-size:8px;
  text-transform:uppercase;
  letter-spacing:.07em;
}
.project-meta-card b,
.project-meta-card span{
  color:rgba(255,255,255,.88);
  font-size:10px;
  line-height:1.35;
}
.project-meta-card b{
  font-weight:500;
}
.project-module-pills{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:6px;
}
@media(max-width:620px){
  .project-module-pills{
    justify-content:flex-start;
  }
}


.sks-tech-kpis{
  grid-template-columns:repeat(6,minmax(0,1fr));
}
.resource-kpis{
  grid-template-columns:repeat(5,minmax(0,1fr));
}
.sks-tech-checks-card .table-wrap{
  max-height:720px;
}
.sks-top-pages-card .table-wrap{
  max-height:560px;
}
.tech-filter-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
  margin:0 0 12px;
}
.tech-filter-summary>div{
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#f8f5f0;
}
.tech-filter-summary small{
  display:block;
  color:var(--muted);
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.tech-filter-summary b{
  display:block;
  margin-top:4px;
  font-size:18px;
  font-weight:600;
}
.tech-url-cell{
  min-width:340px;
  max-width:650px;
  overflow-wrap:anywhere;
  line-height:1.45;
}
.check-mark.done{
  background:var(--green);
}
@media(max-width:1280px){
  .sks-tech-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:980px){
  .resource-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:720px){
  .tech-filter-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .resource-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:520px){
  .sks-tech-kpis,
  .resource-kpis,
  .tech-filter-summary{grid-template-columns:1fr}
}


.sidebar > .nav{
  margin-top:20px;
}
.sidebar-project-info{
  margin-top:26px;
  padding-top:22px;
  border-top:1px solid rgba(255,255,255,.12);
}
.sidebar-project-info .client-workspace{
  margin-top:0;
}


.action-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.action{
  display:flex;
  align-items:flex-start;
  gap:14px;
  padding:18px 20px;
  border:1px solid var(--line);
  border-radius:22px;
  background:var(--card);
}
.action > .pill{
  flex:0 0 auto;
  margin-top:2px;
}
.action > div{
  flex:1 1 auto;
  min-width:0;
}
.action > div b{
  display:block;
  margin:0 0 6px;
  font-size:19px;
  line-height:1.3;
  font-weight:600;
}
.action > div p{
  margin:0;
  color:var(--muted);
  font-size:12px;
  line-height:1.55;
}
@media(max-width:720px){
  .action{
    flex-direction:column;
    gap:10px;
    padding:16px 18px;
  }
  .action > .pill{
    margin-top:0;
  }
  .action > div b{
    font-size:17px;
  }
}


.tech-comparison-hero{
  margin-top:15px;
}
.tech-snapshot-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 44px minmax(0,1fr);
  align-items:center;
  gap:14px;
}
.tech-snapshot{
  padding:16px;
  border:1px solid var(--line);
  border-radius:15px;
  background:#f8f5f0;
}
.tech-snapshot.current{
  border-color:rgba(18,128,85,.25);
  background:var(--green-bg);
}
.tech-snapshot small{
  display:block;
  color:var(--muted);
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:.07em;
}
.tech-snapshot>b{
  display:block;
  margin:5px 0 13px;
  font-size:21px;
  font-weight:600;
}
.tech-snapshot>div{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:6px 0;
  border-top:1px solid rgba(0,0,0,.07);
  font-size:10px;
}
.tech-snapshot strong{
  font-weight:600;
}
.tech-snapshot-arrow{
  display:flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  border-radius:50%;
  background:var(--ink);
  color:#fff;
  font-size:18px;
}
.scope-warning{
  margin-top:13px;
  padding:12px 14px;
  border-radius:12px;
  background:var(--yellow-bg);
  color:#6d5517;
  font-size:10px;
  line-height:1.55;
}
.scope-warning b{
  font-weight:600;
}
.comparison-kpis{
  grid-template-columns:repeat(6,minmax(0,1fr));
  margin-top:15px;
}
.audit-scope-grid{
  grid-template-columns:repeat(5,minmax(0,1fr));
}
.tech-comparison-table-card .table-wrap{
  max-height:700px;
}
.tech-page-comparison-card .table-wrap{
  max-height:650px;
}
.tech-compare-summary{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:9px;
  margin-bottom:12px;
}
.tech-compare-summary>div{
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#f8f5f0;
}
.tech-compare-summary small{
  display:block;
  color:var(--muted);
  font-size:8px;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.tech-compare-summary b{
  display:block;
  margin-top:4px;
  font-size:17px;
  font-weight:600;
}
.tech-rate{
  white-space:nowrap;
}
.tech-page-url{
  min-width:330px;
  max-width:620px;
  overflow-wrap:anywhere;
  line-height:1.45;
}
@media(max-width:1280px){
  .comparison-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
  .audit-scope-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:840px){
  .tech-snapshot-grid{
    grid-template-columns:1fr;
  }
  .tech-snapshot-arrow{
    transform:rotate(90deg);
    margin:auto;
  }
  .tech-compare-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:620px){
  .comparison-kpis,
  .audit-scope-grid,
  .tech-compare-summary{
    grid-template-columns:1fr;
  }
}


.sks-geo-kpis{
  grid-template-columns:repeat(5,minmax(0,1fr));
}
.sks-geo-prompts-card .table-wrap{
  max-height:720px;
}
.sks-example-compare{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.sks-example-compare>div{
  padding:12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#f8f5f0;
}
.sks-example-compare small{
  display:block;
  margin-bottom:7px;
  color:var(--muted);
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.sks-example-compare p{
  margin:0;
  color:#4f4942;
  font-size:10px;
  line-height:1.55;
}
.pdf-project-report{
  display:none;
}
@media(max-width:1200px){
  .sks-geo-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:720px){
  .sks-geo-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sks-example-compare{grid-template-columns:1fr}
}
@media(max-width:520px){
  .sks-geo-kpis{grid-template-columns:1fr}
  .report-pdf-button{width:100%}
}

@media print{
  @page{
    size:A4 portrait;
    margin:10mm 11mm 12mm;
  }

  *{
    -webkit-print-color-adjust:exact !important;
    print-color-adjust:exact !important;
  }

  html,body{
    width:auto !important;
    min-width:0 !important;
    height:auto !important;
    overflow:visible !important;
    background:#fff !important;
    color:#111 !important;
  }

  body.pdf-report-mode .sidebar,
  body.pdf-report-mode .mobile-nav-overlay,
  body.pdf-report-mode .topbar,
  body.pdf-report-mode main > .section{
    display:none !important;
  }

  body.pdf-report-mode .main{
    width:auto !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 !important;
  }

  body.pdf-report-mode .pdf-project-report{
    display:block !important;
    width:auto !important;
    margin:0 !important;
    padding:0 !important;
    font-family:Arial,Helvetica,sans-serif !important;
    font-size:9pt;
    line-height:1.38;
    color:#111;
  }

  .pdf-report-cover{
    box-sizing:border-box;
    min-height:255mm;
    display:flex;
    flex-direction:column;
    justify-content:center;
    padding:17mm;
    border:1pt solid #d0c7bc;
    border-radius:6mm;
    break-after:page;
    page-break-after:always;
  }
  .pdf-report-brand{
    color:#ff4d2f;
    font-size:9pt;
    letter-spacing:.16em;
    font-weight:700;
  }
  .pdf-report-kicker{
    margin-top:26mm;
    color:#756d64;
    font-size:9pt;
    text-transform:uppercase;
    letter-spacing:.08em;
  }
  .pdf-report-cover h1{
    margin:4mm 0 2mm;
    font-size:29pt;
    line-height:1.05;
  }
  .pdf-report-cover p{
    margin:0;
    color:#5f574f;
    font-size:13pt;
  }
  .pdf-cover-meta{
    display:grid;
    gap:1.7mm;
    margin-top:25mm;
    padding-top:5mm;
    border-top:1pt solid #d0c7bc;
    color:#5f574f;
    font-size:9pt;
  }

  .pdf-page{
    box-sizing:border-box;
    min-height:257mm;
    display:flex;
    flex-direction:column;
    gap:7mm;
    break-after:page;
    page-break-after:always;
  }
  .pdf-page.pdf-last-page{
    break-after:auto;
    page-break-after:auto;
  }

  .pdf-report-section{
    margin:0;
    break-inside:avoid;
    page-break-inside:avoid;
  }
  .pdf-report-section h2{
    margin:0 0 4mm;
    font-size:17pt;
    line-height:1.15;
  }
  .pdf-report-section h3{
    margin:0 0 2.5mm;
    font-size:11pt;
  }
  .pdf-section-heading-row{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:8mm;
  }
  .pdf-section-heading-row>span{
    margin-bottom:4.5mm;
    color:#756d64;
    font-size:8pt;
  }

  .pdf-metrics{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:3mm;
  }
  .pdf-metric{
    box-sizing:border-box;
    min-height:28mm;
    padding:3.3mm;
    border:1pt solid #d0c7bc;
    border-radius:3mm;
    break-inside:avoid;
  }
  .pdf-metric small,.pdf-metric b,.pdf-metric span{display:block}
  .pdf-metric small{
    min-height:7mm;
    color:#756d64;
    font-size:6.8pt;
    line-height:1.12;
    text-transform:uppercase;
    letter-spacing:.035em;
  }
  .pdf-metric b{
    margin:1.4mm 0 .8mm;
    font-size:15pt;
    line-height:1;
  }
  .pdf-metric span{
    color:#5f574f;
    font-size:7pt;
    line-height:1.25;
  }

  .pdf-table{
    box-sizing:border-box;
    width:100%;
    border-collapse:separate !important;
    border-spacing:0 !important;
    border:1pt solid #beb4a8 !important;
    outline:0 !important;
    font-size:8pt;
    break-inside:avoid;
    page-break-inside:avoid;
  }
  .pdf-table thead{display:table-header-group}
  .pdf-table tr{
    break-inside:avoid;
    page-break-inside:avoid;
  }
  .pdf-table th,.pdf-table td{
    padding:2.25mm 2.7mm;
    border:0 !important;
    border-right:.8pt solid #c8beb2 !important;
    border-bottom:.8pt solid #c8beb2 !important;
    text-align:left;
    vertical-align:top;
  }
  .pdf-table tr>*:last-child{border-right:0 !important}
  .pdf-table tbody tr:last-child>*{border-bottom:0 !important}
  .pdf-table th{
    background:#f2eee8 !important;
    color:#3f3933 !important;
    font-weight:700;
  }
  .pdf-table-compact th,.pdf-table-compact td{
    padding:1.8mm 2.4mm;
  }

  .pdf-two-columns{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6mm;
  }
  .pdf-info-panel{
    box-sizing:border-box;
    min-height:48mm;
    padding:4mm;
    border:1pt solid #d0c7bc;
    border-radius:3mm;
    break-inside:avoid;
  }

  .pdf-bullets,.pdf-numbered{
    margin:0;
    padding-left:5.5mm;
  }
  .pdf-bullets li,.pdf-numbered li{
    margin-bottom:1.8mm;
    break-inside:avoid;
  }
  .pdf-bullets-two-columns{
    column-count:2;
    column-gap:9mm;
  }
  .pdf-bullets-two-columns li{
    break-inside:avoid-column;
  }
  .pdf-actions-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    column-gap:10mm;
    row-gap:1.2mm;
    padding-left:6mm;
  }

  .pdf-callout{
    margin-bottom:4mm;
    padding:4mm;
    border-left:3pt solid #ff4d2f;
    background:#fff2ed !important;
    font-size:9.5pt;
    break-inside:avoid;
  }
  .pdf-note{
    margin:3mm 0 0;
    padding:2.7mm 3.5mm;
    background:#f2eee8 !important;
    color:#5f574f;
    font-size:7.8pt;
    break-inside:avoid;
  }
}

#sksGeoCompetitorBody tr.is-client td{background:var(--green-bg)}

/* Единая сетка и безопасные вертикальные интервалы */
.section.geo-page.active,
.section.tech-page.active{
  display:flex;
  flex-direction:column;
  gap:26px;
}

.section.geo-page > *,
.section.tech-page > *{
  margin-top:0 !important;
  margin-bottom:0 !important;
}

.geo-project-hero{
  min-height:126px;
}

.geo-page .kpis,
.tech-page .kpis{
  margin-bottom:0;
}

.geo-page .card,
.tech-page .card{
  position:relative;
  z-index:1;
}

.geo-category-card .table-wrap{
  max-height:430px;
}

.geo-quality-stats{
  grid-template-columns:repeat(6,minmax(0,1fr));
}

.sks-geo-prompts-card .table-wrap{
  max-height:720px;
}

.geo-fact-risk-card .table-wrap{
  max-height:620px;
}

#sksGeoRankBody .prompt-text,
#sksGeoRiskBody .prompt-text{
  min-width:290px;
}

@media(max-width:1280px){
  .geo-quality-stats{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media(max-width:760px){
  .section.geo-page.active,
  .section.tech-page.active{
    gap:20px;
  }

  .geo-quality-stats{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .geo-project-hero{
    min-height:0;
  }
}

@media(max-width:520px){
  .geo-quality-stats{
    grid-template-columns:1fr;
  }
}


/* Клиентская дорожная карта решений */
.decisions-card{
  padding:24px;
  overflow:hidden;
}
.decisions-head{
  align-items:flex-start;
  margin-bottom:8px;
}
.decisions-head h2{
  margin-bottom:5px;
}
.decisions-head p{
  margin:0;
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
}
.decision-roadmap{
  margin-top:18px;
  border:1px solid var(--line);
  border-radius:18px;
  overflow:hidden;
  background:#fff;
}
.decision-row{
  position:relative;
  display:grid;
  grid-template-columns:42px minmax(0,1fr) 126px;
  gap:16px;
  align-items:center;
  min-height:92px;
  padding:17px 18px;
  background:#fff;
}
.decision-row + .decision-row{
  border-top:1px solid var(--line);
}
.decision-row:hover{
  background:#fcfaf7;
}
.decision-marker{
  position:relative;
  align-self:stretch;
  display:flex;
  align-items:center;
  justify-content:center;
}
.decision-marker span{
  position:relative;
  z-index:2;
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border:1px solid #cfc7bd;
  border-radius:50%;
  background:#fff;
  color:#3e3934;
  font-size:13px;
  font-weight:700;
}
.decision-row.completed .decision-marker span,
.decision-row.active .decision-marker span{
  border-color:var(--accent);
  background:var(--accent);
  color:#fff;
}
.decision-copy{
  min-width:0;
}
.decision-copy small{
  display:block;
  margin-bottom:4px;
  color:var(--muted);
  font-size:9px;
  font-weight:600;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.decision-copy h3{
  margin:0 0 5px;
  font-size:15px;
  line-height:1.3;
  font-weight:650;
}
.decision-copy p{
  margin:0;
  max-width:900px;
  color:var(--muted);
  font-size:11px;
  line-height:1.55;
}
.decision-status{
  justify-self:end;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:104px;
  min-height:28px;
  padding:5px 10px;
  border-radius:999px;
  font-size:9px;
  font-weight:650;
  white-space:nowrap;
}
.decision-status.completed,
.decision-status.active{
  background:var(--green-bg);
  color:var(--green);
}
.decision-status.planned,
.decision-status.queued{
  background:var(--yellow-bg);
  color:#936000;
}
.decision-status.next{
  background:#efede9;
  color:#4d4741;
}
@media(max-width:760px){
  .decisions-card{padding:18px}
  .decisions-head{display:block}
  .decisions-head>span{display:block;margin-top:8px}
  .decision-row{
    grid-template-columns:38px minmax(0,1fr);
    gap:12px;
    min-height:0;
    padding:16px;
  }
  .decision-status{
    grid-column:2;
    justify-self:start;
    min-width:0;
    margin-top:2px;
  }
  .decision-copy h3{font-size:14px}
}


.decisions-page.active{
  display:block;
}
.decisions-page .decisions-card{
  width:100%;
}
.decisions-page .decision-roadmap{
  width:100%;
}
.decisions-page .decision-copy h3{
  max-width:900px;
}
@media(max-width:760px){
  .decisions-page .decision-row{
    width:100%;
  }
}


/* Кейс ysz76.ru: GEO-анализ девелопера */
body.project-ysz76 .period-status{
  background:var(--yellow-bg);
  color:var(--yellow);
}
.ysz-overview-kpis{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.ysz-overview-kpis .kpi{min-height:136px}
.ysz-case-callout{
  display:grid;
  grid-template-columns:minmax(0,1.4fr) minmax(280px,.6fr);
  gap:15px;
  margin-top:15px;
}
.ysz-diagnosis{
  border-left:5px solid var(--accent);
}
.ysz-diagnosis h3{
  margin:0 0 8px;
  font-size:21px;
  line-height:1.2;
}
.ysz-diagnosis p{
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.65;
}
.ysz-proof-list{
  display:grid;
  gap:9px;
}
.ysz-proof-item{
  padding:12px 13px;
  border:1px solid var(--line);
  border-radius:13px;
  background:#faf8f4;
}
.ysz-proof-item b{display:block;font-size:12px}
.ysz-proof-item span{display:block;margin-top:4px;color:var(--muted);font-size:11px;line-height:1.45}
.ysz-metric-note{
  margin-top:10px;
  padding:12px 14px;
  border-radius:13px;
  background:#fff7e4;
  color:#73520b;
  font-size:11px;
  line-height:1.55;
}
.ysz-risk-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.ysz-risk-card{
  border:1px solid var(--line);
  border-radius:15px;
  padding:15px;
  background:white;
}
.ysz-risk-card .risk-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
  margin-bottom:8px;
}
.ysz-risk-card h3{margin:0;font-size:14px;line-height:1.3}
.ysz-risk-card p{margin:0;color:var(--muted);font-size:11px;line-height:1.55}
.ysz-example-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.ysz-example-card{
  border:1px solid var(--line);
  border-radius:15px;
  padding:15px;
  background:#fff;
}
.ysz-example-card small{
  color:var(--muted);
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.07em;
}
.ysz-example-card h3{margin:7px 0 8px;font-size:14px}
.ysz-example-card p{margin:0;color:var(--muted);font-size:11px;line-height:1.55}
.ysz-example-card.good{border-top:4px solid var(--green)}
.ysz-example-card.bad{border-top:4px solid var(--red)}
.ysz-product-lesson{
  margin-top:15px;
  border:1px solid #cfd8df;
  background:#f3f7fa;
}
.ysz-product-lesson h3{margin:0 0 10px;font-size:16px}
.ysz-product-lesson-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
}
.ysz-product-lesson-grid>div{
  padding:12px;
  border-radius:12px;
  background:#fff;
  border:1px solid #d9e2e8;
}
.ysz-product-lesson-grid b{display:block;font-size:11px}
.ysz-product-lesson-grid span{display:block;margin-top:5px;color:var(--muted);font-size:10px;line-height:1.45}
.ysz-model-table tr.is-best td{background:#eef8f2}
.ysz-model-table tr.is-risk td{background:#fff7f5}
.ysz-decision-note{
  margin-top:14px;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#f8f5f0;
  color:var(--muted);
  font-size:11px;
  line-height:1.55;
}
@media(max-width:980px){
  .ysz-overview-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ysz-case-callout{grid-template-columns:1fr}
  .ysz-product-lesson-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:620px){
  .ysz-overview-kpis,
  .ysz-risk-grid,
  .ysz-example-grid,
  .ysz-product-lesson-grid{grid-template-columns:1fr}
}


/* v35 — светлая продуктовая тема по мотивам ysz76.ru */
:root{
  --ink:#20201f;
  --paper:#f6f5f1;
  --panel:#ffffff;
  --soft:#efeee9;
  --line:#deddd7;
  --muted:#77756f;
  --accent:#df5a36;
  --accent-dark:#bd4326;
  --green:#47745d;
  --green-bg:#edf4ef;
  --yellow:#9a711d;
  --yellow-bg:#fff6dc;
  --red:#b84f3c;
  --red-bg:#fbebe7;
  --gray-bg:#f0efeb;
  --shadow:0 10px 30px rgba(40,38,32,.055);
  --radius:14px;
}
body{background:var(--paper);color:var(--ink)}
.app{grid-template-columns:270px minmax(0,1fr)}
.sidebar{
  background:#fff;color:var(--ink);border-right:1px solid var(--line);
  padding:25px 20px;box-shadow:none;
}
.logo{
  width:45px;height:45px;border-radius:2px;background:var(--accent);
  font-size:14px;letter-spacing:.06em;
}
.brand-name{color:var(--ink);font-size:19px}
.brand-note{color:#97948d}
.nav{padding-top:4px;border-top:1px solid var(--line)}
.nav button{
  color:#716f69;padding:13px 12px;border-radius:7px;border-bottom:1px solid transparent;
}
.nav button:hover{background:#f7f4ee;color:var(--ink)}
.nav button.active{background:#f2eee7;color:var(--ink)}
.nav button.active::before{background:var(--accent);border-radius:0;width:3px;height:16px;vertical-align:-3px}
.sidebar-foot{color:#8f8c84;border-top:1px solid var(--line);padding-top:16px}
.sidebar-project-info{border-top:1px solid var(--line);padding-top:18px}
.client-workspace{background:#f7f5f0;border-color:var(--line)}
.client-workspace small,.project-switcher-label{color:#88857f}
.client-workspace b{color:var(--ink)}
.project-switcher{
  width:100%;background:#fff;color:var(--ink);border:1px solid var(--line);
  border-radius:7px;padding:11px 10px;
}
.workspace-switchers{display:grid;gap:7px}
.workspace-switchers .project-switcher-label:not(:first-child){margin-top:8px}
.switcher-hint{font-size:10px;color:var(--muted);padding:0 2px}
.project-meta-card{background:#fff;border-color:var(--line);border-radius:10px}
.project-meta-card small{color:#929089}
.project-tag{border-color:var(--line);color:#77736c;background:#faf9f6;border-radius:6px}
.main{padding:30px 36px 65px}
.topbar{background:#fff;border:1px solid var(--line);border-radius:12px;padding:22px 24px;margin-bottom:20px}
.eyebrow{color:var(--accent)}
h1{font-size:36px;font-weight:700;letter-spacing:-.035em}
.subtitle{font-size:13px}
.active-project-context{background:#f7f5f0;border-color:var(--line)}
.control{border-radius:7px;background:#fff}
.btn{border-radius:7px}
.btn.dark{background:#252522}
.btn.primary{background:var(--accent)}
.card,.answer-card{
  box-shadow:var(--shadow);border-color:var(--line);border-radius:var(--radius)
}
.kpi{min-height:140px}
.kpi .value{font-weight:700}
.kpi.accent,.kpi.good,.kpi.warn,.kpi.bad{border-top-width:3px}
th{background:#f0eee8;color:#3b3a36;border-bottom:1px solid var(--line)}
td{border-bottom-color:#eceae4}
tr:hover td{background:#faf8f3}
.table-wrap{border-radius:10px}
.pill{border-radius:3px;letter-spacing:.02em}
.answer-text{background:#f7f5f0}
.action,.insight,.mini-stat{border-radius:10px}
.action-num{border-radius:2px}
.mobile-menu-button{background:#fff!important;border:1px solid var(--line)!important}
.mobile-menu-button span{background:var(--ink)!important}
@media(max-width:1024px){
  .sidebar{box-shadow:20px 0 50px rgba(40,38,32,.15)}
  .main{padding:16px 13px 45px}
  .topbar{padding:18px 70px 18px 18px}
}

/* Наглядная группировка промтов */
.ysz-group-visuals{
  display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-top:15px
}
.ysz-group-visual{
  background:#fff;border:1px solid var(--line);border-radius:12px;padding:15px;
  box-shadow:var(--shadow)
}
.ysz-group-top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.ysz-group-top span{font-size:11px;line-height:1.35;color:var(--muted);font-weight:700}
.ysz-group-top b{font-size:21px;letter-spacing:-.04em}
.ysz-progress{height:5px;background:#ebe9e3;margin:14px 0 9px;overflow:hidden}
.ysz-progress i{display:block;height:100%;min-width:2px;background:var(--accent)}
.ysz-group-visual.brand .ysz-progress i{background:var(--green)}
.ysz-group-visual.critical .ysz-progress i{background:var(--red)}
.ysz-group-visual small{color:var(--muted);font-size:10px;line-height:1.4}

.ysz-prompts-head{align-items:flex-start}
.ysz-prompts-head p{margin:6px 0 0;color:var(--muted);font-size:12px}
.ysz-prompt-counter{
  display:inline-flex;background:#252522;color:#fff;padding:8px 10px;border-radius:4px;
  font-weight:700;white-space:nowrap
}
.ysz-prompt-toolbar{
  display:grid;grid-template-columns:minmax(240px,1.4fr) repeat(3,minmax(160px,.65fr));
  gap:9px;margin:16px 0 11px
}
.ysz-prompt-search{width:100%}
.ysz-prompt-legend{
  display:flex;gap:16px;align-items:center;flex-wrap:wrap;padding:10px 12px;
  background:#f7f5f0;border:1px solid var(--line);border-radius:8px;margin-bottom:10px;
  font-size:10px;color:var(--muted)
}
.ysz-prompt-legend span{display:inline-flex;align-items:center;gap:6px}
.legend-note{margin-left:auto}
.mention-dot{
  width:15px;height:15px;display:inline-grid;place-items:center;border-radius:50%;
  border:1px solid #d6d3cb;background:#f2f0ea
}
.mention-dot.yes{background:var(--green);border-color:var(--green)}
.mention-dot.yes::after{content:"✓";color:#fff;font-size:9px;font-weight:900}
.mention-dot.no::after{content:"—";color:#aaa69d;font-size:9px}
.mention-dot.warning{background:#f0b743;border-color:#f0b743}
.mention-dot.warning::after{content:"!";color:#fff;font-size:9px;font-weight:900}
.ysz-prompt-table{min-width:1100px}
.ysz-prompt-table th:nth-child(n+4):nth-child(-n+10),
.ysz-prompt-table td:nth-child(n+4):nth-child(-n+10){text-align:center;width:46px}
.ysz-prompt-table td:nth-child(1){color:#a09c94;width:38px}
.ysz-prompt-copy{min-width:390px;line-height:1.45}
.ysz-prompt-copy b{font-size:12px;font-weight:700}
.ysz-prompt-copy small{display:block;color:var(--red);margin-top:5px;line-height:1.35}
.ysz-group-chip{
  display:inline-flex;padding:5px 7px;background:#f1efe9;color:#6f6c65;border-radius:3px;
  font-size:9px;font-weight:800;white-space:nowrap
}
.ysz-group-chip.brand{background:var(--green-bg);color:var(--green)}
.ysz-result-cell{min-width:155px}
.ysz-result-cell b{display:block;font-size:11px}
.ysz-result-cell small{display:block;color:var(--muted);margin-top:4px;line-height:1.3}
.ysz-prompt-row.zero td:first-child{border-left:3px solid #dedbd3}
.ysz-prompt-row.hit td:first-child{border-left:3px solid var(--green)}
.ysz-prompt-row.warning td:first-child{border-left:3px solid #f0b743}
.ysz-prompt-row.brand-row td{background:#fbfaf6}
.ysz-prompt-row.brand-row:hover td{background:#f7f4ed}
.ysz-prompt-pagination{
  display:flex;justify-content:space-between;align-items:center;margin-top:11px;
  color:var(--muted);font-size:11px
}
.ysz-prompt-pagination .page-buttons{align-items:center}
.ysz-prompt-pagination .page-buttons span{min-width:48px;text-align:center;color:var(--ink)}
.ysz-prompt-pagination button{border-radius:4px}
.ysz-empty-row td{text-align:center;padding:30px;color:var(--muted)}

@media(max-width:1220px){
  .ysz-group-visuals{grid-template-columns:repeat(3,minmax(0,1fr))}
  .ysz-prompt-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:700px){
  .ysz-group-visuals,.ysz-prompt-toolbar{grid-template-columns:1fr}
  .legend-note{margin-left:0;width:100%}
  .ysz-prompts-head{display:block}
  .ysz-prompt-counter{margin-top:10px}
}



/* v36 — единый шаблон GEO-страниц и примеров для всех проектов */
.geo-examples-card{margin-top:15px}
.geo-example-toolbar{margin-bottom:14px}
.answer-card .answer-full{
  max-height:420px;
  overflow:auto;
  padding:14px;
  border-radius:14px;
  background:#f8f5f0;
  color:#4f4942;
  font-size:11px;
  line-height:1.62;
  white-space:normal;
}
.answer-card .answer-full mark{background:#ffd1c6;color:#7c200e;padding:1px 3px;border-radius:3px}
#ysz-geo > .card,
#ysz-geo > .grid{margin-top:15px}
#ysz-geo .geo-prompts-card .table-wrap{max-height:720px}
#ysz-geo .ysz-prompt-toolbar{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
#ysz-geo .ysz-prompt-toolbar .control{min-height:38px}
#ysz-geo .ysz-prompt-search{flex:1 1 280px}
#ysz-geo .ysz-prompt-counter{white-space:nowrap}
.ysz-platform-table td:nth-child(2),
.ysz-platform-table td:nth-child(3),
.ysz-platform-table td:nth-child(4){text-align:center}
.ysz-signal-list{display:grid;gap:10px}
.ysz-signal-list .insight{margin:0}
.ysz-project-link-table td:nth-child(2),
.ysz-project-link-table td:nth-child(3){text-align:center}
@media(max-width:720px){
  #ysz-geo .ysz-prompt-toolbar{display:grid;grid-template-columns:1fr}
  #ysz-geo .ysz-prompt-toolbar .control{width:100%}
}



/* v37: deterministic startup state and visible diagnostics */
.sc-boot{
  position:fixed;
  inset:0;
  z-index:10000;
  display:grid;
  place-items:center;
  padding:24px;
  background:#f5f2ec;
}
.sc-boot[hidden]{display:none!important}
.sc-boot__card{
  display:flex;
  align-items:flex-start;
  gap:18px;
  width:min(560px,100%);
  box-sizing:border-box;
  padding:28px;
  background:#fff;
  border:1px solid #ded8ce;
  box-shadow:0 18px 60px rgba(36,31,27,.08);
}
.sc-boot__spinner{
  flex:0 0 30px;
  width:30px;
  height:30px;
  border:3px solid #e5ded4;
  border-top-color:#a95f45;
  border-radius:50%;
  animation:scBootSpin .8s linear infinite;
}
.sc-boot__content{min-width:0}
.sc-boot__content strong{display:block;font-size:20px;line-height:1.25;color:#26231f}
.sc-boot__content p{margin:8px 0 14px;color:#716a61;line-height:1.55}
.sc-boot__content small{display:block;color:#9a9187;line-height:1.4;word-break:break-word}
.sc-boot__actions{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}
.sc-boot__actions button,.sc-boot__actions a{
  appearance:none;
  box-sizing:border-box;
  padding:11px 15px;
  border:1px solid #a95f45;
  background:#a95f45;
  color:#fff;
  font:inherit;
  font-weight:700;
  text-decoration:none;
  cursor:pointer;
}
.sc-boot__actions a{background:#fff;color:#a95f45}
.sc-boot--error .sc-boot__spinner{border-color:#ead5cf;border-top-color:#a33b2c;animation:none}
@keyframes scBootSpin{to{transform:rotate(360deg)}}
@media(max-width:640px){.sc-boot{padding:14px}.sc-boot__card{padding:20px}.sc-boot__content strong{font-size:18px}}
