/* ===== FC_METALMARK_REWRITE_V1 ===== */

:root{
  --fc-surface:#ffffff;
  --fc-surface-2:#f8fbff;
  --fc-bg:#f3f6fa;
  --fc-line:#d9e2ec;
  --fc-line-strong:#c7d4e3;
  --fc-text:#122b46;
  --fc-muted:#5f738a;
  --fc-blue:#1f6feb;
  --fc-blue-2:#0f7cff;
  --fc-radius-xl:24px;
  --fc-radius-lg:20px;
  --fc-radius-md:14px;
  --fc-shadow:0 10px 30px rgba(15,42,68,.06);
}

.app-shell,
.app-shell *{
  box-sizing:border-box;
}

.app-shell{
  max-width:1680px;
  margin:0 auto;
  padding:24px 24px 56px;
  color:var(--fc-text);
}

.app-shell :where(h1,h2,h3,h4){
  margin:0;
  color:#0d2340;
  font-weight:800;
  line-height:1.15;
}

.app-shell h1{ font-size:clamp(30px, 3vw, 46px); }
.app-shell h2{ font-size:clamp(22px, 2vw, 30px); }
.app-shell h3{ font-size:clamp(18px, 1.4vw, 22px); }

.app-shell p,
.app-shell li,
.app-shell label,
.app-shell input,
.app-shell select,
.app-shell textarea,
.app-shell button{
  font-size:16px;
  line-height:1.45;
}

.app-shell .muted{
  color:var(--fc-muted);
}

.app-shell .compare-tray:empty{
  display:none;
}

.app-shell .breadcrumbs{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin:0 0 18px;
  padding:0 4px;
  color:var(--fc-muted);
  font-size:14px;
}

.app-shell .breadcrumbs a{
  color:#2d5d93;
  text-decoration:none;
}

.app-shell .sep{
  opacity:.55;
}

.app-shell .main-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:24px;
  align-items:start;
}

.app-shell .main-grid.has-sidebar{
  grid-template-columns:320px minmax(0,1fr);
}

.app-shell .side-col,
.app-shell .content-col{
  min-width:0;
}

.app-shell .side-col .panel{
  position:sticky;
  top:100px;
}

.app-shell .hero-card,
.app-shell .panel,
.app-shell .desktop-score-card,
.app-shell .subcard,
.app-shell .warning-box,
.app-shell .empty-note,
.app-shell .compare-root-output{
  background:var(--fc-surface);
  border:1px solid var(--fc-line);
  border-radius:var(--fc-radius-xl);
  box-shadow:var(--fc-shadow);
}

.app-shell .hero-card{
  padding:28px;
  margin-bottom:24px;
}

.app-shell .hero-top{
  display:grid;
  grid-template-columns:minmax(0,1fr) 220px;
  gap:24px;
  align-items:start;
}

.app-shell .hero-side{
  min-height:40px;
}

.app-shell .hero-kicker,
.app-shell .catalog-kicker,
.app-shell .card-kicker{
  font-size:12px;
  line-height:1.2;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--fc-blue);
}

.app-shell .hero-lead{
  margin:10px 0 0;
  color:var(--fc-muted);
  max-width:1100px;
}

.app-shell .hero-actions,
.app-shell .card-actions,
.app-shell .link-row{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:18px;
}

.app-shell .badge-row,
.app-shell .selection-strip{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
}

.app-shell .badge,
.app-shell .filter-chip-static,
.app-shell .score-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid var(--fc-line);
  background:var(--fc-surface-2);
  color:#41556c;
  font-size:13px;
  line-height:1.2;
  font-weight:600;
}

.app-shell .badge-brand{
  background:#eef5ff;
  border-color:#cfe1ff;
  color:var(--fc-blue);
}

.app-shell .btn,
.app-shell a.btn,
.app-shell button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:42px;
  padding:0 16px;
  border-radius:12px;
  border:1px solid var(--fc-line-strong);
  background:#ffffff;
  color:#163250;
  text-decoration:none;
  font-weight:700;
  cursor:pointer;
  transition:.18s ease;
}

.app-shell .btn:hover,
.app-shell a.btn:hover,
.app-shell button:hover{
  transform:translateY(-1px);
  border-color:#a9bdd4;
  box-shadow:0 8px 20px rgba(15,42,68,.08);
}

.app-shell .btn-primary,
.app-shell .btn.btn-primary{
  background:var(--fc-blue-2);
  border-color:var(--fc-blue-2);
  color:#fff;
}

.app-shell .btn-light,
.app-shell .btn-secondary{
  background:#fff;
  color:#163250;
}

.app-shell .btn-sm{
  min-height:38px;
  padding:0 14px;
  font-size:14px;
}

.app-shell input:not([type="checkbox"]):not([type="radio"]),
.app-shell select,
.app-shell textarea{
  width:100%;
  min-height:48px;
  border-radius:12px;
  border:1px solid var(--fc-line);
  background:#fff;
  color:var(--fc-text);
  padding:10px 14px;
  outline:none;
}

