/* ===== Matrix Calc (final, compact) ===== */

/* Root */
.mc-wrap{
  max-width:980px;
  margin:20px auto;
  padding:16px;
  box-sizing:border-box;
  font-family:inherit;
}
.mc-wrap.is-loading{ opacity:.75; pointer-events:none; }

/* Form row */
.mc-row{
  max-width:640px;
  margin:0 auto 12px;
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
}
.mc-label{ width:100%; font-weight:600; margin:0 0 6px; }

/* Input + button (unified) */
.mc-input,.mc-btn{
  height:52px;
  font-size:17px;
  line-height:1;
  border-radius:12px;
  box-sizing:border-box;
}
.mc-input{
  flex:0 1 360px;
  min-width:260px;
  padding:0 16px;
  border:2px solid #cfcfcf;
  background:#fff;
  color:#111;
  outline:none;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.mc-input:focus{
  border-color:#8e44ad;
  box-shadow:0 0 0 3px rgba(142,68,173,.18);
}
.mc-btn{
  flex:0 0 auto;
  padding:0 18px;
  border:2px solid #6f1d7a;
  background:#6f1d7a;
  color:#fff;
  font-weight:600;
  cursor:pointer;
  white-space:nowrap;
  transition:background .15s ease, border-color .15s ease, transform .05s ease;
}
.mc-btn:hover{ background:#5e1768; border-color:#5e1768; }
.mc-btn:active{ transform:translateY(1px); }
.mc-btn:disabled{ opacity:.6; cursor:default; }

/* Error */
.mc-error{ margin-top:10px; color:#b00020; font-size:14px; }

/* Result */
.mc-result{ margin-top:16px; display:none; } /* показывается после расчёта из JS */
.mc-result img{ display:block; max-width:100%; height:auto; }

/* Layout: matrix left / health+purpose right */
.mc-out{
  display:flex;
  align-items:flex-start;
  gap:24px;
  flex-wrap:wrap;
}
.mc-left{ flex:1 1 560px; min-width:320px; }
.mc-right{ flex:0 0 380px; min-width:320px; }
.mc-img img{
  width:100%;
  max-width:560px;
  height:auto;
  margin:0;
}

/* Mobile: stack */
@media (max-width:768px){
  .mc-out{ flex-direction:column; }
  .mc-left,.mc-right{ flex:1 1 auto; min-width:0; }
  .mc-img img{ max-width:100%; }
}

/* Desktop tuning (как у тебя в итоге) */
@media (min-width:992px){
  .mc-wrap{ max-width:1200px; }
  .mc-out{ flex-wrap:nowrap; gap:16px; margin-left:-60px; }
  .mc-left{ flex:0 1 640px; min-width:560px; }
  .mc-right{ flex:0 0 380px; min-width:380px; }
  .mc-img img{ max-width:640px; }
}

/* Health table */
.mc-health-title{ margin:8px 0 0; }
.mc-health-table{
  border-collapse:collapse;
  border-spacing:0;
  width:100%;
  margin:10px 0;
}
.mc-health-table td,.mc-health-table th{
  padding:5px 10px;
  border:1px solid #000;
  text-align:center;
  font-family:Arial, Helvetica, Verdana, sans-serif;
  font-size:80%;
}
.mc-health-table .mc-alt{ background:#EEE; }

/* Purpose (row + skobka) */
.mc-purpose-row{
  display:flex;
  align-items:flex-start;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
}
.mc-purpose-mini{ padding-top:6px; }
.mc-purpose-big{ padding-top:6px; font-weight:700; }
.mc-skobka{ height:50px; width:auto; display:inline-block; }
.mc-purpose-text{ margin-top:10px; }

/* Purpose lines: desktop OK, mobile each on new line */
.mc-purpose-lines{ display:flex; flex-wrap:wrap; gap:0 18px; }
.mc-purpose-line{ display:inline-flex; gap:6px; align-items:baseline; }
.mc-p--p{ color:red; } .mc-p--op{ color:orange; } .mc-p--pd{ color:green; } .mc-p--pp{ color:maroon; }

@media (max-width:768px){
  .mc-purpose-lines{ flex-direction:column; gap:6px; }
  .mc-purpose-line{ display:flex; justify-content:flex-start; }
}

/* Mobile: form controls stack */
@media (max-width:576px){
  .mc-row{ max-width:100%; gap:8px; }
  .mc-input,.mc-btn{ width:100%; }
}
/* ===== Matrix Calc (final, compact) ===== */

/* Root */
.mc-wrap{
  max-width:980px;
  margin:20px auto;
  padding:16px;
  box-sizing:border-box;
  font-family:inherit;
}
.mc-wrap.is-loading{ opacity:.75; pointer-events:none; }

/* Form row */
.mc-row{
  max-width:640px;
  margin:0 auto 12px;
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
}
.mc-label{ width:100%; font-weight:600; margin:0 0 6px; }

/* Input + button (unified) */
.mc-input,.mc-btn{
  height:52px;
  font-size:17px;
  line-height:1;
  border-radius:12px;
  box-sizing:border-box;
}
.mc-input{
  flex:0 1 360px;
  min-width:260px;
  padding:0 16px;
  border:2px solid #cfcfcf;
  background:#fff;
  color:#111;
  outline:none;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.mc-input:focus{
  border-color:#8e44ad;
  box-shadow:0 0 0 3px rgba(142,68,173,.18);
}
.mc-btn{
  flex:0 0 auto;
  padding:0 18px;
  border:2px solid #6f1d7a;
  background:#6f1d7a;
  color:#fff;
  font-weight:600;
  cursor:pointer;
  white-space:nowrap;
  transition:background .15s ease, border-color .15s ease, transform .05s ease;
}
.mc-btn:hover{ background:#5e1768; border-color:#5e1768; }
.mc-btn:active{ transform:translateY(1px); }
.mc-btn:disabled{ opacity:.6; cursor:default; }

/* Error */
.mc-error{ margin-top:10px; color:#b00020; font-size:14px; }

/* Result */
.mc-result{ margin-top:16px; display:none; } /* показывается после расчёта из JS */
.mc-result img{ display:block; max-width:100%; height:auto; }

/* Layout: matrix left / health+purpose right */
.mc-out{
  display:flex;
  align-items:flex-start;
  gap:24px;
  flex-wrap:wrap;
}
.mc-left{ flex:1 1 560px; min-width:320px; }
.mc-right{ flex:0 0 380px; min-width:320px; }
.mc-img img{
  width:100%;
  max-width:560px;
  height:auto;
  margin:0;
}
.mc-meta{padding-left:15px;}
/* Mobile: stack */
@media (max-width:768px){
  .mc-out{ flex-direction:column; }
  .mc-left,.mc-right{ flex:1 1 auto; min-width:0; }
  .mc-img img{ max-width:100%; }
}

/* Desktop tuning (как у тебя в итоге) */
@media (min-width:992px){
  .mc-wrap{ max-width:1200px; }
  .mc-out{ flex-wrap:nowrap; gap:16px; margin-left:-60px; }
  .mc-left{ flex:0 1 640px; min-width:560px; }
  .mc-right{ flex:0 0 380px; min-width:380px; }
  .mc-img img{ max-width:640px; }
}

/* Health table */
.mc-health-title{ margin:8px 0 0; }
.mc-health-table{
  border-collapse:collapse;
  border-spacing:0;
  width:100%;
  margin:10px 0;
}
.mc-health-table td,.mc-health-table th{
  padding:5px 10px;
  border:1px solid #000;
  text-align:center;
  font-family:Arial, Helvetica, Verdana, sans-serif;
  font-size:80%;
}
.mc-health-table .mc-alt{ background:#EEE; }

/* Purpose (row + skobka) */
.mc-purpose-row{
  display:flex;
  align-items:flex-start;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
}
.mc-purpose-mini{ padding-top:6px; }
.mc-purpose-big{ padding-top:6px; font-weight:700; }
.mc-skobka{ height:50px; width:auto; display:inline-block; }
.mc-purpose-text{ margin-top:10px; }

/* Purpose lines: desktop OK, mobile each on new line */
.mc-purpose-lines{ display:flex; flex-wrap:wrap; gap:0 18px; }
.mc-purpose-line{ display:inline-flex; gap:6px; align-items:baseline; }
.mc-p--p{ color:red; } .mc-p--op{ color:orange; } .mc-p--pd{ color:green; } .mc-p--pp{ color:maroon; }

@media (max-width:768px){
  .mc-purpose-lines{ flex-direction:column; gap:6px; }
  .mc-purpose-line{ display:flex; justify-content:flex-start; }
}

/* Mobile: form controls stack */
@media (max-width:576px){
  .mc-row{ max-width:100%; gap:8px; }
  .mc-input,.mc-btn{ width:100%; }
}
/* input */
.mc-wrap .mc-input {
  border-radius: 12px;
  -webkit-appearance: none;
  appearance: none;
}

/* button */
.mc-wrap .mc-btn {
  border-radius: 12px;
}


