/* ---------- Core Layout ---------- */
#mlh-homework {
  max-width: 700px;
  margin: 40px auto;
  font-family: "Helvetica Neue", Arial, sans-serif;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* ---------- Header ---------- */
#mlh-header {
  background: #2ca74c;
  color: #fff;
  text-align: center;
  font-weight: 600;
  padding: 14px 0;
  font-size: 18px;
  border-bottom: 1px solid #249143;
}

/* ---------- Prompt ---------- */
#mlh-prompt {
  width: calc(100% - 40px);
  margin: 20px;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
}
#mlh-start {
  display: block;
  margin: 0 20px 20px;
  padding: 10px 14px;
  background: #2a7ae2;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}
#mlh-start:hover {
  background: #1d5fb3;
}

/* ---------- Question Card ---------- */
#mlh-questions {
  margin: 0 20px 20px;
  padding: 25px;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 6px;
  min-height: 80px;
  line-height: 1.6em;
  font-size: 16px;
}

/* ---------- Answer Area ---------- */
#mlh-answer-fields {
  margin: 10px 20px;
}
.mathquill-editable {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #aaa;
  border-radius: 6px;
  font-size: 18px;
  width: 100%;
  background: #fff;
}

/* ---------- On-Screen Math Keyboard ---------- */
#mlh-keyboard {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 10px 20px 20px;
}
.mlh-key {
  background: #f7f7f7;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  padding: 8px 12px;
  cursor: pointer;
  min-width: 42px;
  text-align: center;
  transition: background 0.2s;
}
.mlh-key:hover {
  background: #e9e9e9;
}

/* ---------- Submit / Next Buttons ---------- */
#mlh-answers button,
#mlh-next {
  display: block;
  margin: 0 20px 20px;
  padding: 10px 16px;
  font-size: 15px;
  background: #2a7ae2;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
#mlh-answers button:hover,
#mlh-next:hover {
  background: #1d5fb3;
}

/* ---------- Results ---------- */
#mlh-results {
  margin: 20px;
  padding: 18px;
  background: #f3f7ff;
  border: 1px solid #cdddfd;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.5em;
}