.app-shell input:not([type="checkbox"]):not([type="radio"]):focus,
.app-shell select:focus,
.app-shell textarea:focus{
  border-color:#8db7ef;
  box-shadow:0 0 0 4px rgba(31,111,235,.10);
}

.app-shell input[type="checkbox"],
.app-shell input[type="radio"]{
  width:16px;
  height:16px;
  min-width:16px;
  min-height:16px;
}

.app-shell .catalog-toolbar-panel .panel-body{
  padding:22px 24px 24px;
}

.app-shell .panel-head{
  padding:20px 24px 0;
}

.app-shell .panel-body{
  padding:20px 24px 24px;
}

.app-shell .compact-panel{
  padding:18px 20px 20px;
}

.app-shell .catalog-screen-title{
  display:grid;
  gap:8px;
}

.app-shell .catalog-screen-title p{
  margin:0;
}

.app-shell .filter-form,
.app-shell .catalog-toolbar,
.app-shell .selection-controls{
  display:grid;
  gap:16px;
}

.app-shell .search-row{
  display:block;
}

.app-shell .catalog-search{
  min-height:56px !important;
  font-size:18px;
}

.app-shell .filter-row{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:16px;
}

.app-shell .check-line{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
}

.app-shell .inline-check{
  display:inline-flex;
  align-items:center;
  gap:10px;
  white-space:nowrap;
}

.app-shell .desktop-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:16px;
}

.app-shell .tab{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:0 18px;
  border-radius:999px;
  border:1px solid var(--fc-line);
  background:#fff;
  color:#183352;
  font-weight:700;
  cursor:pointer;
}

.app-shell .tab.is-active{
  background:#eef5ff;
  border-color:#cfe1ff;
  color:var(--fc-blue);
}

.app-shell .tab-panel{
  display:none;
}

.app-shell .tab-panel.is-active{
  display:block;
}

.app-shell .desktop-summary-grid{
  display:grid;
  grid-template-columns:340px minmax(0,1fr);
  gap:16px;
  align-items:start;
}

.app-shell .desktop-side-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.app-shell .desktop-score-card{
  padding:24px;
}

.app-shell .desktop-score-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:18px;
}

.app-shell .hero-stat{
  display:grid;
  justify-items:end;
  gap:6px;
  min-width:120px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid var(--fc-line);
  background:var(--fc-surface-2);
}

.app-shell .desktop-score-main{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:18px;
}

.app-shell .quality-a{
  background:#ebfff2;
  border-color:#bfe6cc;
  color:#1a7a42;
}

.app-shell .quality-b{
  background:#fff8e8;
  border-color:#ecd8a4;
  color:#946300;
}

.app-shell .quality-c{
  background:#fff0f0;
  border-color:#efc3c3;
  color:#ad3c3c;
}

.app-shell .metric-stack{
  display:grid;
  gap:14px;
}

.app-shell .metric-row{
  display:grid;
  grid-template-columns:56px minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
}

.app-shell .metric-label{
  font-weight:700;
  color:#29486a;
}

.app-shell .metric-bar{
  position:relative;
  height:10px;
  background:#eef3f8;
  border-radius:999px;
  overflow:hidden;
}

.app-shell .metric-bar > span{
  position:absolute;
  inset:0 auto 0 0;
  background:linear-gradient(90deg,#6bb2ff 0%, #1f6feb 100%);
  border-radius:999px;
}

.app-shell .metric-value{
  font-weight:700;
  color:#17324f;
  white-space:nowrap;
}

.app-shell .dual-bar{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.app-shell .dual-label{
  margin:0 0 8px;
  font-size:13px;
  color:#60748a;
  font-weight:700;
}

.app-shell .cards-2{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.app-shell .subcard,
.app-shell .warning-box{
  padding:18px 20px;
}

.app-shell .material-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:16px;
}

.app-shell .material-grid.compact-grid{
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
}

.app-shell .material-card{
  display:flex;
  flex-direction:column;
  gap:14px;
  min-width:0;
  padding:20px;
  border-radius:20px;
  border:1px solid var(--fc-line);
  background:#fff;
  box-shadow:0 8px 24px rgba(15,42,68,.05);
}

.app-shell .material-card.compact{
  padding:18px;
}

.app-shell .material-card h3{
  font-size:18px;
  line-height:1.25;
}

.app-shell .material-card h3 a{
  color:#1b57d8;
  text-decoration:none;
}

.app-shell .material-card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}

.app-shell .quality-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  border-radius:50%;
  border:1px solid #cfe1ff;
  background:#f8fbff;
  color:#17324f;
  font-weight:800;
  flex:0 0 auto;
}

.app-shell .card-summary{
  margin:0;
  color:var(--fc-muted);
}

