.int-tool {
  background: #ffffff;
  border: 1px solid var(--math-line);
  border-radius: 18px;
  box-shadow: var(--math-shadow);
  overflow: hidden;
}


.int-tool-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 28px 20px;
  border-bottom: 1px solid var(--math-line);
}


.int-tool-head h1 {
  margin: 0 0 7px;
  font-size: 30px;
}


.int-tool-head p {
  margin: 0;
  color: var(--math-text-soft);
  font-size: 13px;
  line-height: 1.7;
}


.int-grade {
  flex: 0 0 auto;
  padding: 6px 9px;
  background: #eee8ff;
  border-radius: 8px;
  color: #6745aa;
  font-size: 11px;
  font-weight: 800;
}


.int-workspace {
  display: grid;
  grid-template-columns:
    minmax(0, 1.2fr)
    minmax(320px, 0.8fr);
}


.int-input-panel {
  min-width: 0;
  padding: 25px 28px;
  border-right: 1px solid var(--math-line);
}


.int-input-panel h2 {
  margin: 0 0 8px;
  font-size: 16px;
}


.int-formula {
  margin-bottom: 18px;
  padding: 9px 12px;
  background: var(--math-primary-soft);
  border-radius: 8px;
  color: var(--math-primary);
  font-size: 14px;
  font-weight: 800;
}


.int-coefficient-grid {
  display: grid;
  grid-template-columns:
    repeat(5, minmax(0, 1fr));
  gap: 8px;
}


.int-coefficient {
  min-width: 0;
}


.int-coefficient label {
  display: block;
  margin-bottom: 5px;
  color: var(--math-text-soft);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}


.int-coefficient input {
  width: 100%;
  height: 48px;
  padding: 0 8px;
  background: #ffffff;
  border: 1px solid var(--math-line);
  border-radius: 9px;
  color: var(--math-text);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  outline: none;
}


.int-coefficient input:focus,
.int-field input:focus {
  border-color: var(--math-primary);
  box-shadow:
    0 0 0 3px
    rgba(47, 111, 237, 0.1);
}


.int-eval-area {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--math-line);
}


.int-field {
  display: grid;
  grid-template-columns:
    60px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}


.int-field label {
  color: var(--math-text-soft);
  font-size: 12px;
  font-weight: 800;
}


.int-field input {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  background: #ffffff;
  border: 1px solid var(--math-line);
  border-radius: 9px;
  color: var(--math-text);
  font-size: 16px;
  font-weight: 700;
  outline: none;
}


.int-eval-area p {
  margin: 7px 0 0 70px;
  color: var(--math-text-soft);
  font-size: 11px;
}


.int-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}


.int-actions button {
  min-height: 44px;
  border: 0;
  border-radius: 9px;
  font-weight: 800;
  cursor: pointer;
}


.int-calculate {
  min-width: 155px;
  background: var(--math-primary);
  color: #ffffff;
}


.int-clear {
  min-width: 76px;
  background: #eef1f6;
  color: #566176;
}


.int-error {
  margin: 14px 0 0;
  color: #c0392b;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}


.int-result-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 24px;
  background: #f8faff;
  text-align: center;
}


.int-result-label {
  margin-bottom: 8px;
  color: var(--math-text-soft);
  font-size: 12px;
  font-weight: 800;
}


.int-result {
  color: var(--math-primary);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.6;
  overflow-wrap: anywhere;
}


.int-value-box {
  width: 100%;
  margin-top: 18px;
  padding: 13px;
  background: #ffffff;
  border: 1px solid var(--math-line);
  border-radius: 10px;
}


.int-value-box span {
  display: block;
  color: var(--math-text-soft);
  font-size: 11px;
  font-weight: 800;
}


.int-value-box strong {
  display: block;
  margin-top: 5px;
  color: var(--math-primary);
  font-size: 27px;
}


.int-steps {
  padding: 22px 28px 27px;
  border-top: 1px solid var(--math-line);
}


.int-steps-head h2 {
  margin: 0 0 12px;
  font-size: 16px;
}


.int-steps-list {
  display: grid;
  gap: 7px;
}


.int-step {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  background: #f7f9fc;
  border-radius: 9px;
}


.int-step-number {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--math-primary-soft);
  border-radius: 50%;
  color: var(--math-primary);
  font-size: 11px;
  font-weight: 900;
}


.int-step-text {
  color: #43506a;
  font-size: 13px;
  line-height: 1.7;
}


.int-info-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}


.int-info-card {
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--math-line);
  border-radius: 13px;
}


.int-info-card h2 {
  margin: 0 0 8px;
  font-size: 15px;
}


.int-info-card p {
  margin: 0;
  color: var(--math-text-soft);
  font-size: 12px;
  line-height: 1.7;
}


@media (max-width: 760px) {

  .int-workspace {
    grid-template-columns: 1fr;
  }


  .int-input-panel {
    border-right: 0;
    border-bottom: 1px solid var(--math-line);
  }


  .int-coefficient-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

}


@media (max-width: 520px) {

  .int-tool-head {
    padding: 20px 18px;
  }


  .int-tool-head h1 {
    font-size: 26px;
  }


  .int-grade {
    display: none;
  }


  .int-input-panel {
    padding: 20px 14px;
  }


  .int-coefficient-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }


  .int-field {
    grid-template-columns:
      50px minmax(0, 1fr);
  }


  .int-eval-area p {
    margin-left: 60px;
  }


  .int-result {
    font-size: 20px;
  }


  .int-info-grid {
    grid-template-columns: 1fr;
  }

}