.app-shell .card-metrics{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.app-shell .card-metrics > div{
  display:grid;
  gap:4px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid #e5edf6;
  background:#f8fbff;
}

.app-shell .card-metrics span{
  font-size:12px;
  color:#6f8296;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.app-shell .card-metrics strong{
  font-size:15px;
  color:#17324f;
}

.app-shell .table-wrap{
  overflow:auto;
  border:1px solid #e5edf6;
  border-radius:18px;
  background:#fff;
}

.app-shell .data-table,
.app-shell .raw-table{
  width:100%;
  min-width:640px;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
  background:#fff;
}

.app-shell .data-table th,
.app-shell .data-table td,
.app-shell .raw-table th,
.app-shell .raw-table td{
  padding:14px 16px;
  border-bottom:1px solid #e8eef5;
  text-align:left;
  vertical-align:top;
  word-break:break-word;
  overflow-wrap:anywhere;
}

.app-shell .data-table th,
.app-shell .raw-table th{
  background:#f8fbff;
  color:#17324f;
  font-weight:800;
}

.app-shell .empty-note{
  padding:18px 20px;
  border-style:dashed;
  background:#f8fbff;
  color:#667b92;
}

.app-shell .notes-compact,
.app-shell .bullet-list{
  display:grid;
  gap:12px;
  padding-left:18px;
}

.app-shell .notes-compact li,
.app-shell .bullet-list li{
  margin:0;
}

.app-shell .page-compare .compare-form,
.app-shell .compare-form{
  display:grid;
  gap:14px;
}

.app-shell .compare-form label{
  display:grid;
  gap:8px;
  font-weight:600;
  color:#29486a;
}

.app-shell .page-compare .hero-actions{
  margin-top:16px;
}

.app-shell .page-compare .main-grid.has-sidebar{
  grid-template-columns:320px minmax(0,1fr);
}

.app-shell .page-analogs .cards-2,
.app-shell .page-gost .cards-2{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

@media (max-width: 1240px){
  .app-shell .desktop-summary-grid{
    grid-template-columns:1fr;
  }

  .app-shell .desktop-side-grid{
    grid-template-columns:1fr;
  }

  .app-shell .hero-top{
    grid-template-columns:1fr;
  }

  .app-shell .main-grid.has-sidebar{
    grid-template-columns:1fr;
  }

  .app-shell .side-col .panel{
    position:static;
  }
}

@media (max-width: 900px){
  .app-shell{
    padding:16px 12px 40px;
  }

  .app-shell .panel-head,
  .app-shell .panel-body,
  .app-shell .catalog-toolbar-panel .panel-body,
  .app-shell .hero-card,
  .app-shell .desktop-score-card,
  .app-shell .subcard,
  .app-shell .warning-box{
    padding-left:16px;
    padding-right:16px;
  }

  .app-shell .cards-2,
  .app-shell .dual-bar{
    grid-template-columns:1fr;
  }

  .app-shell .material-grid,
  .app-shell .material-grid.compact-grid{
    grid-template-columns:1fr;
  }

  .app-shell .card-metrics{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width: 680px){
  .app-shell .card-metrics,
  .app-shell .filter-row{
    grid-template-columns:1fr;
  }

  .app-shell .hero-actions,
  .app-shell .card-actions,
  .app-shell .link-row{
    flex-direction:column;
    align-items:stretch;
  }

  .app-shell .btn,
  .app-shell a.btn,
  .app-shell button{
    width:100%;
  }
}
/* ===== /FC_METALMARK_REWRITE_V1 ===== */

/* ===== FC_COMPARE_NATIVE_LAYOUT_START ===== */

body.page-compare-root .app-shell{
  max-width: 1680px;
  margin: 0 auto;
  padding: 24px 24px 56px;
  box-sizing: border-box;
}

body.page-compare-root .compare-tray:empty{
  display:none;
}

body.page-compare-root .breadcrumbs{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin:0 0 18px;
  color:#5f738a;
  font-size:14px;
}

body.page-compare-root .breadcrumbs a{
  color:#2d5d93;
  text-decoration:none;
}

body.page-compare-root .main-grid.has-sidebar{
  display:grid;
  grid-template-columns:320px minmax(0,1fr);
  gap:20px;
  align-items:start;
}

body.page-compare-root .side-col,
body.page-compare-root .content-col{
  min-width:0;
}

body.page-compare-root .side-col .panel{
  position:sticky;
  top:96px;
}

body.page-compare-root .panel{
  background:#ffffff;
  border:1px solid #d9e2ec;
  border-radius:22px;
  box-shadow:0 10px 30px rgba(15,42,68,.06);
  overflow:hidden;
}

body.page-compare-root .panel-head{
  padding:20px 24px 0;
}

body.page-compare-root .panel-body{
  padding:18px 24px 24px;
}

body.page-compare-root .compact-panel{
  padding:18px 24px 24px;
}

body.page-compare-root .catalog-toolbar-panel .panel-body{
  padding:24px;
}

body.page-compare-root .catalog-kicker{
  font-size:12px;
  line-height:1.2;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:#1f6feb;
}

body.page-compare-root h1,
body.page-compare-root h2,
body.page-compare-root h3{
  margin:0;
  color:#0d2340;
  font-weight:800;
  line-height:1.15;
}

body.page-compare-root h1{ font-size:clamp(30px, 3vw, 42px); }
body.page-compare-root h2{ font-size:clamp(22px, 2vw, 28px); }
body.page-compare-root h3{ font-size:18px; }

body.page-compare-root .muted{
  color:#5f738a;
}

body.page-compare-root .compare-form{
  display:grid;
  gap:14px;
}

body.page-compare-root .compare-form label{
  display:grid;
  gap:8px;
  color:#29486a;
  font-weight:700;
}

body.page-compare-root .compare-form input[type="search"]{
  width:100%;
  min-height:44px;
  border-radius:12px;
  border:1px solid #d9e2ec;
  background:#ffffff;
  padding:10px 12px;
  font-size:15px;
  line-height:1.4;
  outline:none;
}

body.page-compare-root .compare-form input[type="search"]:focus{
  border-color:#8db7ef;
  box-shadow:0 0 0 4px rgba(31,111,235,.10);
}

body.page-compare-root .hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:4px;
}

body.page-compare-root .btn,
body.page-compare-root button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:40px;
  padding:0 14px;
  border-radius:12px;
  border:1px solid #c7d4e3;
  background:#ffffff;
  color:#163250;
  font-weight:700;
  cursor:pointer;
}

body.page-compare-root .btn-primary{
  background:#0f7cff;
  border-color:#0f7cff;
  color:#ffffff;
}

body.page-compare-root .btn-light{
  background:#ffffff;
  color:#163250;
}

body.page-compare-root .compare-root-output{
  min-height:72px;
}

body.page-compare-root .empty-note{
  padding:16px 18px;
  border:1px dashed #d9e2ec;
  border-radius:16px;
  background:#f8fbff;
  color:#667b92;
}

body.page-compare-root .material-grid.compact-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:16px;
}

body.page-compare-root .material-card.compact{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-width:0;
  padding:18px;
  border-radius:18px;
  border:1px solid #d9e2ec;
  background:#ffffff;
  box-shadow:0 8px 24px rgba(15,42,68,.05);
}

body.page-compare-root .material-card.compact h3 a{
  color:#1b57d8;
  text-decoration:none;
}

body.page-compare-root .material-card.compact p{
  margin:0;
}

body.page-compare-root table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
  background:#ffffff;
  border:1px solid #d9e2ec;
  border-radius:18px;
  overflow:hidden;
}

body.page-compare-root table th,
body.page-compare-root table td{
  padding:14px 16px;
  border-bottom:1px solid #e8eef5;
  text-align:left;
  vertical-align:top;
  word-break:break-word;
  overflow-wrap:anywhere;
  background:#ffffff;
}

body.page-compare-root table th{
  background:#f8fbff;
  color:#17324f;
  font-weight:800;
}

@media (max-width: 1240px){
  body.page-compare-root .main-grid.has-sidebar{
    grid-template-columns:1fr;
  }

  body.page-compare-root .side-col .panel{
    position:static;
  }
}

@media (max-width: 900px){
  body.page-compare-root .app-shell{
    padding:16px 12px 40px;
  }

  body.page-compare-root .panel-head,
  body.page-compare-root .panel-body,
  body.page-compare-root .compact-panel,
  body.page-compare-root .catalog-toolbar-panel .panel-body{
    padding-left:16px;
    padding-right:16px;
  }

  body.page-compare-root .material-grid.compact-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 680px){
  body.page-compare-root .hero-actions{
    flex-direction:column;
    align-items:stretch;
  }

  body.page-compare-root .btn,
  body.page-compare-root button{
    width:100%;
  }
}

/* ===== FC_COMPARE_NATIVE_LAYOUT_END ===== */

/* ===== FC_COMPARE_MATRIX_SAFE_START ===== */

body.page-compare-root .compare-tray-inner{
  display:none !important;
}

body.page-compare-root .compare-matrix-wrap{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  border:1px solid #d9e2ec;
  border-radius:18px;
  background:#ffffff;
}

body.page-compare-root .compare-matrix-table{
  width:100%;
  min-width:860px;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
  background:#ffffff;
}

body.page-compare-root .compare-matrix-table th,
body.page-compare-root .compare-matrix-table td{
  padding:14px 16px;
  border-bottom:1px solid #e8eef5;
  text-align:left;
  vertical-align:top;
  word-break:break-word;
  overflow-wrap:anywhere;
  background:#ffffff;
}

body.page-compare-root .compare-matrix-table thead th{
  background:#f8fbff;
  color:#17324f;
  font-weight:800;
}

body.page-compare-root .compare-matrix-table th:first-child,
body.page-compare-root .compare-matrix-table td:first-child{
  width:280px;
  min-width:280px;
  font-weight:700;
  color:#29486a;
}

body.page-compare-root .compare-matrix-table .is-empty{
  color:#8a9bae;
}

@media (max-width: 900px){
  body.page-compare-root .compare-matrix-table{
    min-width:720px;
  }

  body.page-compare-root .compare-matrix-table th:first-child,
  body.page-compare-root .compare-matrix-table td:first-child{
    width:220px;
    min-width:220px;
  }
}

/* ===== FC_COMPARE_MATRIX_SAFE_END ===== */

/* ===== FC_COMPARE_ADD_MORE_START ===== */

body.page-compare-root .compare-form .compare-extra-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:4px;
}

body.page-compare-root .compare-form .compare-input-row{
  display:grid;
  gap:8px;
}

body.page-compare-root .compare-form .compare-input-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

body.page-compare-root .compare-form .compare-remove-btn{
  min-height:32px;
  padding:0 10px;
  border-radius:10px;
  font-size:13px;
  line-height:1.2;
}

body.page-compare-root .compare-form .compare-add-btn{
  min-height:38px;
  padding:0 14px;
  border-radius:10px;
}

body.page-compare-root .compare-matrix-table thead th:not(:first-child){
  text-align:left;
}

/* ===== FC_COMPARE_ADD_MORE_END ===== */

/* ===== FC_COMPARE_ONEBLOCK_START ===== */
body.page-compare-root .compare-section-row td{
  background:#f8fbff !important;
  color:#17324f !important;
  font-weight:800 !important;
  border-top:1px solid #d9e2ec !important;
}

body.page-compare-root .compare-section-row td:not(:first-child){
  color:transparent !important;
}

body.page-compare-root .compare-section-row:first-child td{
  border-top:none !important;
}
/* ===== FC_COMPARE_ONEBLOCK_END ===== */

/* ===== FC_MATERIAL_CARDS_CLEANUP_START ===== */

/* Убираем очередь сравнения на всех material pages */
body:not(.page-compare-root) .compare-tray,
body:not(.page-compare-root) .compare-tray-inner{
  display:none !important;
}

/* Карточки материалов: таблицы без бессмысленного горизонтального скролла */
body .page-material-root .table-wrap,
body .page-material-root .raw-table-wrap,
body .page-material-root .data-table-wrap,
body [data-page="material"] .table-wrap,
body [data-page="material"] .raw-table-wrap,
body [data-page="material"] .data-table-wrap{
  overflow-x: visible !important;
}

/* Если таблицы лежат прямо в panel/subcard */
body .page-material-root table,
body [data-page="material"] table{
  width:100% !important;
  table-layout:fixed !important;
  border-collapse:separate !important;
  border-spacing:0 !important;
}

body .page-material-root table th,
body .page-material-root table td,
body [data-page="material"] table th,
body [data-page="material"] table td{
  vertical-align:top !important;
  white-space:normal !important;
  word-break:break-word !important;
  overflow-wrap:anywhere !important;
}

/* Первая колонка уже, вторая шире */
body .page-material-root table th:first-child,
body .page-material-root table td:first-child,
body [data-page="material"] table th:first-child,
body [data-page="material"] table td:first-child{
  width:34% !important;
  min-width:220px !important;
}

body .page-material-root table th:nth-child(2),
body .page-material-root table td:nth-child(2),
body [data-page="material"] table th:nth-child(2),
body [data-page="material"] table td:nth-child(2){
  width:66% !important;
}

/* Текст значения визуально ближе и компактнее */
body .page-material-root table td:nth-child(2),
body [data-page="material"] table td:nth-child(2){
  text-align:left !important;
  padding-left:14px !important;
  padding-right:14px !important;
  line-height:1.5 !important;
}

/* Шапка таблицы */
body .page-material-root table th,
body [data-page="material"] table th{
  font-weight:800 !important;
}

/* На узких экранах ещё больше отдаём ширину колонке значения */
@media (max-width: 1200px){
  body .page-material-root table th:first-child,
  body .page-material-root table td:first-child,
  body [data-page="material"] table th:first-child,
  body [data-page="material"] table td:first-child{
    width:30% !important;
    min-width:160px !important;
  }

  body .page-material-root table th:nth-child(2),
  body .page-material-root table td:nth-child(2),
  body [data-page="material"] table th:nth-child(2),
  body [data-page="material"] table td:nth-child(2){
    width:70% !important;
  }
}

/* На совсем узких экранах — не ломаем, разрешаем скролл как fallback */
@media (max-width: 760px){
  body .page-material-root .table-wrap,
  body .page-material-root .raw-table-wrap,
  body .page-material-root .data-table-wrap,
  body [data-page="material"] .table-wrap,
  body [data-page="material"] .raw-table-wrap,
  body [data-page="material"] .data-table-wrap{
    overflow-x:auto !important;
  }

  body .page-material-root table,
  body [data-page="material"] table{
    min-width:640px !important;
  }
}

/* ===== FC_MATERIAL_CARDS_CLEANUP_END ===== */

/* ===== FC_SUMMARY_SIGNS_TABLES_FIX_START ===== */

/* Общая сетка блока карточки */
body .desktop-summary-grid{
  display:grid !important;
  grid-template-columns: 340px minmax(0, 1fr) !important;
  gap:16px !important;
  align-items:start !important;
}

body .desktop-side-grid{
  display:grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap:16px !important;
  min-width:0 !important;
}

body .desktop-side-grid > .panel{
  min-width:0 !important;
  overflow:hidden !important;
}

/* Панель справа */
body .desktop-side-grid .panel-head{
  padding:20px 24px 0 !important;
}

body .desktop-side-grid .panel-body{
  padding:18px 24px 24px !important;
  min-width:0 !important;
}

/* Обёртка таблицы */
body .desktop-side-grid .table-wrap{
  width:100% !important;
  min-width:0 !important;
  overflow-x:visible !important;
  border:1px solid #e5edf6 !important;
  border-radius:18px !important;
  background:#ffffff !important;
}

/* Сама таблица */
body .desktop-side-grid .data-table{
  width:100% !important;
  min-width:0 !important;
  table-layout:fixed !important;
  border-collapse:separate !important;
  border-spacing:0 !important;
  background:#ffffff !important;
}

/* Ячейки */
body .desktop-side-grid .data-table th,
body .desktop-side-grid .data-table td{
  padding:14px 16px !important;
  vertical-align:top !important;
  text-align:left !important;
  white-space:normal !important;
  word-break:break-word !important;
  overflow-wrap:anywhere !important;
  hyphens:auto !important;
}

/* Шапка */
body .desktop-side-grid .data-table thead th{
  background:#f8fbff !important;
  color:#17324f !important;
  font-weight:800 !important;
}

/* Первая колонка — уже */
body .desktop-side-grid .data-table th:first-child,
body .desktop-side-grid .data-table td:first-child{
  width:38% !important;
  min-width:180px !important;
  color:#29486a !important;
  font-weight:700 !important;
}

/* Вторая колонка — шире и ближе */
body .desktop-side-grid .data-table th:nth-child(2),
body .desktop-side-grid .data-table td:nth-child(2){
  width:62% !important;
}

body .desktop-side-grid .data-table td:nth-child(2){
  padding-left:12px !important;
  padding-right:12px !important;
  line-height:1.5 !important;
}

/* Метрики слева не ломаем */
body .desktop-score-card{
  min-width:0 !important;
}

/* Планшет */
@media (max-width: 1240px){
  body .desktop-summary-grid{
    grid-template-columns:1fr !important;
  }

  body .desktop-side-grid{
    grid-template-columns:1fr !important;
  }
}

/* Мобилка: разрешаем fallback-скролл только там, где уже совсем узко */
@media (max-width: 760px){
  body .desktop-side-grid .table-wrap{
    overflow-x:auto !important;
  }

  body .desktop-side-grid .data-table{
    min-width:620px !important;
  }
}

/* ===== FC_SUMMARY_SIGNS_TABLES_FIX_END ===== */

/* ===== FC_METALMARK_CARDS_COMPACT_START ===== */

/* Сетка карточек */
body .material-grid,
body .results-grid,
body [class*="material-grid"],
body [class*="results-grid"]{
  align-items:stretch !important;
}

/* Карточка результата */
body .material-card,
body .material-card.compact,
body .results-grid > *,
body .material-grid > *{
  display:flex !important;
  flex-direction:column !important;
  min-height:100% !important;
}

/* Контейнер метрик сверху оставляем */
body .material-card .card-metrics,
body .material-card.compact .card-metrics{
  flex:0 0 auto !important;
}

/* Основной текстовый блок — ограничиваем */
body .material-card .card-summary,
body .material-card.compact .card-summary,
body .material-card p,
body .material-card.compact p{
  display:-webkit-box !important;
  -webkit-box-orient:vertical !important;
  -webkit-line-clamp:7 !important;
  line-clamp:7 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:normal !important;
  min-height:0 !important;
}

/* Если есть отдельный блок описания */
body .material-card .card-description,
body .material-card.compact .card-description,
body .material-card .description,
body .material-card.compact .description{
  display:-webkit-box !important;
  -webkit-box-orient:vertical !important;
  -webkit-line-clamp:7 !important;
  line-clamp:7 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

/* Кнопки всегда внизу карточки */
body .material-card .card-actions,
body .material-card.compact .card-actions,
body .material-card .action-row,
body .material-card.compact .action-row,
body .material-card .link-row,
body .material-card.compact .link-row{
  margin-top:auto !important;
  padding-top:12px !important;
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:10px !important;
  align-items:stretch !important;
}

/* Если кнопок три — третью на всю ширину */
body .material-card .card-actions > :nth-child(3):last-child,
body .material-card.compact .card-actions > :nth-child(3):last-child,
body .material-card .action-row > :nth-child(3):last-child,
body .material-card.compact .action-row > :nth-child(3):last-child,
body .material-card .link-row > :nth-child(3):last-child,
body .material-card.compact .link-row > :nth-child(3):last-child{
  grid-column:1 / -1 !important;
}

/* Кнопки единые */
body .material-card .card-actions .btn,
body .material-card.compact .card-actions .btn,
body .material-card .action-row .btn,
body .material-card.compact .action-row .btn,
body .material-card .link-row .btn,
body .material-card.compact .link-row .btn,
body .material-card .card-actions a,
body .material-card.compact .card-actions a,
body .material-card .action-row a,
body .material-card.compact .action-row a,
body .material-card .link-row a,
body .material-card.compact .link-row a,
body .material-card .card-actions button,
body .material-card.compact .card-actions button,
body .material-card .action-row button,
body .material-card.compact .action-row button,
body .material-card .link-row button,
body .material-card.compact .link-row button{
  width:100% !important;
  min-height:42px !important;
  padding:0 14px !important;
  border-radius:12px !important;
  justify-content:center !important;
  white-space:nowrap !important;
}

/* Заголовок карточки чуть стабилизируем */
body .material-card h3,
body .material-card.compact h3{
  min-height:44px !important;
  display:-webkit-box !important;
  -webkit-box-orient:vertical !important;
  -webkit-line-clamp:2 !important;
  overflow:hidden !important;
}

/* На узких экранах кнопки столбцом */
@media (max-width: 760px){
  body .material-card .card-actions,
  body .material-card.compact .card-actions,
  body .material-card .action-row,
  body .material-card.compact .action-row,
  body .material-card .link-row,
  body .material-card.compact .link-row{
    grid-template-columns:1fr !important;
  }
}

/* ===== FC_METALMARK_CARDS_COMPACT_END ===== */

/* ===== FC_METALMARK_CARDS_NO_SHIFT_START ===== */

/* Общая сетка карточки */
body .material-card,
body .material-card.compact,
body .material-grid > *,
body .results-grid > *{
  display:grid !important;
  grid-template-rows:auto auto 1fr auto !important;
  align-content:start !important;
  min-height:100% !important;
  min-width:0 !important;
}

/* Верхние бейджи */
body .material-card .badges,
body .material-card.compact .badges,
body .material-card .badge-row,
body .material-card.compact .badge-row{
  align-self:start !important;
  min-height:32px !important;
}

/* Заголовок карточки */
body .material-card h3,
body .material-card.compact h3{
  margin:0 0 8px 0 !important;
  min-height:48px !important;
  display:-webkit-box !important;
  -webkit-box-orient:vertical !important;
  -webkit-line-clamp:2 !important;
  overflow:hidden !important;
}

/* Контентный блок описания */
body .material-card .card-summary,
body .material-card.compact .card-summary,
body .material-card p,
body .material-card.compact p,
body .material-card .card-description,
body .material-card.compact .card-description,
body .material-card .description,
body .material-card.compact .description{
  min-height:168px !important;
  margin:0 !important;
  display:-webkit-box !important;
  -webkit-box-orient:vertical !important;
  -webkit-line-clamp:7 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:normal !important;
  align-self:start !important;
}

/* Метрики не должны расталкивать кнопки */
body .material-card .card-metrics,
body .material-card.compact .card-metrics{
  align-self:start !important;
  margin-bottom:10px !important;
}

/* Блок действий всегда внизу */
body .material-card .card-actions,
body .material-card.compact .card-actions,
body .material-card .action-row,
body .material-card.compact .action-row,
body .material-card .link-row,
body .material-card.compact .link-row{
  align-self:end !important;
  margin-top:auto !important;
  padding-top:12px !important;
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:10px !important;
}

/* Если кнопок 3 — третья на всю ширину */
body .material-card .card-actions > :nth-child(3):last-child,
body .material-card.compact .card-actions > :nth-child(3):last-child,
body .material-card .action-row > :nth-child(3):last-child,
body .material-card.compact .action-row > :nth-child(3):last-child,
body .material-card .link-row > :nth-child(3):last-child,
body .material-card.compact .link-row > :nth-child(3):last-child{
  grid-column:1 / -1 !important;
}

/* Все кнопки одинаковые */
body .material-card .card-actions .btn,
body .material-card.compact .card-actions .btn,
body .material-card .action-row .btn,
body .material-card.compact .action-row .btn,
body .material-card .link-row .btn,
body .material-card.compact .link-row .btn,
body .material-card .card-actions a,
body .material-card.compact .card-actions a,
body .material-card .action-row a,
body .material-card.compact .action-row a,
body .material-card .link-row a,
body .material-card.compact .link-row a,
body .material-card .card-actions button,
body .material-card.compact .card-actions button,
body .material-card .action-row button,
body .material-card.compact .action-row button,
body .material-card .link-row button,
body .material-card.compact .link-row button{
  width:100% !important;
  min-height:46px !important;
  height:46px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:0 14px !important;
  border-radius:12px !important;
  white-space:nowrap !important;
  box-sizing:border-box !important;
}

/* У ряда карточек одинаковое выравнивание */
body .material-grid,
body .results-grid{
  align-items:stretch !important;
}

body .material-grid > *,
body .results-grid > *{
  height:100% !important;
}

/* Мобилка */
@media (max-width: 760px){
  body .material-card .card-actions,
  body .material-card.compact .card-actions,
  body .material-card .action-row,
  body .material-card.compact .action-row,
  body .material-card .link-row,
  body .material-card.compact .link-row{
    grid-template-columns:1fr !important;
  }

  body .material-card .card-summary,
  body .material-card.compact .card-summary,
  body .material-card p,
  body .material-card.compact p{
    min-height:0 !important;
  }
}

/* ===== FC_METALMARK_CARDS_NO_SHIFT_END ===== */

/* ===== FC_METALMARK_HIDE_ANALOGS_PREVIEW_START ===== */

/* Только список/превью metalmark */
body .material-grid .material-card .card-actions .btn,
body .material-grid .material-card .action-row .btn,
body .material-grid .material-card .link-row .btn,
body .material-grid .material-card .card-actions a,
body .material-grid .material-card .action-row a,
body .material-grid .material-card .link-row a,
body .material-grid .material-card .card-actions button,
body .material-grid .material-card .action-row button,
body .material-grid .material-card .link-row button{
  position:relative;
}

body .material-grid .material-card .card-actions > *:not(:first-child):not(:nth-child(2)):not(:last-child),
body .material-grid .material-card .action-row > *:not(:first-child):not(:nth-child(2)):not(:last-child),
body .material-grid .material-card .link-row > *:not(:first-child):not(:nth-child(2)):not(:last-child){
  display:none !important;
}

/* Если кнопка Аналоги отдельная и не последняя */
body .material-grid .material-card .card-actions > *:nth-child(3):not(:last-child),
body .material-grid .material-card .action-row > *:nth-child(3):not(:last-child),
body .material-grid .material-card .link-row > *:nth-child(3):not(:last-child){
  display:none !important;
}

/* Нижняя кнопка сравнения на всю ширину */
body .material-grid .material-card .card-actions,
body .material-grid .material-card .action-row,
body .material-grid .material-card .link-row{
  grid-template-columns:1fr 1fr !important;
}

body .material-grid .material-card .card-actions > :last-child,
body .material-grid .material-card .action-row > :last-child,
body .material-grid .material-card .link-row > :last-child{
  grid-column:1 / -1 !important;
}

/* ===== FC_METALMARK_HIDE_ANALOGS_PREVIEW_END ===== */

/* ===== FC_METALMARK_CARDS_GAP_FIX_START ===== */

/* карточка: нормальная вертикальная компоновка без лишней пустоты */
body .material-card,
body .material-card.compact,
body .material-grid > *,
body .results-grid > *{
  display:flex !important;
  flex-direction:column !important;
  min-height:100% !important;
  min-width:0 !important;
}

/* заголовок */
body .material-card h3,
body .material-card.compact h3{
  margin:0 0 8px 0 !important;
  min-height:48px !important;
  display:-webkit-box !important;
  -webkit-box-orient:vertical !important;
  -webkit-line-clamp:2 !important;
  overflow:hidden !important;
}

/* описание: убираем жёсткую высоту, оставляем clamp */
body .material-card .card-summary,
body .material-card.compact .card-summary,
body .material-card p,
body .material-card.compact p,
body .material-card .card-description,
body .material-card.compact .card-description,
body .material-card .description,
body .material-card.compact .description{
  min-height:unset !important;
  max-height:8.8em !important;
  margin:0 0 12px 0 !important;
  display:-webkit-box !important;
  -webkit-box-orient:vertical !important;
  -webkit-line-clamp:4 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:normal !important;
  align-self:start !important;
  line-height:1.45 !important;
}

/* бейджи/теги перед метриками */
body .material-card .badge-row,
body .material-card.compact .badge-row,
body .material-card .badges,
body .material-card.compact .badges{
  margin:0 0 10px 0 !important;
}

/* метрики чуть компактнее */
body .material-card .card-metrics,
body .material-card.compact .card-metrics{
  margin:0 0 12px 0 !important;
  gap:8px !important;
}

/* кнопки всегда внизу, но без искусственного разрыва */
body .material-card .card-actions,
body .material-card.compact .card-actions,
body .material-card .action-row,
body .material-card.compact .action-row,
body .material-card .link-row,
body .material-card.compact .link-row{
  margin-top:auto !important;
  padding-top:8px !important;
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:10px !important;
  align-items:stretch !important;
}

/* третья кнопка на всю ширину */
body .material-card .card-actions > :nth-child(3):last-child,
body .material-card.compact .card-actions > :nth-child(3):last-child,
body .material-card .action-row > :nth-child(3):last-child,
body .material-card.compact .action-row > :nth-child(3):last-child,
body .material-card .link-row > :nth-child(3):last-child,
body .material-card.compact .link-row > :nth-child(3):last-child{
  grid-column:1 / -1 !important;
}

/* на узких экранах чуть свободнее */
@media (max-width: 760px){
  body .material-card .card-summary,
  body .material-card.compact .card-summary,
  body .material-card p,
  body .material-card.compact p{
    -webkit-line-clamp:5 !important;
    max-height:none !important;
  }
}

/* ===== FC_METALMARK_CARDS_GAP_FIX_END ===== */

